Skip to content

[release/2.13] Add CUDA 12.9 to TORCH_CUDA_ARCH_LIST tables - #188443

Merged
atalman merged 1 commit into
pytorch:release/2.13from
atalman:add-cu129-arch-release-2.13
Jun 29, 2026
Merged

atalman merged 1 commit into
pytorch:release/2.13from
atalman:add-cu129-arch-release-2.13

Conversation

@atalman

@atalman atalman commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes the manywheel-cuda-cu129-build failure on release/2.13:

unknown cuda version 12.9

(example run)

Root cause

CUDA 12.9 is a build target on release/2.13 (CUDA_ARCHES = ["12.6", "12.9", "13.0", "13.2"], with cuDNN/toolkit/extra-requirements all defined, and the docker image pulls fine). But the 2.13 refactor that moved the TORCH_CUDA_ARCH_LIST logic from a bash case in .ci/manywheel/build_cuda.sh into Python tables dropped the 12.9 entry. .ci/manywheel/build_env_setup.py::torch_cuda_arch_list("12.9", ...) then hits raise SystemExit("unknown cuda version 12.9") at env setup, before any compilation.

In release/2.12, 12.9 (and 12.9-aarch64) was a valid build arch and built fine via the bash case:

12.9) TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;9.0;10.0;12.0"   # +Blackwell +PTX

i.e. the Blackwell set (same as 13.x), not the legacy 12.6 set.

Fix

Add a 12.9 entry to both arch tables (kept in sync by validate_runtime_release_table_consistency()), mirroring 2.12's behavior:

  • .ci/manywheel/build_env_setup.py -> TORCH_CUDA_ARCH_LIST_TABLE
  • torch/cuda/__init__.py -> PYTORCH_RELEASES_CODE_CC
"12.9": {
    "x86_64": {75, 80, 86, 90, 100, 120},   # == 13.0/13.2 x86_64
    "aarch64": {80, 90, 100, 120},           # 13.x aarch64 minus sm_110 (12.9 never added 11.0)
},

(2.13's table is package-type-agnostic, so the old libtorch "remove sm_86" special-case from 2.12 does not apply here.)

Test plan

  • python .github/scripts/generate_binary_build_matrix.py runs clean -> validate_runtime_release_table_consistency() passes (runtime/build tables now agree on 12.9).
  • Re-run manywheel-cuda-cu129-build: env setup resolves TORCH_CUDA_ARCH_LIST for 12.9 instead of erroring.

CUDA 12.9 is in the release/2.13 build matrix (CUDA_ARCHES), but the arch-list
tables introduced in the 2.13 refactor omit it, so manywheel-cuda-cu129-build
fails at .ci/manywheel/build_env_setup.py with 'unknown cuda version 12.9'.

In 2.12 the arch list was a bash case in build_cuda.sh that handled 12.9 as
base + sm_12.0 (Blackwell), i.e. the 13.x set, not the legacy 12.6 set. Restore
that by adding a 12.9 entry to both TORCH_CUDA_ARCH_LIST_TABLE (build) and
PYTORCH_RELEASES_CODE_CC (runtime), kept in sync per
validate_runtime_release_table_consistency():
  x86_64:  {75, 80, 86, 90, 100, 120}   (== 13.0/13.2)
  aarch64: {80, 90, 100, 120}           (13.x aarch64 minus sm_110, which 12.9 never added)

validate_runtime_release_table_consistency() passes.
@atalman
atalman requested review from a team, Aidyn-A, eqy and syed-ahmed as code owners June 29, 2026 17:37
@pytorch-bot

pytorch-bot Bot commented Jun 29, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/188443

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 65 Pending

As of commit 40c64f2 with merge base 636bc91 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot

pytorch-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@atalman
atalman merged commit 0bdbc26 into pytorch:release/2.13 Jun 29, 2026
59 of 129 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants