[Mlir-commits] [mlir] [MLIR][NVVM] Reduce the scope of the LLVM_HAS_NVPTX_TARGET guard (PR #97349)

Mehdi Amini llvmlistbot at llvm.org
Tue Jul 2 03:02:01 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
----------------
joker-eph wrote:

> Quick question, let's suppose there are no GPU modules or gpu ops, does dyn_cast<gpu::GPUModuleOp> requires the dialect to be in the context?

No it does not.

https://github.com/llvm/llvm-project/pull/97349


More information about the Mlir-commits mailing list