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

Maksim Levental llvmlistbot at llvm.org
Tue Nov 14 20:15:35 PST 2023


makslevental wrote:

The alternative is to drop those dialect module loads (prior to type/attribute casting) which will also surprise people because now something like this

```python
t = Type.parse('!transform.op<"foo.bar">', Context())
# CHECK: !transform.op<"foo.bar">
print(t)
# CHECK: OperationType(!transform.op<"foo.bar">)
print(repr(t))
```

without a prior `from mlir.dialects import transform` won't work. It's the same error - the dialect module (either C extension or python module) hasn't been loaded. 

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


More information about the Mlir-commits mailing list