File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616"""Model optimization subpackage for onnx."""
1717
1818import sys
19+ import warnings
1920
2021MIN_PYTHON_VERSION = (3 , 10 )
2122
2627 raise ImportError (f"{ e } \n Please install optional ``[onnx]`` dependencies." )
2728
2829
30+ if sys .version_info < (3 , 11 ):
31+ warnings .warn (
32+ "`modelopt.onnx` package will drop python<3.11 support in a future release" ,
33+ DeprecationWarning ,
34+ )
35+
2936# Check the current Python version
3037if sys .version_info < MIN_PYTHON_VERSION :
3138 logger .warning (
Original file line number Diff line number Diff line change 4848 "onnx-graphsurgeon" ,
4949 "onnx~=1.19.0" ,
5050 "onnxconverter-common~=1.16.0" ,
51- "onnxruntime~=1.24.2 ; platform_machine == 'aarch64' or platform_system == 'Darwin'" ,
52- "onnxruntime-gpu~=1.24.2 ; platform_machine != 'aarch64' and platform_system != 'Darwin' and platform_system != 'Windows'" , # noqa: E501
51+ # ORT with Python > 3.10
52+ "onnxruntime~=1.24.2 ; python_version > '3.10' and (platform_machine == 'aarch64' or platform_system == 'Darwin')" , # noqa: E501
53+ "onnxruntime-gpu~=1.24.2 ; python_version > '3.10' and platform_machine != 'aarch64' and platform_system != 'Darwin' and platform_system != 'Windows'" , # noqa: E501
54+ # ORT with Python <= 3.10
55+ "onnxruntime~=1.22.0 ; python_version <= '3.10' and (platform_machine == 'aarch64' or platform_system == 'Darwin')" , # noqa: E501
56+ "onnxruntime-gpu~=1.22.0 ; python_version <= '3.10' and platform_machine != 'aarch64' and platform_system != 'Darwin' and platform_system != 'Windows'" , # noqa: E501
57+ # ORT for Windows
5358 "onnxruntime-gpu==1.22.0; platform_system == 'Windows'" ,
5459 "onnxscript" , # For autocast opset conversion and test_onnx_dynamo_export unit test
5560 "onnxslim>=0.1.76" ,
You can’t perform that action at this time.
0 commit comments