Skip to content

Comments

[water] add wave.permute op#759

Merged
tgymnich merged 1 commit intomainfrom
tim/permute-op
Feb 9, 2026
Merged

[water] add wave.permute op#759
tgymnich merged 1 commit intomainfrom
tim/permute-op

Conversation

@tgymnich
Copy link
Contributor

@tgymnich tgymnich commented Jan 20, 2026

Add wave.permute op that permutes dimensions of a WaveTensorInRegister.
Lowers to a no-op, but modifies propagation of index expressions by permuting the strides according to target_shape.

@tgymnich tgymnich linked an issue Jan 20, 2026 that may be closed by this pull request
@tgymnich tgymnich force-pushed the tim/permute-op branch 4 times, most recently from 474d06e to 9dd20e3 Compare January 22, 2026 14:24
@tgymnich tgymnich marked this pull request as ready for review January 22, 2026 14:27
Copy link
Contributor

@martin-luecke martin-luecke left a comment

Choose a reason for hiding this comment

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

wave.permute uses the new CompatibleOperandsAndResultsIgnoreShapeOpTrait as verifier for its input and return values, which ignores the shape entirely.
But for a permute the rank should match, and the target_shape should be a permutation of the input symbols. I think we should enforce this in the verifier, otherwise we can end up with mismatched ranks or symbol sets that later assert (e.g., zip_equal) or mis‑infer.

Also, I think I found a couple of propagation issues I’ve flagged inline.

@tgymnich tgymnich force-pushed the tim/permute-op branch 5 times, most recently from 47200f9 to b96f4d3 Compare January 28, 2026 10:02
Copy link
Contributor

@martin-luecke martin-luecke left a comment

Choose a reason for hiding this comment

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

With the changes this LGTM with a few nits still to address

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.

Nice, LGTM % nits

@tgymnich tgymnich force-pushed the tim/permute-op branch 4 times, most recently from 18fb408 to abfbda5 Compare February 6, 2026 16:24
Signed-off-by: Tim Gymnich <tim@gymni.ch>
@tgymnich tgymnich merged commit 97cf45e into main Feb 9, 2026
15 checks passed
@tgymnich tgymnich deleted the tim/permute-op branch February 9, 2026 04:09
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.

[water] Implement wave.permute

3 participants