iree-org / iree-org/wave

Bind operation-specific methods on operation classes instead of dialect module

Open
#855 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.