Add Torch 2.10 with updated Torch and torchvision versions (#23808)
Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
1ce3b0c4e6
commit
381401e8af
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -288,6 +288,10 @@ jobs:
|
||||
python: "3.12"
|
||||
torch: "2.9.0"
|
||||
torchvision: "0.24.0"
|
||||
- os: ubuntu-latest
|
||||
python: "3.12"
|
||||
torch: "2.10.0"
|
||||
torchvision: "0.25.0"
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-python@v6
|
||||
|
||||
@ -187,6 +187,8 @@ def best_onnx_opset(onnx, cuda=False) -> int:
|
||||
"""Return max ONNX opset for this torch version with ONNX fallback."""
|
||||
if TORCH_2_4: # _constants.ONNX_MAX_OPSET first defined in torch 1.13
|
||||
opset = torch.onnx.utils._constants.ONNX_MAX_OPSET - 1 # use second-latest version for safety
|
||||
if TORCH_2_9:
|
||||
opset = min(opset, 20) # legacy TorchScript exporter caps at opset 20 in torch 2.9+
|
||||
if cuda:
|
||||
opset -= 2 # fix CUDA ONNXRuntime NMS squeeze op errors
|
||||
else:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user