Drop unused CUDA entries from preview in published_versions.json - #2140
Merged
Merged
Conversation
After pytorch#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.
✅ Deploy Preview for pytorch-dot-org-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
atalman
had a problem deploying
to
pytorchbot-env
September 30, 2026 19:58 — with
GitHub Actions
Failure
atalman
had a problem deploying
to
pytorchbot-env
September 30, 2026 19:58 — with
GitHub Actions
Failure
`sync_cuda_entries` only dropped unused CUDA labels for nightly, so a future release with two CUDA versions would still have kept a `cuda.z` entry in its stable version. Drop labels the channel has no CUDA version for on both channels. The page already hides those boxes for either channel, since `extract_arch_ver_map` builds `version_map` the same way for nightly and release. The number of labels now follows each channel's Linux matrix: three CUDA versions give cuda.x/y/z, two give cuda.x/y. Only the entry being updated (preview or the latest stable) changes; older versions keep their labels. Test plan: simulated the update-quick-start-module run with scratch copies of pytorch/test-infra: - Today (nightly 13.2/13.4, release 12.6/13.0/13.2): output identical to the previous commit; preview cuda.x/y, 2.14.1 cuda.x/y/z. - Nightly 2, release 2, new stable 2.15.0: preview and 2.15.0 both cuda.x/y; 2.14.0 unchanged (cuda.x/y/z). - Nightly 3, release 2, new stable 2.15.0: preview cuda.x/y/z, 2.15.0 cuda.x/y. - Release going from 3 to 2 CUDA versions on an existing stable: its cuda.z is dropped. - Page logic (Node harness): with a two-version release, Stable shows two boxes at `col-md-3`.
atalman
had a problem deploying
to
pytorchbot-env
September 30, 2026 20:03 — with
GitHub Actions
Failure
atalman
had a problem deploying
to
pytorchbot-env
September 30, 2026 20:03 — with
GitHub Actions
Failure
marco-s
approved these changes
Sep 30, 2026
Make `extract_arch_ver_map` follow whatever the getting-started matrices
contain, without silent assumptions:
- Compare versions numerically. As strings, `max("7.2", "7.14")` is "7.2";
it only worked because test-infra sends one ROCm version per channel.
- If a channel has no ROCm version, drop `rocm5.x` from its map instead of
crashing on `max()` of an empty list, and publish "Not available for this
build" rather than a stale command. Existing notes (e.g. "ROCm is not
available on Windows") are kept, and a stable copied from preview drops
the generic note once its channel matches a build again.
- The page has three CUDA boxes and test-infra ships at most three CUDA
versions per channel. Fail with a clear error if that ever changes, instead
of `zip` silently dropping the newest version.
- Resolve `default` entries (macOS) to CPU before looking up the accelerator,
so they never depend on which labels a channel has.
Test plan: simulated the update-quick-start-module run.
- Today (nightly 13.2/13.4, release 12.6/13.0/13.2) and the two-version
release scenarios from the previous commit: output byte-for-byte identical.
- Nightly matrix with the ROCm rows removed: preview linux rocm5.x shows the
note, Windows/macOS notes unchanged, 2.14.1 identical to today's run.
- Four nightly CUDA versions: fails with "nightly getting-started matrix has
4 CUDA versions (12.6, 13.0, 13.2, 13.4), but the page has only 3 CUDA
boxes".
- `extract_arch_ver_map` with CUDA 13.2/13.9/13.10 and ROCm 7.2/7.14: labels
13.2, 13.9, 13.10 and ROCm 7.14.
atalman
had a problem deploying
to
pytorchbot-env
September 30, 2026 20:06 — with
GitHub Actions
Failure
atalman
had a problem deploying
to
pytorchbot-env
September 30, 2026 20:07 — with
GitHub Actions
Failure
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After #2139 the page hides CUDA boxes the channel does not ship, but
update_versionsonly skipped those labels, sopreviewinpublished_versions.json still carried
cuda.zwith a stale command on everyOS and package.
Add
sync_cuda_entries, run before each channel's update:cuda.x/y/zentries the channel has no CUDAversion for.
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):cuda.zremoved for linux/windows/macos, pip and libtorch.the whole file is identical to the current generator's output apart from
the removed preview
cuda.zentries.off the hidden box, as before.
sync_cuda_entriesedge cases: nightly back to three CUDA versionsre-adds
cuda.z; nightly with one dropscuda.y/cuda.z; release neverdrops entries.