Skip to content

Commit ea334ab

Browse files
authored
Bring back CUDA 12.9 builds for domains (#7352)
This is basically a partial revert of #7074 and #7345 to resume building nightly, test, and release binaries for domains. This is to address pytorch/pytorch#165165 --------- Signed-off-by: Huy Do <[email protected]>
1 parent cd8e25f commit ea334ab

6 files changed

+1378
-2
lines changed

tools/scripts/generate_binary_build_matrix.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def validation_runner(arch_type: str, os: str) -> str:
148148
return LINUX_CPU_RUNNER
149149

150150

151-
def initialize_globals(channel: str, build_python_only: bool) -> None:
151+
def initialize_globals(channel: str, os: str, build_python_only: bool) -> None:
152152
global CURRENT_VERSION, CUDA_ARCHES, ROCM_ARCHES, PYTHON_ARCHES
153153
global WHEEL_CONTAINER_IMAGES, LIBTORCH_CONTAINER_IMAGES
154154
if channel == TEST:
@@ -157,6 +157,10 @@ def initialize_globals(channel: str, build_python_only: bool) -> None:
157157
CURRENT_VERSION = CURRENT_STABLE_VERSION
158158

159159
CUDA_ARCHES = CUDA_ARCHES_DICT[channel]
160+
if channel != "release" and os == LINUX:
161+
# TODO (huydhn): Only build CUDA 12.9 for Linux. This logic is to be cleaned up
162+
# in 2.10
163+
CUDA_ARCHES.append("12.9")
160164
ROCM_ARCHES = ROCM_ARCHES_DICT[channel]
161165
if build_python_only:
162166
# Only select the oldest version of python if building a python only package
@@ -523,7 +527,7 @@ def generate_build_matrix(
523527

524528
for channel in channels:
525529
for package in package_types:
526-
initialize_globals(channel, build_python_only == ENABLE)
530+
initialize_globals(channel, operating_system, build_python_only == ENABLE)
527531
includes.extend(
528532
GENERATING_FUNCTIONS_BY_PACKAGE_TYPE[package](
529533
operating_system,

tools/tests/assets/build_matrix_linux_wheel_cuda.json

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,20 @@
5656
"upload_to_base_bucket": "no",
5757
"stable_version": "2.9.0"
5858
},
59+
{
60+
"python_version": "3.10",
61+
"gpu_arch_type": "cuda",
62+
"gpu_arch_version": "12.9",
63+
"desired_cuda": "cu129",
64+
"container_image": "pytorch/manylinux2_28-builder:cuda12.9",
65+
"package_type": "manywheel",
66+
"build_name": "manywheel-py3_10-cuda12_9",
67+
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
68+
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129",
69+
"channel": "nightly",
70+
"upload_to_base_bucket": "no",
71+
"stable_version": "2.9.0"
72+
},
5973
{
6074
"python_version": "3.10",
6175
"gpu_arch_type": "rocm",
@@ -140,6 +154,20 @@
140154
"upload_to_base_bucket": "no",
141155
"stable_version": "2.9.0"
142156
},
157+
{
158+
"python_version": "3.11",
159+
"gpu_arch_type": "cuda",
160+
"gpu_arch_version": "12.9",
161+
"desired_cuda": "cu129",
162+
"container_image": "pytorch/manylinux2_28-builder:cuda12.9",
163+
"package_type": "manywheel",
164+
"build_name": "manywheel-py3_11-cuda12_9",
165+
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
166+
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129",
167+
"channel": "nightly",
168+
"upload_to_base_bucket": "no",
169+
"stable_version": "2.9.0"
170+
},
143171
{
144172
"python_version": "3.11",
145173
"gpu_arch_type": "rocm",
@@ -224,6 +252,20 @@
224252
"upload_to_base_bucket": "no",
225253
"stable_version": "2.9.0"
226254
},
255+
{
256+
"python_version": "3.12",
257+
"gpu_arch_type": "cuda",
258+
"gpu_arch_version": "12.9",
259+
"desired_cuda": "cu129",
260+
"container_image": "pytorch/manylinux2_28-builder:cuda12.9",
261+
"package_type": "manywheel",
262+
"build_name": "manywheel-py3_12-cuda12_9",
263+
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
264+
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129",
265+
"channel": "nightly",
266+
"upload_to_base_bucket": "no",
267+
"stable_version": "2.9.0"
268+
},
227269
{
228270
"python_version": "3.12",
229271
"gpu_arch_type": "rocm",
@@ -308,6 +350,20 @@
308350
"upload_to_base_bucket": "no",
309351
"stable_version": "2.9.0"
310352
},
353+
{
354+
"python_version": "3.13",
355+
"gpu_arch_type": "cuda",
356+
"gpu_arch_version": "12.9",
357+
"desired_cuda": "cu129",
358+
"container_image": "pytorch/manylinux2_28-builder:cuda12.9",
359+
"package_type": "manywheel",
360+
"build_name": "manywheel-py3_13-cuda12_9",
361+
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
362+
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129",
363+
"channel": "nightly",
364+
"upload_to_base_bucket": "no",
365+
"stable_version": "2.9.0"
366+
},
311367
{
312368
"python_version": "3.13",
313369
"gpu_arch_type": "rocm",
@@ -392,6 +448,20 @@
392448
"upload_to_base_bucket": "no",
393449
"stable_version": "2.9.0"
394450
},
451+
{
452+
"python_version": "3.13t",
453+
"gpu_arch_type": "cuda",
454+
"gpu_arch_version": "12.9",
455+
"desired_cuda": "cu129",
456+
"container_image": "pytorch/manylinux2_28-builder:cuda12.9",
457+
"package_type": "manywheel",
458+
"build_name": "manywheel-py3_13t-cuda12_9",
459+
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
460+
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129",
461+
"channel": "nightly",
462+
"upload_to_base_bucket": "no",
463+
"stable_version": "2.9.0"
464+
},
395465
{
396466
"python_version": "3.13t",
397467
"gpu_arch_type": "rocm",
@@ -476,6 +546,20 @@
476546
"upload_to_base_bucket": "no",
477547
"stable_version": "2.9.0"
478548
},
549+
{
550+
"python_version": "3.14",
551+
"gpu_arch_type": "cuda",
552+
"gpu_arch_version": "12.9",
553+
"desired_cuda": "cu129",
554+
"container_image": "pytorch/manylinux2_28-builder:cuda12.9",
555+
"package_type": "manywheel",
556+
"build_name": "manywheel-py3_14-cuda12_9",
557+
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
558+
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129",
559+
"channel": "nightly",
560+
"upload_to_base_bucket": "no",
561+
"stable_version": "2.9.0"
562+
},
479563
{
480564
"python_version": "3.14",
481565
"gpu_arch_type": "rocm",
@@ -560,6 +644,20 @@
560644
"upload_to_base_bucket": "no",
561645
"stable_version": "2.9.0"
562646
},
647+
{
648+
"python_version": "3.14t",
649+
"gpu_arch_type": "cuda",
650+
"gpu_arch_version": "12.9",
651+
"desired_cuda": "cu129",
652+
"container_image": "pytorch/manylinux2_28-builder:cuda12.9",
653+
"package_type": "manywheel",
654+
"build_name": "manywheel-py3_14t-cuda12_9",
655+
"validation_runner": "linux.g5.4xlarge.nvidia.gpu",
656+
"installation": "pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu129",
657+
"channel": "nightly",
658+
"upload_to_base_bucket": "no",
659+
"stable_version": "2.9.0"
660+
},
563661
{
564662
"python_version": "3.14t",
565663
"gpu_arch_type": "rocm",

0 commit comments

Comments
 (0)