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

Fold into eltwise pass #953

Merged
merged 2 commits into from
Aug 8, 2024

Conversation

adam-smnk
Copy link
Collaborator

Adds pass that folds operations into elementwise Linalg ops. Combined operations are rewritten into a single linalg.generic.

Initially, a pattern for folding broadcast producer into an elementwise consumer is added.
This allows to improve layout propagation, allows for fusion after tiling, and reduces the number of temporary buffers by eliminating explicit broadcast.

@adam-smnk adam-smnk added the benchmark Triggers benchmark jobs label Aug 7, 2024
@adam-smnk adam-smnk requested a review from rengolin August 7, 2024 18:48
Copy link
Contributor

@rengolin rengolin left a comment

Choose a reason for hiding this comment

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

Nice. I guess this could be an upstream pass. But it would be easier to get it merged once we have the broadcast semantics added to element-wise named ops.

@adam-smnk
Copy link
Collaborator Author

this could be an upstream pass.

Yes, it should be pretty generic but

But it would be easier to get it merged once we have the broadcast semantics added to element-wise named ops.

Agreed here. With these new semantics it would be much cleaner and we can avoid going down to generic.

@adam-smnk adam-smnk merged commit ce33de5 into plaidml:main Aug 8, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Triggers benchmark jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants