[Mlir-commits] [mlir] [mlir][python] remove various caching mechanism (PR #70831)

Maksim Levental llvmlistbot at llvm.org
Thu Nov 2 07:48:10 PDT 2023


================
@@ -3,7 +3,13 @@
 import gc
 import io
 import itertools
+import sys
+
 from mlir.ir import *
+from mlir.dialects._ods_common import _cext
+
+sys.path.append(".")
+_cext.globals.append_dialect_search_prefix("custom_dialect")
----------------
makslevental wrote:

> It's not obvious from the test what would happen if loading doesn't happen

Yes I couldn't figure out how to "surface" the "failing" behavior discussed above - that without this `custom_dialect.custom.py`, `loadDialectModule` happens over and over. 

> Such a method can, for example, tell you if a dialect prefix is present in the set of loaded dialects.

Okay I'll do that.

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


More information about the Mlir-commits mailing list