-
Notifications
You must be signed in to change notification settings - Fork 85
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: (csl) handle negative-valued task ID representation #3558
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3558 +/- ##
========================================
Coverage 90.39% 90.40%
========================================
Files 466 467 +1
Lines 58722 58843 +121
Branches 5593 5603 +10
========================================
+ Hits 53083 53196 +113
- Misses 4204 4205 +1
- Partials 1435 1442 +7 ☔ View full report in Codecov by Sentry. |
I think this makes sense, even if it is really odd to see a negative task ID in the IR. As a sidenote, it would've probably been better to have made this an |
There are probably a few things to do, and making it an unsigned integer is also an option, especially if you'll not do any more arithmetic with it once you pin it down. If you'd like, I can do that in this PR instead? |
I decided to try it out, happy to revert to previous version if you'd like to keep the IDs signless. |
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.
Looks good, @dk949 ?
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.
I like this, it exactly expresses the constraints on these values in the types.
i6 and friends are signless, meaning that they are bitpatterns that don't have an inherent value. When printing CSL, we currently take the raw data of the IntegerAttr, but it seems like that's not valid for task identifiers, which are positive. This PR changes the printer to always print the unsigned version of the number, and adds a test case to the CSL filecheck.