Skip to content

Conversation

@tyb0807
Copy link
Contributor

@tyb0807 tyb0807 commented Jan 8, 2026

Add IndexExprsSpecified to the preconditions for LowerWaveToMLIR pass. This ensures all memory operations have index expressions before lowering, removing the need for runtime checks in the lowering patterns.

@tyb0807 tyb0807 requested review from ftynse and tgymnich January 8, 2026 14:10
Copy link
Contributor

@ftynse ftynse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should consider an alias form that regroups everything we need for lowering

@tyb0807 tyb0807 force-pushed the idx_norm_form branch 10 times, most recently from 5e5b642 to 40485fe Compare January 10, 2026 14:19
Add IndexExprsSpecified to the preconditions for LowerWaveToMLIR pass.
This ensures all memory operations have index expressions before
lowering, removing the need for runtime checks in the lowering patterns.

The IndexExprsSpecified verification is relaxed for vector-only ops
(those without WaveTensorType operands/results), since after
elements-per-thread propagation these ops no longer need index
expressions. ReadOp and WriteOp are always checked as they perform
memory accesses regardless of type.

Signed-off-by: tyb0807 <[email protected]>
@tyb0807
Copy link
Contributor Author

tyb0807 commented Jan 10, 2026

I needed to relax the IndexExprsSpecified verification for vector-only ops (those without WaveTensorType operands/results), since after elements-per-thread propagation these ops no longer need index expressions. ReadOp and WriteOp are always checked though. Please take a look again @ftynse @tgymnich.

Signed-off-by: tyb0807 <[email protected]>
@tyb0807 tyb0807 merged commit 43a1af2 into iree-org:main Jan 12, 2026
14 of 15 checks passed
@tyb0807 tyb0807 deleted the idx_norm_form branch January 12, 2026 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants