aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorGeorge Mitenkov <georgemitenk0v@gmail.com>2020-10-23 10:46:18 -0400
committerLei Zhang <antiagainst@google.com>2020-10-26 09:09:29 -0400
commit89808ce7343b22586bfd0d3fafddcdbba94fbcbb (patch)
tree7563d33f8d4d1aad562b0ba8366631f2f62b89a3 /clang/lib/Basic/SourceManager.cpp
parentffa6d2afa4a6f35e2e99172a17d489bcec7f0353 (diff)
downloadllvm-89808ce7343b22586bfd0d3fafddcdbba94fbcbb.zip
llvm-89808ce7343b22586bfd0d3fafddcdbba94fbcbb.tar.gz
llvm-89808ce7343b22586bfd0d3fafddcdbba94fbcbb.tar.bz2
[MLIR][mlir-spirv-cpu-runner] A SPIR-V cpu runner prototype
This patch introduces a SPIR-V runner. The aim is to run a gpu kernel on a CPU via GPU -> SPIRV -> LLVM conversions. This is a first prototype, so more features will be added in due time. - Overview The runner follows similar flow as the other runners in-tree. However, having converted the kernel to SPIR-V, we encode the bind attributes of global variables that represent kernel arguments. Then SPIR-V module is converted to LLVM. On the host side, we emulate passing the data to device by creating in main module globals with the same symbolic name as in kernel module. These global variables are later linked with ones from the nested module. We copy data from kernel arguments to globals, call the kernel function from nested module and then copy the data back. - Current state At the moment, the runner is capable of running 2 modules, nested one in another. The kernel module must contain exactly one kernel function. Also, the runner supports rank 1 integer memref types as arguments (to be scaled). - Enhancement of JitRunner and ExecutionEngine To translate nested modules to LLVM IR, JitRunner and ExecutionEngine were altered to take an optional (default to `nullptr`) function reference that is a custom LLVM IR module builder. This allows to customize LLVM IR module creation from MLIR modules. Reviewed By: ftynse, mravishankar Differential Revision: https://reviews.llvm.org/D86108
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions