Skip to content

Build only CUDA 13.2 and 13.4 into the Windows AMI - #8985

Merged
atalman merged 1 commit into
mainfrom
ami-cuda-13-only
Oct 2, 2026
Merged

atalman merged 1 commit into
mainfrom
ami-cuda-13-only

Conversation

@atalman

@atalman atalman commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Purpose

The Windows AMI installs five CUDA toolkits — 12.6, 12.8, 13.0, 13.2, 13.4. PyTorch binary builds only use the last two:

# .github/scripts/generate_binary_build_matrix.py (pytorch/pytorch)
CUDA_ARCHES = ["13.2", "13.4"]
CUDA_STABLE = "13.2"

12.6 was removed in pytorch/pytorch#196249 and 13.0 in pytorch/pytorch#198913. Nothing consumes 12.8 either. This drops the three unused ones.

Changes

windows.pkr.hcl — removes the CUDA_VERSION=12.6, 12.8 and 13.0 provisioner blocks. 13.2 and 13.4 are unchanged.

Install-CUDA-Tools.ps1 — removes the matching switch branches, and removes the defaults set before the switch:

$cudnn_subfolder="cuda"
$cudnn_lib_folder="lib\x64"
$cudnn_subfolder="cudnn-windows-x86_64-9.10.2.21_cuda12-archive"
$toolkitInstaller = "cuda_12.6.3_561.17_windows.exe"

Those mattered. They name the 12.6 toolkit and a cuda12 cuDNN, and with the 12.x branches gone an unrecognised CUDA_VERSION would have fallen through the switch and silently installed CUDA 12.6 against a cuda12 cuDNN — a worse failure than the one being removed, because it would produce a plausible-looking AMI. Both remaining versions set all three values themselves, so the defaults are now gone and a default branch errors out instead:

  default {
    Write-Error "Unsupported CUDA_VERSION '$cudaVersion'. This AMI builds 13.2 and 13.4 only."
    exit 1
  }

Side effect

Each toolkit is a multi-GB download plus install. Dropping three should take a meaningful bite out of the ~50 minute build, which matters given how close that build sits to the job limit — see #8983.

Test plan

  • packer fmt -check . — clean.
  • packer validate -syntax-only . — "Syntax-only check passed. Everything looks okay."
  • Verified no remaining references to 12.6 / 12.8 / 13.0 under aws/ami/ outside the explanatory comment.
  • Needs a workflow_dispatch run of Build Windows AMI to confirm end to end. Worth landing Bound the Windows AMI build's wait for AMI availability #8983 first so a hang fails in ~95 minutes with a message rather than being cancelled at 360.

PyTorch binary builds dropped to CUDA 13.2 and 13.4: CUDA_ARCHES in
.github/scripts/generate_binary_build_matrix.py is [13.2, 13.4], 12.6 went in
pytorch/pytorch#196249 and 13.0 in pytorch/pytorch#198913. The AMI was still
installing five toolkits, three of which nothing consumes.

Removes the 12.6, 12.8 and 13.0 provisioners and their branches in
Install-CUDA-Tools.ps1.

Also removes the pre-switch defaults. They set the 12.6 toolkit and a cuda12
cuDNN, so with 12.x gone an unrecognised CUDA_VERSION would have silently
installed CUDA 12.6 instead of failing. Unknown versions now error out.

Side effect worth having: each toolkit is a multi-GB download and install, so
dropping three should take a meaningful bite out of the ~50 minute build.
@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
torchci Ignored Ignored Oct 2, 2026 3:44pm UTC

Request Review

@atalman
atalman merged commit 63f5a50 into main Oct 2, 2026
@atalman
atalman deleted the ami-cuda-13-only branch October 2, 2026 16:13
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.

2 participants