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

Maksim Levental llvmlistbot at llvm.org
Thu Nov 2 08:15:28 PDT 2023


================
@@ -57,15 +57,18 @@ void PyGlobals::loadDialectModule(llvm::StringRef dialectNamespace) {
     break;
   }
 
+  if (loaded.is_none())
+    return false;
   // Note: Iterator cannot be shared from prior to loading, since re-entrancy
   // may have occurred, which may do anything.
-  loadedDialectModulesCache.insert(dialectNamespace);
+  loadedDialectModules.insert(dialectNamespace);
+  return true;
----------------
makslevental wrote:

Yea so I guess it's true you can get into these weird corners where you want to do stuff in python but you haven't setup any of the boiler plate? I agree that I don't think it's common and adding "cache invalidation" mechanisms, such as we have currently (and this PR is meant to excise) to `loadedDialectModules` probably isn't worth it.

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


More information about the Mlir-commits mailing list