diff options
author | Sang Ik Lee <sang.ik.lee@intel.com> | 2023-11-05 18:56:53 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-05 18:56:53 -0800 |
commit | b68fe8699feceadfaef75ed686828252aab6b08d (patch) | |
tree | a6937234e59957982bf985e12b475b368d45829d /clang/lib/Sema/SemaChecking.cpp | |
parent | 9f6010d09e11ccb1fb40f9bd892133fd120bece5 (diff) | |
download | llvm-b68fe8699feceadfaef75ed686828252aab6b08d.zip llvm-b68fe8699feceadfaef75ed686828252aab6b08d.tar.gz llvm-b68fe8699feceadfaef75ed686828252aab6b08d.tar.bz2 |
[mlir] Prepare convert-gpu-to-spirv for OpenCL support (#69941)
This includes a couple of changes to pass behavior for OpenCL kernels.
Vulkan shaders are not impacted by the changes.
1. SPIR-V module is placed inside GPU module. This change is required for
gpu-module-to-binary to work correctly as it expects kernel function to
be inside the GPU module.
2. A dummy func.func with same kernel name as gpu.func is created. GPU
compilation pipeline defers lowering of gpu launch kernel op. Since
spirv.func is not directly tied to gpu launch kernel, a dummy func.func
is required to avoid legalization issues.
3. Use correct mapping when mapping MemRef memory space to SPIR-V
storage class for OpenCL kernels.
Diffstat (limited to 'clang/lib/Sema/SemaChecking.cpp')
0 files changed, 0 insertions, 0 deletions