[Mlir-commits] [mlir] [mlir][python] make loading dialect module (for type and value casting) best effort only (PR #72338)

Stella Laurenzo llvmlistbot at llvm.org
Tue Nov 14 23:04:12 PST 2023


stellaraccident wrote:

> > The current approach seems fine to me, but since the negative caching was removed this setup will cause the module imports to be attempted on every downcast. I wonder if it's noticeable?
> 
> Something special needs to be done for `builtin` and just hard-coding `"builtin"` somewhere seems like a hack (because the dialect module will appear to be loaded but the `OpView`s won't be registered). The only other thing I can think of is just to generate the `_builtin_ops_gen.py` once, take that code and stick it in eg `ir.py`. The likelihood that `builtin` grows anymore ops is small right?

Let's not do that...

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


More information about the Mlir-commits mailing list