[flang-commits] [flang] [MLIR] Update convert-gpu-to-spirv pass to prepare using GPU compilat… (PR #69941)
Jungwook Park via flang-commits
flang-commits at lists.llvm.org
Mon Oct 30 13:03:17 PDT 2023
================
@@ -108,6 +138,25 @@ void GPUToSPIRVPass::runOnOperation() {
if (failed(applyFullConversion(gpuModule, *target, std::move(patterns))))
return signalPassFailure();
}
+
+ // For OpenCL, the gpu.func op in the original gpu.module op needs to be
----------------
jungpark-mlir wrote:
I think the problem is, the lack of spirv support in gpu dialect. For example, gpu.func needs to be able to wrap spirv.func so gpu-to-llvm pass (for the host code) can properly handle the relation between gpu.launch_func and spirv.func.
Basically, using dummy `func.func` looks little hacky and it'd be also nice if the divergence between Vulkan/OpenCL IR structures could be avoided. However, considering the progress of this commit, we can discuss this later for the future enhancement.
Really appreciate this work and look forward to seeing it merged.
https://github.com/llvm/llvm-project/pull/69941
More information about the flang-commits
mailing list