Skip to content

[water] add apply_expr#869

Open
tgymnich wants to merge 5 commits intomainfrom
tim/apply-expr
Open

[water] add apply_expr#869
tgymnich wants to merge 5 commits intomainfrom
tim/apply-expr

Conversation

@tgymnich
Copy link
Contributor

@tgymnich tgymnich commented Feb 11, 2026

No description provided.

@tgymnich tgymnich linked an issue Feb 11, 2026 that may be closed by this pull request
@tgymnich tgymnich force-pushed the tim/apply-expr branch 2 times, most recently from f3c53fd to 472270a Compare February 11, 2026 16:05
Comment on lines 670 to 674
// Accept both WaveTensorType (before PropagateElementsPerThread) and
// 1D vectors (after). We cannot use Variadic<WaveTensorInRegister> because
// Variadic requires a Type and not a TypeConstraint.
let arguments = !con((ins
Arg<Variadic<WaveIterableType>, "Input registers">:$arguments,
Copy link
Contributor

Choose a reason for hiding this comment

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

This does use WaveIterableType though, which I suspect is a workaround

Copy link
Contributor

Choose a reason for hiding this comment

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

TODO @ftynse : it seems possible to define Type instead of TypeConstraint to solve this locally. Take inspiration from what is done with Attr in this PR.

// Variadic requires a Type and not a TypeConstraint.
let arguments = !con((ins
Arg<Variadic<WaveIterableType>, "Input registers">:$arguments,
Arg<WaveExprListAttr, "Expression to apply">:$expr
Copy link
Contributor

Choose a reason for hiding this comment

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

At this point, we should just have a WaveExprAttr (which may internally be a list + verifier for single result, but I'm not even sure we still need actual lists).

@ftynse ftynse self-assigned this Feb 13, 2026
@ftynse
Copy link
Contributor

ftynse commented Feb 13, 2026

Taking this over

@ftynse ftynse marked this pull request as ready for review February 13, 2026 13:42
tgymnich and others added 5 commits February 16, 2026 12:30
Signed-off-by: Tim Gymnich <tim@gymni.ch>
- use direct positional encoding of operands instead of names and
  unnecessary ordering constraints
- fix tests
- introduce an attribute constraint to restrict the kinds of symbols
  that may appear in index expressions, use it for various ops

Signed-off-by: Alex Zinenko <git@ozinenko.com>
via direct expansion of affine expressions

Signed-off-by: Alex Zinenko <git@ozinenko.com>
Signed-off-by: Alex Zinenko <git@ozinenko.com>
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 apply-expr operation

2 participants