Skip to content

Conversation

@tyb0807
Copy link
Contributor

@tyb0807 tyb0807 commented Jan 31, 2026

Lowering of read/write ops currently assumes PropagateElementsPerThread pass to have run, converting WaveTensorType results to VectorType. Enforce this using the vectors_in_registers normal form.

The VectorsInRegisters normal form verifies that:

  • wave.read ops have VectorType results
  • wave.write ops have VectorType operands (the value being stored)

This ensures PropagateElementsPerThread has run before LowerWaveToMLIR.

Fixes #676.

@tyb0807 tyb0807 requested review from ftynse and tgymnich January 31, 2026 00:09
Lowering of read/write ops currently assumes PropagateElementsPerThread
pass to have run, converting WaveTensorType results to VectorType.
Enforce this using the vectors_in_registers normal form.

The VectorsInRegisters normal form verifies that:
- wave.read ops have VectorType results
- wave.write ops have VectorType operands (the value being stored)

This ensures PropagateElementsPerThread has run before LowerWaveToMLIR.

Signed-off-by: tyb0807 <[email protected]>
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.

Use normal form to enforce precondition of lowering read/write ops

1 participant