[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 16:01:10 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:
Quick question, let's suppose there are no GPU modules or ops, does `dyn_cast<gpu::GPUModuleOp>` requires the dialect to be in the context?
If it does, then we do need `registry.insert<gpu::GPUDialect>` and that's the only one we might need.
https://github.com/llvm/llvm-project/pull/97349
More information about the Mlir-commits
mailing list