Skip to content

dialects: (math) folders for floating point operations#5310

Draft
jumerckx wants to merge 2 commits intomainfrom
jumerckx/math_folders
Draft

dialects: (math) folders for floating point operations#5310
jumerckx wants to merge 2 commits intomainfrom
jumerckx/math_folders

Conversation

@jumerckx
Copy link
Collaborator

@jumerckx jumerckx commented Oct 4, 2025

I mostly limited myself to simple floating point operations that have a clear python counterpart. Only does folding with constant operands. No other identities are taken into account.

Open questions:
I'm wondering if these folders should work for types other than f64 (like I currently made them to)?
Also, any proposal on how to test it. Just with a single arbitrary input and checking they match the python function?

@jumerckx jumerckx self-assigned this Oct 4, 2025
@jumerckx jumerckx changed the title transformations: (math) folders for floating point operations dialects: (math) folders for floating point operations Oct 4, 2025
@jumerckx jumerckx added the dialects Changes on the dialects label Oct 4, 2025
@jumerckx jumerckx requested a review from superlopuh October 4, 2025 21:13
@codecov
Copy link

codecov bot commented Oct 4, 2025

Codecov Report

❌ Patch coverage is 33.92857% with 111 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.49%. Comparing base (ba33f21) to head (2236beb).

Files with missing lines Patch % Lines
xdsl/dialects/math.py 33.92% 111 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5310      +/-   ##
==========================================
- Coverage   85.67%   85.49%   -0.18%     
==========================================
  Files         373      373              
  Lines       52997    53138     +141     
  Branches     6019     6046      +27     
==========================================
+ Hits        45403    45431      +28     
- Misses       6139     6251     +112     
- Partials     1455     1456       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jumerckx
Copy link
Collaborator Author

jumerckx commented Oct 5, 2025

seems like math.cbrt and other functions don't exist in Python 3.10.

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.

1 participant