Add MLIR verifier to check HardwareConstraint.vector_shapes consistency with tile sizes
- Dominant language
- Python
- Stars
- 59
- Forks
- 32
- PR merge metrics
- No merged PRs in 30d
Description
The `HardwareConstraint` attribute may carry an explicit `vector_shapes` dictionary mapping dimension symbols to concrete sizes. These values should be consistent with the resolved tile sizes from the corresponding `WorkgroupConstraint` and `TilingConstraint` entries on the same dimensions.
Currently there is no MLIR-side verification for this invariant. If the two diverge (e.g., `vector_shapes` says `M: 16` but the `WorkgroupConstraint` for `M` resolves to `32`), the mismatch is not caught until runtime or leads to silent miscompilation.
The existing `verifyConstraints` function in `WaveDialect.cpp` already evaluates constraint tile sizes against hyperparameters. It could be extended to cross-check resolved tile sizes against `vector_shapes` entries when both are present, emitting a diagnostic on mismatch.
Contributor guide
Assessment
This issue has not been assessed yet.