Bind operation-specific methods on operation classes instead of dialect module
- Dominant language
- Python
- Stars
- 59
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
`iterate_make_isolated` and `iterate_make_non_isolated` are currently exposed as free functions on the wave dialect Python module. They accept a raw `MlirOperation` and internally cast to `IterateOp`.
These should instead be methods on a Python `IterateOp` class, similar to how upstream MLIR's ODS-generated Python bindings attach methods to concrete `OpView` subclasses. This would make the API safer (type-checked at the Python level) and more discoverable.
This requires adding per-operation Python class bindings for Wave dialect operations. Currently only attribute and type classes are generated; operation classes are accessed generically via `ir.Operation` / `ir.OpView`.
Introduced in the MLIR-to-FX conversion PR #843 where these methods are needed by `fx_emitter.py` to transform Iterate regions before parsing.
Contributor guide
Assessment
This issue has not been assessed yet.