[Mlir-commits] [mlir] [mlir][gpu] GPUToROCDL/NVVM: use generic llvm conversion interface instead of hardcoded conversions. (PR #124439)

Ivan Butygin llvmlistbot at llvm.org
Sat Feb 8 16:08:24 PST 2025


================
@@ -376,17 +376,44 @@ struct LowerGpuOpsToNVVMOpsPass
     LLVMTypeConverter converter(m.getContext(), options);
     configureGpuToNVVMTypeConverter(converter);
     RewritePatternSet llvmPatterns(m.getContext());
+    LLVMConversionTarget target(getContext());
+
+    if (!filterDialects.empty()) {
+      for (StringRef dialectName : filterDialects) {
+        Dialect *dialect = getContext().getLoadedDialect(dialectName);
+        // Dialect may not be loaded if it wasn't used in source module, ignore.
----------------
Hardcode84 wrote:

done

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


More information about the Mlir-commits mailing list