-
Notifications
You must be signed in to change notification settings - Fork 79
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: (cf) switch canonicalization #3291
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3291 +/- ##
=======================================
Coverage 90.01% 90.02%
=======================================
Files 445 445
Lines 55956 56049 +93
Branches 5364 5378 +14
=======================================
+ Hits 50370 50458 +88
- Misses 4177 4180 +3
- Partials 1409 1411 +2 ☔ View full report in Codecov by Sentry. |
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.
nit: it's slightly confusing to have the block indices be different in the inputs and outputs
-> br ^bb2 | ||
""" | ||
case_values = switch.case_values | ||
if case_values is not None: |
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.
does it make sense for this to be optional? Shouldn't it be ()
by default?
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.
It is an optional property in mlir. I don't personally think it makes any sense but it is what it is
07fd41f
to
fc0e077
Compare
2ea46d1
to
51436cf
Compare
@superlopuh happy for this to be merged? |
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.
Thank you!
Adds all the switch canonicalization patterns present in mlir. --------- Co-authored-by: Sasha Lopoukhine <[email protected]>
Adds all the switch canonicalization patterns present in mlir. I'm happy to anonymise some of the block names in the filecheck tests if this is deemed worth doing.