Skip to content

Handle channels with fewer CUDA versions in gen_quick_start_module.py - #2139

Merged
atalman merged 2 commits into
pytorch:sitefrom
atalman:gen_quick_start_partial_cuda
Sep 30, 2026
Merged

atalman merged 2 commits into
pytorch:sitefrom
atalman:gen_quick_start_partial_cuda

Conversation

@atalman

@atalman atalman commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

extract_arch_ver_map fills cuda.x/cuda.y/cuda.z from the channel's
CUDA versions and leaves the rest at the hard-coded defaults. Nightly now
ships only 13.2 and 13.4, so the page advertised nightly as CUDA 13.2, 13.4
and 12.4 (or 13.2, 12.1, 12.4 while 13.4 was hidden from getting-started).

  • Drop CUDA labels the channel has no version for. The page already strikes
    out any option missing from version_map.
  • When the channel has a CUDA version but the OS has no build for it (13.4 on
    Windows), publish a "not available" note instead of keeping the previous
    command, which pointed at a different CUDA version.
  • A new stable entry is copied from preview, so recreate libtorch versions
    when a CUDA entry matches; otherwise a "not available" preview entry left the
    new release without its download link.

Test plan: ran the update-quick-start-module workflow locally (six
getting-started matrices from pytorch/test-infra, then
gen_quick_start_module.py --autogenerate):

  • With test-infra advertising nightly 13.2 and 13.4: nightly map is
    cuda.x=13.2, cuda.y=13.4, Linux commands use nightly/cu132 and
    nightly/cu134, Windows 13.4 shows "CUDA 13.4 is not available on Windows".
  • With test-infra still hiding 13.4: nightly map is cuda.x=13.2 only.
  • Release (2.14.1) output is identical to the unpatched script.

`extract_arch_ver_map` fills `cuda.x`/`cuda.y`/`cuda.z` from the channel's
CUDA versions and leaves the rest at the hard-coded defaults. Nightly now
ships only 13.2 and 13.4, so the page advertised nightly as CUDA 13.2, 13.4
and 12.4 (or 13.2, 12.1, 12.4 while 13.4 was hidden from getting-started).

- Drop CUDA labels the channel has no version for. The page already strikes
  out any option missing from `version_map`.
- When the channel has a CUDA version but the OS has no build for it (13.4 on
  Windows), publish a "not available" note instead of keeping the previous
  command, which pointed at a different CUDA version.
- A new stable entry is copied from `preview`, so recreate libtorch `versions`
  when a CUDA entry matches; otherwise a "not available" preview entry left the
  new release without its download link.

Test plan: ran the update-quick-start-module workflow locally (six
getting-started matrices from pytorch/test-infra, then
`gen_quick_start_module.py --autogenerate`):
- With test-infra advertising nightly 13.2 and 13.4: nightly map is
  `cuda.x=13.2, cuda.y=13.4`, Linux commands use `nightly/cu132` and
  `nightly/cu134`, Windows 13.4 shows "CUDA 13.4 is not available on Windows".
- With test-infra still hiding 13.4: nightly map is `cuda.x=13.2` only.
- Release (2.14.1) output is identical to the unpatched script.
@netlify

netlify Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for pytorch-dot-org-preview ready!

Name Link
🔨 Latest commit 5144c27
🔍 Latest deploy log https://app.netlify.com/projects/pytorch-dot-org-preview/deploys/6abd5c45275ce100089d7aba
😎 Deploy Preview https://deploy-preview-2139--pytorch-dot-org-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

The page has three fixed CUDA boxes. For a channel with fewer CUDA
versions (nightly now ships 13.2 and 13.4), `changeVersion()` only struck the
unused box through: it stayed visible with a stale label, and stayed
clickable.

Hide CUDA boxes that are not in the channel's `version_map`, widen the
visible ones so the CUDA group keeps its 6 of the row's 12 columns (two boxes
at `col-md-3`, three at `col-md-2`), and move the selection to the first
visible box if the selected one was hidden. ROCm and CPU keep the existing
strike-through behaviour.

Test plan: generated `assets/quick-start-module.js` from this template with
the nightly/release getting-started matrices, then drove it in Node with a
minimal DOM/jQuery stand-in (npm is unavailable on the devserver, so no
jsdom or browser):
- Stable: three boxes, CUDA 12.6 / 13.0 / 13.2, `col-md-2`.
- Preview: two boxes, CUDA 13.2 / 13.4, `col-md-3`; third hidden. Commands
  use `nightly/cu132` and `nightly/cu134`.
- Stable with CUDA 13.2 (`cuda.z`) selected, then Preview: selection moves to
  `cuda.x` and the command follows. With the previous template the struck-out
  box stayed selected.
- Preview, Windows, CUDA 13.4: shows the "not available on Windows" note.
@atalman
atalman merged commit 68ade66 into pytorch:site Sep 30, 2026
10 of 13 checks passed
atalman added a commit that referenced this pull request Sep 30, 2026
After #2139 the page hides CUDA boxes the channel does not ship, but
`update_versions` only skipped those labels, so `preview` in
published_versions.json still carried `cuda.z` with a stale command on
every
OS and package.

Add `sync_cuda_entries`, run before each channel's update:
- nightly (preview): remove `cuda.x/y/z` entries the channel has no CUDA
  version for.
- A new stable is created as a copy of preview, so re-create any label
the
release channel needs from a sibling CUDA entry, in cuda.x/y/z order.
The
  existing update then fills in its command. Release entries are never
  dropped.

Test plan: simulated the update-quick-start-module run (getting-started
matrices from pytorch/test-infra main, published_versions.json from
`site`):
- preview: `cuda.z` removed for linux/windows/macos, pip and libtorch.
- 2.14.1 (created from preview in this run): has cuda.x/y/z in order,
and
the whole file is identical to the current generator's output apart from
  the removed preview `cuda.z` entries.
- Page logic (Node harness): nightly two boxes, stable three, selection
moves
  off the hidden box, as before.
- `sync_cuda_entries` edge cases: nightly back to three CUDA versions
re-adds `cuda.z`; nightly with one drops `cuda.y`/`cuda.z`; release
never
  drops entries.

---------

Co-authored-by: Andrey Talman <atalman@users.noreply.github.com>

This branch had an error being deployed

1 failed deployment
pytorchbot-env — 5144c27e Deployed Sep 30, 2026 by atalman via update-quick-start #1848
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.

1 participant