iree-org / iree-org/wave

Add MLIR verifier to check HardwareConstraint.vector_shapes consistency with tile sizes

Open
#864 0 comments 0 reactions 0 assignees Claimed by @tgymnich View on GitHub
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

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.