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

core: split print_float into print_float and print_float_attr #3600

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

jorendumoulin
Copy link
Collaborator

To allow for printing floats that are not FloatAttrs but the type is known (such as for bytes-backed DenseIntOrFPElementsAttrs), this changes the print_float implementation to accept raw floats with a known type.

@jorendumoulin jorendumoulin changed the title misc: split print_float into print_float and print_float_attr core: split print_float into print_float and print_float_attr Dec 9, 2024
@jorendumoulin jorendumoulin self-assigned this Dec 9, 2024
@jorendumoulin jorendumoulin added the core xDSL core (ir, textual format, ...) label Dec 9, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.39%. Comparing base (4bbeecb) to head (7ac383f).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3600   +/-   ##
=======================================
  Coverage   90.38%   90.39%           
=======================================
  Files         469      469           
  Lines       59075    59102   +27     
  Branches     5615     5616    +1     
=======================================
+ Hits        53397    53423   +26     
  Misses       4232     4232           
- Partials     1446     1447    +1     

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

@tobiasgrosser
Copy link
Contributor

Is there a way we can add a test case to this PR?

Copy link
Collaborator

@alexarice alexarice left a comment

Choose a reason for hiding this comment

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

I think there are some other places where we print floats manually but did know the type, however it'd be fine to catch these later.

@jorendumoulin
Copy link
Collaborator Author

Is there a way we can add a test case to this PR?

I have added some tests!

@jorendumoulin jorendumoulin merged commit b88d7ad into main Dec 9, 2024
15 checks passed
@jorendumoulin jorendumoulin deleted the joren/float-printer branch December 9, 2024 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core xDSL core (ir, textual format, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants