Skip to content

Conversation

@gcunhase
Copy link
Contributor

@gcunhase gcunhase commented Oct 24, 2025

What does this PR do?

Type of change: ?

Overview: Fixed regression introduced by #364.

  1. Detect ops not supported in lower precision and block them from being converted.
  2. Postponed infer_shapes to PrecisionConverter.convert() to fix type propagation mismatches.
  3. Created utils to get the model's opset version.
  4. Moved lib_test_models.py one level up (from _test_utils.onnx.quantization to _test_utils.onnx), as the model zoo is also needed in the autocast testing workflow.

Usage

$ python -m modelopt.onnx.autocast --onnx_path=$MODEL_NAME.onnx
$ python -m modelopt.onnx.quantization --onnx_path=$MODEL_NAME.onnx

Testing

  • Added unittest in quantization and autocast.
  • Verified with models in bug 5590225 and 5532019.

Before your PR is "Ready for review"

  • Make sure you read and follow Contributor guidelines and your commits are signed.
  • Is this change backward compatible?: Yes
  • Did you write any new necessary tests?: Yes
  • Did you add or update any necessary documentation?: No
  • Did you update Changelog?: No

@gcunhase gcunhase requested a review from a team as a code owner October 24, 2025 19:45
@gcunhase gcunhase requested a review from galagam October 24, 2025 19:45
@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.49%. Comparing base (47ddd14) to head (23f0994).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #462      +/-   ##
==========================================
+ Coverage   73.45%   73.49%   +0.04%     
==========================================
  Files         180      180              
  Lines       18141    18171      +30     
==========================================
+ Hits        13325    13355      +30     
  Misses       4816     4816              

☔ 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.

@gcunhase gcunhase requested a review from ajrasane October 24, 2025 20:21
@gcunhase gcunhase force-pushed the dev/gcunhasergio/fix_regression_fp64_to_fp32_5590225 branch from 9e53bf5 to 0410a67 Compare November 5, 2025 15:14
@gcunhase gcunhase requested a review from a team as a code owner November 5, 2025 16:33
@gcunhase gcunhase enabled auto-merge (squash) November 5, 2025 16:37
@gcunhase gcunhase merged commit 69c258f into NVIDIA:main Nov 5, 2025
26 checks passed
kevalmorabia97 pushed a commit that referenced this pull request Nov 8, 2025
mxinO pushed a commit that referenced this pull request Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants