-
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: (builtin) add PackableType and StructPackableType #3581
Conversation
_PyT = TypeVar("_PyT") | ||
|
||
|
||
class PackableType(Generic[_PyT], FixedBitwidthType, ABC): |
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.
Do we want to combine the FixedBitwidthType
and PackableType
? Maybe we are mixing host bitdwidth with target bitwidth? The target system could for example have support for i4
types, but will be packed as i8
at compile time.
Maybe this is too niche, I'm just not to sure about this one, the two concepts just seem to have little in common
Or f80
or f128
for example, they are not packable, but do have a fixed bitwidth
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.
Starting to change my mind about this, if something has a fixedbitwidthtype it should be packable, just not necessarily packable with that specified fixed bitwidth. I guess it thus makes sense to keep them together
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3581 +/- ##
==========================================
+ Coverage 90.40% 90.43% +0.02%
==========================================
Files 469 469
Lines 58941 59061 +120
Branches 5611 5615 +4
==========================================
+ Hits 53287 53410 +123
+ Misses 4213 4211 -2
+ Partials 1441 1440 -1 ☔ View full report in Codecov by Sentry. |
These helper functions will help us deal with dense representations of values.