-
Notifications
You must be signed in to change notification settings - Fork 31
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
Fold fill into max #954
Fold fill into max #954
Conversation
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.
Why is this restricted to max and not just any element-wise op?
I think this could be easily relax to all named ops. Processing generics is also doable but hassle. |
Fill folding together with broadcast folding finally improves named ops benchmarks. |
Looks like the two folders could be merged, it just requires more testing to see if I missed any edge cases. |
Adds pattern that folds linalg.fill into linalg.max and outputs combined linalg.generic.
A constant filled buffer is replaced by a single constant used directly in max operation on the elements of the other operand.
This allows to eliminate potential temporary buffer allocation and value initialization.