[Mlir-commits] [mlir] [mlir][python] automatically bundle builtin dialect with core sources (PR #72338)

Mike Urbach llvmlistbot at llvm.org
Tue Nov 14 19:48:12 PST 2023


mikeurbach wrote:

I think this makes sense, but I'm curious what others think. When we initially made the switch in CIRCT to the recommended approach where downstream users of the Python bindings "vendor" MLIR in their own package, we only ever wanted to depend on MLIRPythonSources.Core. I seem to recall at the time we made the switch, we didn't need to do anything else for the builtin dialect to be available.

These days, with `loadDialectModule` expecting to be able to load the builtin dialect module, it seems reasonable to have the builtin dialect generated and available for that function to find. I will point out that something else I tried was just patching `loadDialectModule` to immediately return true for the builtin dialect, and this works. IMHO that would be fine too.

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


More information about the Mlir-commits mailing list