[Mlir-commits] [mlir] [MLIR][Python] Make Python-defined dialect loading context-aware (PR #210501)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Jul 18 23:23:17 PDT 2026


================
@@ -980,19 +973,21 @@ def load(
         for op in cls.operations:
             op._attach_traits()
 
-        _cext.globals._register_dialect_impl(cls.DIALECT_NAMESPACE, cls, replace=reload)
+        _cext.globals._register_dialect_impl(cls.DIALECT_NAMESPACE, cls, replace=True)
----------------
PragmaTwice wrote:

Ahh `_register_dialect_impl` is for all upstream dialect registering, not only for python-defined dialects. So I don't think we can change its signature here.

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


More information about the Mlir-commits mailing list