Files
pytorch/torch/onnx/_constants.py
Justin Chu 767791943d [ONNX] Set default opset to 20 (#158802)
Bump default opset to 20, which is a newer opset and the max torchscript exporter supports.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/158802
Approved by: https://github.com/titaiwangms
2025-07-22 19:55:05 +00:00

25 lines
531 B
Python

"""Constant values used in ONNX."""
ONNX_ARCHIVE_MODEL_PROTO_NAME = "__MODEL_PROTO"
ONNX_BASE_OPSET = 9
ONNX_MIN_OPSET = 7
ONNX_MAX_OPSET = 23
ONNX_TORCHSCRIPT_EXPORTER_MAX_OPSET = 20
ONNX_DEFAULT_OPSET = 20
ONNX_CONSTANT_FOLDING_MIN_OPSET = 9
PYTORCH_GITHUB_ISSUES_URL = "https://github.com/pytorch/pytorch/issues"
INT64_MAX = 9223372036854775807
INT32_MAX = 2147483647
INT16_MAX = 32767
INT8_MAX = 127
UINT8_MAX = 255
INT64_MIN = -9223372036854775808
INT32_MIN = -2147483648
INT16_MIN = -32768
INT8_MIN = -128
UINT8_MIN = 0