Support torch 2.6.0

This commit is contained in:
Fangjun Kuang 2025-01-30 08:18:23 +08:00
parent c1aefb643e
commit f6b5c667b6
2 changed files with 26 additions and 1 deletions

View File

@ -277,10 +277,18 @@ def generate_build_matrix(enable_cuda, for_windows, for_macos, test_only_latest_
else ["11.8.0", "12.1.0", "12.4.0"]
),
},
"2.6.0": {
"python-version": ["3.9", "3.10", "3.11", "3.12", "3.13"],
"cuda": (
["11.8", "12.4", "12.6"] # default 12.4
if not for_windows
else ["11.8.0", "12.4.0", "12.6.0"]
),
},
# https://github.com/Jimver/cuda-toolkit/blob/master/src/links/windows-links.ts
}
if test_only_latest_torch:
latest = "2.5.0"
latest = "2.6.0"
matrix = {latest: matrix[latest]}
if for_windows or for_macos:

View File

@ -247,6 +247,23 @@ case ${torch} in
;;
esac
;;
2.6.*)
case ${cuda} in
11.8)
package="torch==${torch}+cu118"
# https://download.pytorch.org/whl/nightly/torch/
url=https://download.pytorch.org/whl/torch/
;;
12.4)
package="torch==${torch}+cu124"
url=https://download.pytorch.org/whl/torch/
;;
12.6)
package="torch==${torch}+cu126"
url=https://download.pytorch.org/whl/torch/
;;
esac
;;
*)
echo "Unsupported PyTorch version: ${torch}"
exit 1