-
Notifications
You must be signed in to change notification settings - Fork 211
[5680954,5620660@2][ONNX][Autocast] Update value info in converted graph #611
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
Merged
gcunhase
merged 3 commits into
NVIDIA:main
from
gcunhase:dev/gcunhasergio/5680954_autocast_cast_out_type_issue
Dec 4, 2025
Merged
[5680954,5620660@2][ONNX][Autocast] Update value info in converted graph #611
gcunhase
merged 3 commits into
NVIDIA:main
from
gcunhase:dev/gcunhasergio/5680954_autocast_cast_out_type_issue
Dec 4, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #611 +/- ##
==========================================
+ Coverage 74.66% 74.68% +0.01%
==========================================
Files 183 183
Lines 18550 18552 +2
==========================================
+ Hits 13851 13856 +5
+ Misses 4699 4696 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
galagam
reviewed
Nov 30, 2025
b3dd817 to
4503e1a
Compare
galagam
approved these changes
Dec 4, 2025
Signed-off-by: gcunhase <[email protected]>
Signed-off-by: gcunhase <[email protected]>
Signed-off-by: gcunhase <[email protected]>
4503e1a to
815ebf7
Compare
kevalmorabia97
pushed a commit
that referenced
this pull request
Dec 7, 2025
…aph (#611) ## What does this PR do? **Type of change:** Bug fix **Overview:** Some tensor's precision weren't set in the ONNX graph (`value_info`) when converting the model with Autocast. This caused ONNX-Graphsurgeon to incorrectly interpret those precisions in `gs.import_onnx(ModelProto)`, which caused quantization of the converted model to fail. ## Usage ```python $ python -m modelopt.onnx.autocast --onnx_path=$MODEL_NAME.onnx --keep_io_types $ python -m modelopt.onnx.quantization --onnx_path=$MODEL_NAME.fp16.onnx --calibration_eps cpu ``` ## Testing See bug 5680954@12. ## Before your PR is "*Ready for review*" <!-- If you haven't finished some of the above items you can still open `Draft` PR. --> - **Make sure you read and follow [Contributor guidelines](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CONTRIBUTING.md)** and your commits are signed. - **Is this change backward compatible?**: Yes - **Did you write any new necessary tests?**: No - **Did you add or update any necessary documentation?**: No - **Did you update [Changelog](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CHANGELOG.rst)?**: No --------- Signed-off-by: gcunhase <[email protected]>
soodoshll
pushed a commit
to soodoshll/TensorRT-Model-Optimizer
that referenced
this pull request
Dec 8, 2025
…aph (NVIDIA#611) ## What does this PR do? **Type of change:** Bug fix **Overview:** Some tensor's precision weren't set in the ONNX graph (`value_info`) when converting the model with Autocast. This caused ONNX-Graphsurgeon to incorrectly interpret those precisions in `gs.import_onnx(ModelProto)`, which caused quantization of the converted model to fail. ## Usage ```python $ python -m modelopt.onnx.autocast --onnx_path=$MODEL_NAME.onnx --keep_io_types $ python -m modelopt.onnx.quantization --onnx_path=$MODEL_NAME.fp16.onnx --calibration_eps cpu ``` ## Testing See bug 5680954@12. ## Before your PR is "*Ready for review*" <!-- If you haven't finished some of the above items you can still open `Draft` PR. --> - **Make sure you read and follow [Contributor guidelines](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CONTRIBUTING.md)** and your commits are signed. - **Is this change backward compatible?**: Yes - **Did you write any new necessary tests?**: No - **Did you add or update any necessary documentation?**: No - **Did you update [Changelog](https://github.com/NVIDIA/TensorRT-Model-Optimizer/blob/main/CHANGELOG.rst)?**: No --------- Signed-off-by: gcunhase <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Type of change: Bug fix
Overview: Some tensor's precision weren't set in the ONNX graph (
value_info) when converting the model with Autocast. This caused ONNX-Graphsurgeon to incorrectly interpret those precisions ings.import_onnx(ModelProto), which caused quantization of the converted model to fail.Usage
Testing
See bug 5680954@12.
Before your PR is "Ready for review"