Skip to content

[optimizer] Replace value.nbytes with value.size #2399

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

Conversation

titaiwangms
Copy link
Contributor

To unify the size limitation in terms of the scale.

Passes use tensor size:
https://github.com/onnx/ir-py/blob/a833ab1e178c70046a414b96c1aafbf78a9b4e17/src/onnx_ir/passes/common/constant_manipulation.py#L124

while optimizer uses nbytes, which could potentially confuse users.

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!

@justinchuby
Copy link
Collaborator

Copy link

codecov bot commented Jun 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.38%. Comparing base (038cac7) to head (39af86f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2399   +/-   ##
=======================================
  Coverage   70.38%   70.38%           
=======================================
  Files         199      199           
  Lines       25223    25223           
  Branches     2686     2686           
=======================================
  Hits        17754    17754           
  Misses       6540     6540           
  Partials      929      929           

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

@titaiwangms
Copy link
Contributor Author

I should probably set a compatible default as the previous one (now in different scale...)

@justinchuby
Copy link
Collaborator

justinchuby commented Jun 18, 2025

@copilot can you help update the documentation? (ok maybe not)

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.

there is a merge conflict

@titaiwangms titaiwangms enabled auto-merge (squash) June 19, 2025 18:02
@titaiwangms titaiwangms merged commit 03ab4c5 into microsoft:main Jun 19, 2025
26 of 32 checks passed
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.

3 participants