Skip to content

Conversation

@titaiwangms
Copy link
Contributor

Partially From #2598

This provides a better optimized graph after constant folding in terms of the number of nodes, which is better for debugging.

@codecov
Copy link

codecov bot commented Oct 20, 2025

Codecov Report

❌ Patch coverage is 91.89189% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.24%. Comparing base (45b5189) to head (c410cbc).

Files with missing lines Patch % Lines
onnxscript/optimizer/_constant_folding.py 80.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2650      +/-   ##
==========================================
- Coverage   70.41%   70.24%   -0.17%     
==========================================
  Files         224      224              
  Lines       26600    26605       +5     
  Branches     2645     2645              
==========================================
- Hits        18730    18689      -41     
- Misses       6945     6991      +46     
  Partials      925      925              

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

@titaiwangms
Copy link
Contributor Author

Need onnx/ir-py#227

@titaiwangms
Copy link
Contributor Author

This might be considered bc breaking in terms of graph changes.

Copy link
Collaborator

@justinchuby justinchuby left a comment

Choose a reason for hiding this comment

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

Thanks!

@titaiwangms titaiwangms merged commit 9e0366c into microsoft:main Oct 29, 2025
31 checks passed
@justinchuby
Copy link
Collaborator

Just making sure: is the replaced initializer immediately freed (if there is no users)? We need to do that to avoid memory usage jumps.

@titaiwangms
Copy link
Contributor Author

Just making sure: is the replaced initializer immediately freed (if there is no users)? We need to do that to avoid memory usage jumps.

I will check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

2 participants