[Mlir-commits] [mlir] [mlir][python] make loading dialect module (for type and value casting) best effort only (PR #72338)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 14 23:14:53 PST 2023
rkayaith 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?
imo adding back the negative caching would be preferable over that
https://github.com/llvm/llvm-project/pull/72338
More information about the Mlir-commits
mailing list