-
Notifications
You must be signed in to change notification settings - Fork 76
[Triton] Add canonicalization patterns for tt.reduce
#2591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Add canonicalization pattern replacing `tt.reduce` with axis of size 1 with a `tt.reshape` operation. This may leverage further optimizations and simplifications. Signed-off-by: victor-eds <[email protected]>
|
|
18219bf to
45f1dbb
Compare
sommerlukas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this also be a candidate for upstreaming?
|
This enables further simplification of code generated with #2266 |
Yes, I added the label for that |
Question: do you plan to upstream this first or shall we land it downstream first and do that separately? |
Upstream and get the changes when rebasing on upstream. No rush for this change. |
etiotto
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Upstream PR: triton-lang/triton#5024 |
|
Closing as won't fix for now as it isn't that high priority and there are some issues with the reshape instruction itself that make this complicated. |
Add canonicalization pattern replacing
tt.reducewith axis of size 1 with att.reshapeoperation.This may enable further optimizations and simplifications.