[llvm] [mlir] [mlir][gpu] Change GPU modules to globals (PR #135478)
Christian Sigg via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 24 03:01:27 PDT 2025
chsigg wrote:
Thanks Fabian for the explanations, I wasn't aware of the LLVM offloading project.
The existing `gpu-to-llvm` pass is already very specifically targeting the runtime wrappers, so I'm wondering if it would make sense to convert to (global) `mgpuModuleLoad / mgpuLaunchKernel` etc calls there. Currently `gpu-to-llvm` runs just before `gpu-module-to-binary` in some places, but I think it would be fine to swap those.
After `gpu-to-llvm`, the `gpu.binary` op would be dead and translation to LLVM would not use the OffloadingLLVMTranslation functionality. Would you consider this a step backwards from where you are heading? Or is it fine to remove the `SelectObjectAttrImpl` and expect that there will be an `OffloadingLLVMTranslationAttrInterface` implementation that fits LLVM offloading, or other implementations for users which do not run `gpu-to-llvm`.
https://github.com/llvm/llvm-project/pull/135478
More information about the llvm-commits
mailing list