[all-commits] [llvm/llvm-project] b68fe8: [mlir] Prepare convert-gpu-to-spirv for OpenCL sup...
Sang Ik Lee via All-commits
all-commits at lists.llvm.org
Sun Nov 5 18:57:16 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b68fe8699feceadfaef75ed686828252aab6b08d
https://github.com/llvm/llvm-project/commit/b68fe8699feceadfaef75ed686828252aab6b08d
Author: Sang Ik Lee <sang.ik.lee at intel.com>
Date: 2023-11-05 (Sun, 05 Nov 2023)
Changed paths:
M mlir/include/mlir/Conversion/Passes.td
M mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRVPass.cpp
M mlir/test/Conversion/GPUToSPIRV/module-opencl.mlir
Log Message:
-----------
[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.
More information about the All-commits
mailing list