[Mlir-commits] [mlir] [MLIR][NVVM] Reduce the scope of the LLVM_HAS_NVPTX_TARGET guard (PR #97349)
Fabian Mora
llvmlistbot at llvm.org
Mon Jul 1 15:51:29 PDT 2024
================
@@ -48,9 +48,7 @@ void GpuModuleToBinaryPass::getDependentDialects(
// Register all GPU related translations.
registry.insert<gpu::GPUDialect>();
registry.insert<LLVM::LLVMDialect>();
-#if LLVM_HAS_NVPTX_TARGET
registry.insert<NVVM::NVVMDialect>();
-#endif
#if MLIR_ENABLE_ROCM_CONVERSIONS
registry.insert<ROCDL::ROCDLDialect>();
#endif
----------------
fabianmcg wrote:
The only op generated by the pass is a `gpu.binary`, and `gpu` should be in the context because the pass only performs serialization if there's a `gpu.module` in the input.
All other dialects, `llvm`, `nvvm`, `rocdl`, `spirv`, have to be in the input or loaded by a `register*Translation*` call. And all the `register*Translation*` have to be called before invoking the pass.
https://github.com/llvm/llvm-project/pull/97349
More information about the Mlir-commits
mailing list