Skip to content

Conversation

@m-gupta
Copy link
Contributor

@m-gupta m-gupta commented Dec 1, 2025

onnx 1.20 has removed some float convcersion helpers in favor of using ml_dtype package. Use ml_dtypes to fix onnx_graphsurgeon import errors.

Fixes #4635

@m-gupta m-gupta requested a review from a team as a code owner December 1, 2025 21:56
onnx 1.20 has removed some float convcersion helpers in favor of
using ml_dtypes package. Use ml_dtypes to fix onnx_graphsurgeon
import errors.

Fixes NVIDIA#4635

Signed-off-by: Manoj Gupta <[email protected]>
@m-gupta m-gupta changed the title WIP: 4635: Use ml_dtypes to fix onnx_graphsurgeon import error Issue #4635: Use ml_dtypes to fix onnx_graphsurgeon import error Dec 2, 2025
@onuralpszr
Copy link

@kevinch-nv @yuanyao-nv friendly ping for PR that would help us to upgrade newest onnx as well. Thank you in advance !! :)

Copy link
Collaborator

@yuanyao-nv yuanyao-nv left a comment

Choose a reason for hiding this comment

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

Thanks for the contributions!

@yuanyao-nv yuanyao-nv merged commit fbb76a3 into NVIDIA:main Dec 11, 2025
1 check passed
@onuralpszr
Copy link

Hello again, @yuanyao-nv thank you for merging, great to see it. Any time line for release to "pypi" ? That would great great to know. Thank you in advance

@yuanyao-nv
Copy link
Collaborator

@onuralpszr Have you tried running the tests. I noticed some tests are broken by these changes.

@m-gupta
Copy link
Contributor Author

m-gupta commented Dec 13, 2025

Patch author here. Are there any instructions on how to run the tests? And shouldn't CI have caught any issues.

@yuanyao-nv
Copy link
Collaborator

@m-gupta You can just run pytest in the graph-surgeon directory. Unfortunately this repo doesn't currently run CI as it's not a development repo.

@m-gupta
Copy link
Contributor Author

m-gupta commented Dec 17, 2025

@yuanyao-nv I currently do not have time to look into it. Despite what ml_dtypes say, the values are not really same atleast when printing and comparing though tobytes return the same thing. Also numpy float32 does not account for shape. Sp Please feel free to revert.

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.

onnx_graphsurgeon incompatible with ONNX 1.20.0

3 participants