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) verify that the elements of dense satisfy type #3544

Merged
merged 2 commits into from
Nov 29, 2024

Conversation

superlopuh
Copy link
Member

Instead of scary doc string, warn the user at the point of DenseArrayBase parsing/creation.

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.37%. Comparing base (eaa9371) to head (ef290bc).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3544   +/-   ##
=======================================
  Coverage   90.36%   90.37%           
=======================================
  Files         466      466           
  Lines       58522    58545   +23     
  Branches     5583     5585    +2     
=======================================
+ Hits        52886    52909   +23     
  Misses       4207     4207           
  Partials     1429     1429           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@jorendumoulin jorendumoulin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

When converting to bytes type, we'll probably have to adjust the ranges of the Signedness values to the ones of struct.pack, or add some preprocessing logic.

>>> pack('@b', 128)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
struct.error: 'b' format requires -128 <= number <= 127

Copy link
Collaborator

@math-fehr math-fehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@superlopuh superlopuh merged commit 9e66e8e into main Nov 29, 2024
15 checks passed
@superlopuh superlopuh deleted the sasha/builtin/verify-bitwidths branch November 29, 2024 14:33
EdmundGoodman pushed a commit to EdmundGoodman/xdsl that referenced this pull request Dec 6, 2024
…dslproject#3544)

Instead of scary doc string, warn the user at the point of
DenseArrayBase parsing/creation.
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