[Mlir-commits] [mlir] [mlir] load dialects for non-namespaced attrs (PR #94838)
Jeremy Kun
llvmlistbot at llvm.org
Wed Jun 12 16:42:47 PDT 2024
================
@@ -144,6 +144,10 @@ TranslateFromMLIRRegistration::TranslateFromMLIRRegistration(
DialectRegistry registry;
dialectRegistration(registry);
context->appendDialectRegistry(registry);
+ // Ensure all registered dialects are loaded
+ for (const auto &dialectName : registry.getDialectNames()) {
+ context->getOrLoadDialect(dialectName);
+ }
----------------
j2kun wrote:
This PR contains a reproducer. Remove those lines and the test dialect to LLVM translation will segfault.
https://github.com/llvm/llvm-project/pull/94838
More information about the Mlir-commits
mailing list