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

dialects: (builtin) add PackableType and StructPackableType #3581

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

superlopuh
Copy link
Member

These helper functions will help us deal with dense representations of values.

@superlopuh superlopuh added the dialects Changes on the dialects label Dec 6, 2024
@superlopuh superlopuh self-assigned this Dec 6, 2024
xdsl/dialects/builtin.py Show resolved Hide resolved
_PyT = TypeVar("_PyT")


class PackableType(Generic[_PyT], FixedBitwidthType, ABC):
Copy link
Collaborator

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

Copy link
Collaborator

@jorendumoulin jorendumoulin Dec 6, 2024

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

Copy link

codecov bot commented Dec 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.43%. Comparing base (d4f5795) to head (c22f6b9).
Report is 7 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@superlopuh superlopuh merged commit f05a23b into main Dec 6, 2024
15 checks passed
@superlopuh superlopuh deleted the sasha/builtin/fixed-bitwidth-type-type branch December 6, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dialects Changes on the dialects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants