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: (arith-to-varith) Support more cases #3330

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

n-io
Copy link
Collaborator

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

In some edge-cases a single arith op was not folded away. This should be fixed now.

@n-io n-io added minor For minor PRs, easy and quick to review, quickly mergeable transformations Changes or adds a transformatio labels Oct 22, 2024
@n-io n-io self-assigned this Oct 22, 2024
@@ -209,6 +200,7 @@ def apply(self, ctx: MLContext, op: builtin.ModuleOp) -> None:
MergeVarithOpsPattern(),
]
),
walk_reverse=True,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is needed to ensure all ops are folded away.

@tobiasgrosser
Copy link
Contributor

Thank you, @n-io. This is great. Maybe @emmau678 can offer a review?

Copy link

codecov bot commented Oct 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.04%. Comparing base (6c736f7) to head (de971f6).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3330      +/-   ##
==========================================
- Coverage   90.04%   90.04%   -0.01%     
==========================================
  Files         446      446              
  Lines       56330    56327       -3     
  Branches     5405     5403       -2     
==========================================
- Hits        50720    50717       -3     
  Misses       4183     4183              
  Partials     1427     1427              

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

Copy link
Contributor

@tobiasgrosser tobiasgrosser left a comment

Choose a reason for hiding this comment

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

This looks good from my side.

@n-io n-io merged commit 8781282 into main Oct 23, 2024
14 checks passed
@n-io n-io deleted the nicolai/arith-to-varith-fix branch October 23, 2024 11:59
EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this pull request Dec 6, 2024
In some edge-cases a single arith op was not folded away. This should be
fixed now.

---------

Co-authored-by: n-io <n-io@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
minor For minor PRs, easy and quick to review, quickly mergeable transformations Changes or adds a transformatio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants