-
Notifications
You must be signed in to change notification settings - Fork 77
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
dialects: (arith) adding an arith canonicalisation pattern #2094
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.
can you please add a filecheck test for this?
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dalia/interactive_individual_rewrite_1 #2094 +/- ##
==========================================================================
- Coverage 90.13% 90.12% -0.01%
==========================================================================
Files 296 297 +1
Lines 36799 36779 -20
Branches 5464 5461 -3
==========================================================================
- Hits 33168 33148 -20
+ Misses 2853 2852 -1
- Partials 778 779 +1 ☔ View full report in Codecov by Sentry. |
…ractive_add_arith_canon_2
…ractive_add_arith_canon_2
…ractive_add_arith_canon_2
…ractive_add_arith_canon_2
…ractive_add_arith_canon_2
pattern.match_and_rewrite(matched_operation, rewriter) | ||
if not rewriter.has_done_action: | ||
raise ValueError("Invalid rewrite at current location.") |
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.
To me, this feels like a case that should have a warning instead of an exception. It feels like this might make it hard to interact with this pass through scripts and stuff.
Though, I guess people consider exceptional control flow for basic stuff acceptable in Python, so this is just a side comment.
PR 2 out of 4.
Added an arith canonicalisation pattern to use as an example/ starting point to extending arith canonicalisation patterns.