Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions tools/pkg-helpers/pytorch_pkg_helpers/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
WINDOWS_PATH_PREFIX = "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v"


def get_cuda_arch_list(sanitized_version: str) -> str:
base_arch_list = "5.0+PTX;6.0;7.0;7.5;8.0;8.6;9.0"
if float(sanitized_version) >= 12.0:
if sanitized_version == "12.8":
return base_arch_list + ";10.0;12.0"
return base_arch_list
if float(sanitized_version) > 11.3:
return "3.5;5.0+PTX;6.0;7.0;7.5;8.0;8.6"
# mainly for cuda 10.2
return "3.5;5.0+PTX;6.0;7.0;7.5"
def get_cuda_arch_list(sanitized_version: str, package_type: str = "") -> str:
# Fallback for other versions - maintain backward compatibility
base_arch_list = (
"5.0;6.0;7.0;7.5;8.0;8.6;9.0" # default arch list for the stable versions
)
# removing sm_50-sm_60 as these architectures are deprecated in CUDA 12.8/9 and will be removed in future releases
# however we would like to keep sm_70 architecture see: https://github.com/pytorch/pytorch/issues/157517
if sanitized_version == "12.8":
return "7.0;7.5;8.0;8.6;9.0;10.0;12.0"
elif sanitized_version == "12.9":
return "7.0;7.5;8.0;8.6;9.0;10.0;12.0+PTX"
elif sanitized_version == "13.0":
return "7.5;8.0;8.6;9.0;10.0;12.0+PTX"
return base_arch_list


def get_cuda_variables(
Expand Down
6 changes: 5 additions & 1 deletion tools/scripts/generate_binary_build_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"release": ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13t"],
}
CUDA_ARCHES_DICT = {
"nightly": ["12.6", "12.8", "12.9"],
"nightly": ["12.6", "12.8", "12.9", "13.0"],
"test": ["12.6", "12.8", "12.9"],
"release": ["12.6", "12.8", "12.9"],
}
Expand All @@ -43,6 +43,7 @@
"12.6": {"cuda": "12.6.3", "cudnn": "9"},
"12.8": {"cuda": "12.8.0", "cudnn": "9"},
"12.9": {"cuda": "12.9.1", "cudnn": "9"},
"13.0": {"cuda": "13.0.0", "cudnn": "9"},
}

STABLE_CUDA_VERSIONS = {
Expand Down Expand Up @@ -445,6 +446,9 @@ def generate_wheels_matrix(
upload_to_base_bucket = "no"
if os in (LINUX, WINDOWS):
arches += CUDA_ARCHES
# todo: remove once windows cuda 13.0 binaries are available
if channel == NIGHTLY and os != LINUX:
arches.remove("13.0")
elif os == LINUX_AARCH64:
arches += CUDA_AARCH64_ARCHES

Expand Down
105 changes: 105 additions & 0 deletions tools/tests/assets/build_matrix_linux_wheel_cuda.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.10",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_10-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.10",
"gpu_arch_type": "rocm",
Expand Down Expand Up @@ -150,6 +165,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.11",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_11-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.11",
"gpu_arch_type": "rocm",
Expand Down Expand Up @@ -240,6 +270,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.12",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_12-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.12",
"gpu_arch_type": "rocm",
Expand Down Expand Up @@ -330,6 +375,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_13-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13",
"gpu_arch_type": "rocm",
Expand Down Expand Up @@ -420,6 +480,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13t",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_13t-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13t",
"gpu_arch_type": "rocm",
Expand Down Expand Up @@ -510,6 +585,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_14-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14",
"gpu_arch_type": "rocm",
Expand Down Expand Up @@ -600,6 +690,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14t",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_14t-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14t",
"gpu_arch_type": "rocm",
Expand Down
105 changes: 105 additions & 0 deletions tools/tests/assets/build_matrix_linux_wheel_cuda_norocm.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.10",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_10-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.11",
"gpu_arch_type": "cpu",
Expand Down Expand Up @@ -120,6 +135,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.11",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_11-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.12",
"gpu_arch_type": "cpu",
Expand Down Expand Up @@ -180,6 +210,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.12",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_12-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13",
"gpu_arch_type": "cpu",
Expand Down Expand Up @@ -240,6 +285,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_13-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13t",
"gpu_arch_type": "cpu",
Expand Down Expand Up @@ -300,6 +360,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.13t",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_13t-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14",
"gpu_arch_type": "cpu",
Expand Down Expand Up @@ -360,6 +435,21 @@
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_14-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14t",
"gpu_arch_type": "cpu",
Expand Down Expand Up @@ -419,6 +509,21 @@
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
},
{
"python_version": "3.14t",
"gpu_arch_type": "cuda",
"gpu_arch_version": "13.0",
"desired_cuda": "cu130",
"container_image": "pytorch/manylinux2_28-builder:cuda13.0",
"package_type": "manywheel",
"build_name": "manywheel-py3_14t-cuda13_0",
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu130",
"channel": "nightly",
"upload_to_base_bucket": "no",
"stable_version": "2.8.0",
"use_split_build": false
}
]
}
Loading
Loading