[Mlir-commits] [mlir] [mlir] Declare promised interfaces for all dialects (PR #78368)

Mehdi Amini llvmlistbot at llvm.org
Thu Feb 22 14:01:08 PST 2024


joker-eph wrote:

> Certainly, for the case where implementations aren't needed, there is no need to register implementations. For the case where they are needed, there is the asymmetry that I'm pointing out above. The setup of that case will more or less be "load DialectA, register interface for DialectA, load Dialect B, register interface for DialectB, register interface for BuiltinDialect" (why? are we missing the load part for it? if it is builtin, why extra action is necessary?)

I see what you mean, I still don't see an "asymmetry" though: there is "implicit" and "explicit" dialect loading, but that's not specific to the builtin dialect.
I believe that an actual user would encounter this much more than you think:

> Load Tosa dialect
> Emit Tosa Ops
> Build a pass pipeline:  `compileTosaToLLVM()`
> Run the pipeline
> /* crash for missing interface */

At this point the missing interfaces are for any kind of dialects **implicitly loaded by the PassManager**! 




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


More information about the Mlir-commits mailing list