Skip to content
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

Add a fold-add-into-dest pattern and pass #966

Merged
merged 7 commits into from
Sep 12, 2024

Conversation

rolfmorel
Copy link
Contributor

@rolfmorel rolfmorel commented Sep 7, 2024

Achieves the sum of linalg.add by relying on the accumulation semantics of contraction ops w.r.t. their out/dest argument. Main value is likely to come from that a buffer allocation can be elided, in case the contraction op had its own buffer.

@rolfmorel rolfmorel force-pushed the fold_add_into_dest branch 2 times, most recently from 87a318b to 93f8831 Compare September 7, 2024 14:05
@rolfmorel rolfmorel marked this pull request as ready for review September 8, 2024 13:44
@rolfmorel
Copy link
Contributor Author

This PR is now ready for review.

Do let me know if adding it to the default pipeline is appropriate and whether I added it in the right place.

@adam-smnk
Copy link
Collaborator

Could you add some lit tests?

@rolfmorel
Copy link
Contributor Author

Could you add some lit tests?

Oops - forget to push. Pushed them now.

lib/TPP/Transforms/FoldAddIntoDest.cpp Outdated Show resolved Hide resolved
lib/TPP/Transforms/FoldAddIntoDest.cpp Outdated Show resolved Hide resolved
lib/TPP/Transforms/FoldAddIntoDest.cpp Show resolved Hide resolved
lib/TPP/Transforms/FoldAddIntoDest.cpp Show resolved Hide resolved
Achieves the sum of linalg.add by relying on the accumulation semantics
of contraction ops w.r.t. their out/dest argument. Main value is likely
to come from that a buffer allocation can be elided, in case the
contraction op had its own buffer.
@rolfmorel rolfmorel merged commit f4068c1 into plaidml:main Sep 12, 2024
6 checks passed
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.

2 participants