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

transformations: New linalg-fuse-multiply-add pass #3347

Merged
merged 2 commits into from
Oct 28, 2024
Merged

Conversation

n-io
Copy link
Collaborator

@n-io n-io commented Oct 26, 2024

Introduces a new pass to fuse linalg.mul and linalg.add into linalg.generic with the functionality of an FMA op.

@n-io n-io added the transformations Changes or adds a transformatio label Oct 26, 2024
@n-io n-io self-assigned this Oct 26, 2024
@n-io
Copy link
Collaborator Author

n-io commented Oct 26, 2024

This is a replacement for #3344 @superlopuh @AntonLydike

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.09%. Comparing base (8c332bd) to head (b96b60e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3347   +/-   ##
=======================================
  Coverage   90.08%   90.09%           
=======================================
  Files         446      447    +1     
  Lines       56443    56494   +51     
  Branches     5427     5431    +4     
=======================================
+ Hits        50845    50896   +51     
  Misses       4163     4163           
  Partials     1435     1435           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@superlopuh superlopuh left a comment

Choose a reason for hiding this comment

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

The code looks good, although my understanding is that linalg is not designed to be used in this way, and instead fuses after tiling. I wonder if there's a similar direction for you to look into, maybe for later.

@n-io
Copy link
Collaborator Author

n-io commented Oct 26, 2024

It made sense in my mind to do this sort of op fusion before bufferization, though maybe it doesn't make a difference?

@n-io n-io merged commit 3c60932 into main Oct 28, 2024
14 checks passed
@n-io n-io deleted the nicolai/linalg-fuse-fma branch October 28, 2024 10:11
EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this pull request Dec 6, 2024
Introduces a new pass to fuse `linalg.mul` and `linalg.add` into
`linalg.generic` with the functionality of an FMA op.

---------

Co-authored-by: n-io <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants