Repository navigation
Drop CUDA 13.0 support and use a single TorchAO nightly pin - #25255
Conversation
PyTorch removed CUDA 13.0 from its nightly builds (pytorch/pytorch#203260), and the cu130 channel stopped publishing TorchAO nightlies after 0.19.0.dev20261103. Its CUDA_STABLE is now 13.2. - Remove 13.0 from SUPPORTED_CUDA_VERSIONS; supported CUDA is 13.2 and 13.4. - Move every 13.0 CI job (cuda.yml, cuda-windows.yml export, Windows cross-compile image) to 13.2; the build matrix is now 13.2 and 13.4. - Drop cu130 from the wheel arch list and CUDA redist releases. - Replace the per-train pins (CU130_/CU134_TORCHAO_NIGHTLY_VERSION, CU134_TORCH_PACKAGES, cu134_requirements) with one set: torch 2.15.0 (from torch_pin.py), torchvision 0.29.2, torchaudio 2.11.1 and TORCHAO_NIGHTLY_VERSION. torch 2.15.0 is published for cpu, cu132 and cu134, which removes the reason cu134 needed an expiring torch nightly. - ROCm keeps torch 2.14.0 (ROCM_TORCH_VERSION): rocm7.2 publishes nothing newer.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25255
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 Cancelled Jobs, 1 Unrelated Failure, 2 Unclassified FailuresAs of commit 06e7ad5 with merge base fb0a1c2 ( UNCLASSIFIED FAILURES - DrCI could not classify the following jobs because the workflow did not run on the merge base. The failures may be pre-existing on trunk or introduced by this PR:
CANCELLED JOBS - The following jobs were cancelled. Please retry:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
|
@claude review effort=max |
|
Claude finished @shoumikhin's task in 30m 34s —— View job This PR drops CUDA 13.0 and moves every train to one Detailed reviewPR Review: #25255SummaryThe PR drops CUDA 13.0: CI moves to 13.2 and Two regressions block it:
Smaller issues:
Infrastructure
Testing
Backward Compatibility
RecommendationRequest Changes This PR introduces two regressions, and both already fail in its CI:
The release-CPU torch/torchao pairing needs either a matched pin or confirmation that it works. The rest can be follow-ups. |
torch 2.15 requires triton 3.9, which flash-linear-attention 0.4.2 (and every release before 0.6.0) cannot import, and its AOTI wrapper calls aoti_torch_dtype_element_size, which the Windows shim import library does not export. Those need their own change. This keeps torch/torchvision/torchaudio on main's pins (and cu134's torch nightly pin, since test/cu134 has no torch 2.14.0), and keeps only the 13.0 removal plus the single TORCHAO_NIGHTLY_VERSION.
Addresses review: on a CUDA 13.0 toolkit determine_torch_url now prints a stderr warning before installing CPU torch, and the test exercises that path. The workflow tests read SUPPORTED_CUDA_VERSIONS instead of restating it and check every literal gpu-arch-version in cuda.yml and cuda-windows.yml.
|
Thanks for the review. These were against the first version of this PR, which also bumped torch to 2.15.0. That bump is now split into a follow-up, since it also needs the flash-linear-attention 0.6.0 port, the |
|
@claude review effort=max |
|
Claude finished @Gasoonjia's task in 24m 9s —— View job This PR drops CUDA 13.0 and folds the TorchAO nightly pins into one; I found no blockers, only minor problems in the new CPU-fallback warning and one workflow test, so I recommend Approve. Detailed reviewPR Review: #25255SummaryThe PR removes CUDA 13.0 from the supported toolkits, CI jobs, Docker images and docs, replaces the per-train TorchAO pins with one, and warns when an unsupported toolkit makes the install fall back to CPU-only PyTorch. There are no blockers. The new warning is wrong in one case that Code Quality
Testing
RecommendationApprove. All three points are minor follow-ups. One more point lies outside this diff, and my confidence in it is low. The comment at |
_get_cuda_version raises UnsupportedCudaVersionError with the parsed (major, minor), so determine_torch_url warns without running nvcc a second time, and the test runs the real detection with only subprocess.run mocked. The warning now says only what determine_torch_url decides (CPU-only PyTorch), since an explicit -DEXECUTORCH_BUILD_CUDA=ON still builds the backend. The workflow test asserts it checked at least one job, and a new test checks the cuda-windows image's CUDA_VERSION in build.sh is supported and matches the Windows export job.
Follow-up to #25255 (drop CUDA 13.0). ## Why The cu134 train installs a torch `2.15.0.dev20260921` nightly. Its oldest wheels are a few days from expiring off the nightly index, and once they go, every cu134 job fails to resolve. cu132 and CPU are still on torch 2.14.0. torch 2.15.0 is released (2026-10-28) and is on the test index for cpu, cu132 and cu134, so every train can use one release. ## What **One set of pins** (`install_requirements.py`, `torch_pin.py`) - torch 2.15.0, torchvision 0.29.2 and torchaudio 2.11.1 for CPU, cu132 and cu134, read from `torch_pin.py`. torchvision 0.29.2 accepts `torch>=2.14.0` and torchaudio 2.11.1 accepts `torch>=2.11`. All three wheels are on test/{cpu,cu132,cu134}. - `CU134_TORCH_PACKAGES`, `cu134_requirements()` and the cu134 special cases in `install_requirements.py` are removed. - ROCm stays on torch 2.14.0 (`ROCM_TORCH_VERSION`) because the rocm7.2 index has no 2.15.0 wheel. - `EXECUTORCH_USE_RELEASE_CPU_DEPS` still pairs released torch with torchao 0.18.0. I checked locally that 0.18.0 loads and `quantize_` runs on torch 2.15.0+cpu. **FLA kernels** (`backends/cuda/triton/kernels/chunk_gated_delta_rule.py`) torch 2.15 requires triton 3.9. Every flash-linear-attention release before 0.6.0 fails to import under triton 3.9 (`ValueError: key contains names that are not kernel arguments: STAGE`), which broke `test-cuda-shims` on the first version of #25255. The wrapper is ported to the fla-core 0.6.0 kernel signatures: - the gating kernels now use `exp2`, so the chunk cumsum is scaled by `RCP_LN2`; - the h and o kernels take `HV` and `STATE_V_FIRST`, and fold the V-block index into grid axis 0; - the cumsum kernel uses a flattened grid and takes `USE_GRAPH` instead of `HEAD_FIRST`; - the kkt and w/u kernels take `HV`. CI and the qwen3.5-MoE requirements install `fla-core==0.6.0` rather than the `flash-linear-attention` meta package, which now pins `transformers>=5.6.2`. **Windows CUDA shims** (`backends/aoti/common_shims_slim.*`, `aoti_cuda_shims.lib`) torch 2.15's AOTI runtime calls `aoti_torch_dtype_element_size` from `assert_alignment`. The Windows DLL is built from the SlimTensor shims, which did not define it, so a model compiled with 2.15 could not load. The shim is added there, and the import library is regenerated per `aoti_cuda_shims.lib.md` with mingw-w64 binutils 2.40. Rebuilding the old export list with 2.40 reproduces the checked-in file byte for byte, and the new library differs only by this one export. The `.md` now notes that binutils 2.46 numbers import hints differently and does not reproduce the file. **Pin readers** - The ESP-IDF generator reads `TORCH_VERSION` and `TORCH_URL_BASE` by importing `install_requirements.py` instead of sed-scraping its text. `torch_pin.py` is added to its stamp inputs, to `test_version_stamp.sh` and to the `test-espressif` path filter, and the negative test now corrupts `torch_pin.py`. - `windows-msvc.yml` reads the torch version from `torch_pin.py`. - Every workflow path filter and changed-files check that names `install_requirements.py` now also names `torch_pin.py`. ## Test plan - `pytest .ci/scripts/tests/test_install_dependencies.py .ci/scripts/tests/test_cuda_workflow.py .ci/scripts/tests/test_filter_cuda_matrix.py`: 50 passed. The ROCm test now runs each ROCm script's pin-read snippet and checks its output, and the source-build test checks that the core install also pins `torchao==TORCHAO_NIGHTLY_VERSION`. - `examples/espressif/test_version_stamp.sh`: 51 OK, 0 FAIL, including the new `TORCH_VERSION must be X.Y.Z` case. - In a venv with torch 2.15.0+cpu, triton 3.9.0 and fla-core 0.6.0, `chunk_gated_delta_rule.py` imports and registers `torch.ops.triton.chunk_gated_delta_rule`. A script also checked each of the 6 launched kernels: the keyword arguments passed match the 0.6.0 kernel parameters, minus the ones set by autotune configs or defaults, with no missing, extra or conflicting names. None of the 0.6.0 autotuners set the pre/post hooks that `wrap_triton` rejects. - Built `common_shims_slim.cpp` and ran a small check of `aoti_torch_dtype_element_size` for every dtype constant, plus ComplexFloat, which returns 0. The new gtest cases cover the same. - Not verified locally (no GPU or Windows here), left to CI: the numerics of the ported kernels (`test_chunk_gated_delta_rule.py` compares against FLA's naive reference and FLA's own chunk implementation) and the Windows CUDA e2e load.
Follow-up to #25255. Rebased onto #25284 (`e1390b6acb`), so the 13.4 rows now install the torch 2.15.0 release, and the regenerated `aoti_cuda_shims.lib` has `aoti_torch_dtype_element_size`. Also triggers on `torch_pin.py`, since `aoti_cuda_shims.lib` has to move with the torch pin. ## Why PyTorch publishes CUDA 13.2 and 13.4 wheels (torch 2.15.0 is on `whl/cu132` and `whl/cu134`, not on `whl/cu130`), and ExecuTorch's `SUPPORTED_CUDA_VERSIONS` is `(13, 2), (13, 4)`. But every job in `cuda-windows.yml` ran 13.2 only, because the `executorch-ubuntu-22.04-cuda-windows` image carries one train's toolkits. The only 13.4 Windows cross-compile was in the nightly wheel pipeline, so a pull request that broke it could land green. ## What - **Model export and e2e:** each row names its train (`cuda-version`, the same key as `cuda.yml` and `build-wheels-cuda-windows.yml`). - If the row's train differs from the image's nvcc, the export fetches that train's Linux nvcc and Windows cudart with `install_cuda_redist.py`, as the wheel pipeline does. The image is unchanged. - The export then asserts that `install_executorch.sh` picked a torch built for that train. - Artifact names carry the train. - **13.4 rows:** each train installs its own toolkit and its own torch, so 13.4 runs two models; all six rows (four models) keep running on 13.2: - dinov2, the smallest model; - Voxtral Realtime `quantized-int4-tile-packed`, the only quant here that lowers to `_weight_int4pack_mm` and so runs the `int4mm` shim built by that train's nvcc. It already runs on 13.2. - **e2e gate:** e2e is not gated on the export matrix succeeding, mirroring `build-wheels-cuda-windows.yml`. One row's failed export, say one model's, no longer skips the other rows; each row fails on its own missing artifact. A skipped export (fork PR) still skips e2e. - **`unittest-cuda-runtime-windows`:** runs on both trains. The Windows GPU runners already carry the `v13.4` toolkit. - **PATH:** both Windows jobs put `CUDA_HOME\bin\x64;CUDA_HOME\bin` first on `PATH`, before setup, as `test_cuda_runtime_windows.ps1` and the wheel e2e script do. - **Path filters:** the workflow triggers on `.ci/scripts/wheel/install_cuda_redist.py`, and on `torch_pin.py`, `install_requirements.py` and `install_utils.py`. `TORCH_VERSION` lives in `torch_pin.py`, which `install_requirements.py` reads, and `install_utils.py` holds `SUPPORTED_CUDA_VERSIONS`. The torch pin is there because `aoti_cuda_shims.lib` has to move with it. - **Check names:** export and e2e jobs are named `<job>-<cuda-version> (<model>, <quant>)`. GitHub cuts generated names at 100 characters, which gave the 13.2 and 13.4 Voxtral Realtime rows the same name. - **`test_cuda_workflow.py`:** reads each job's train from the matrix key its `gpu-arch-version` names, and checks that: - each Windows job covers every supported train and uses it (`gpu-arch-version`, the `CUDA\v` path, `bin\x64` before setup); - export and e2e list the same rows; - every train has a tile-packed int4 row; - every model runs on the image's own train; - the export fetches both the Linux toolkit and the Windows cudart and exports `WINDOWS_CUDA_HOME`; - e2e doesn't gate on the export matrix's overall success. ## Test plan - `pytest .ci/scripts/tests/test_cuda_workflow.py .ci/scripts/tests/test_filter_cuda_matrix.py`: 36 passed. - Reintroduced each guarded regression locally, and each one fails a test: - e2e gate back to `== 'success'`; - runtime pinned to `v13.2` or `gpu-arch-version: "13.2"`; - no `bin\x64` on PATH (e2e or runtime); - no Windows cudart fetch; - image bumped to 13.4; - the 13.4 int4 row switched back to weight-only; - an `exclude` that names other keys along with `cuda-version`, which could drop every row of a train; - an explicit name that loses the row values, or goes over 100 characters. - Full `.ci/scripts/tests` has the same 36 environment failures/errors (missing local deps or env vars) with and without this change. - `install_cuda_redist.py --train 13.4 --platform windows-x86_64 --components cuda_cudart` gives `bin/x64/cudart64_13.dll` and `lib/x64/cudart.lib`. Those are the paths `torch.utils.cpp_extension` (`WINDOWS_CUDA_HOME/lib/x64`) and Inductor's MinGW import-library step (`bin/x64`) read. - CI on `c8d4223536` (rebased onto #25284, torch 2.15.0): all 364 checks pass. - **Exports:** both 13.4 exports pass, Voxtral Realtime tile-packed int4 and dinov2. The tile-packed export now links `aoti_torch_dtype_element_size` from the regenerated `aoti_cuda_shims.lib`. - **Windows e2e:** both 13.4 rows pass, Voxtral Realtime tile-packed int4 (which runs the int4mm shim built by 13.4's nvcc) and dinov2. All six 13.2 rows pass too. - **Runtime:** `unittest-cuda-runtime-windows-13.2` and `-13.4` pass. The 13.4 runtime job built with `v13.4\bin\nvcc.exe`.
Follow-up to #25249.
Why
PyTorch dropped CUDA 13.0 from its nightly builds in pytorch/pytorch#203260 (2026-11-03). PyTorch main's own binary build matrix (
generate_binary_build_matrix.py) is nowCUDA_ARCHES = ["13.2", "13.4", "13.5"]withCUDA_STABLE = "13.2". Thecu130channel's last torch nightly isdev20261102and its last TorchAO nightly is0.19.0.dev20261103. That's why the TorchAO bump in #25223 broke every CUDA 13.0 job.After this PR ExecuTorch supports CUDA 13.2 and 13.4 only. This PR does not add 13.5: the cu135 channel has no torch 2.14/2.15 release wheels, only torch 2.16 nightlies, so 13.5 waits for the torch 2.16 bump.
Changes
SUPPORTED_CUDA_VERSIONSis(13,2), (13,4). The 11 fixed 13.0 jobs incuda.ymland thecuda-windows.ymlexport now run on 13.2. The build matrix is["13.2", "13.4"]. The Windows cross-compile image installs 13.2.2 (and the stale 12.8/12.9 entries are gone).cu130is removed fromcuda_arch_list.sh,install_cuda_redist.py,filter_cuda_matrix.pycomments and the CUDA docs.CU130_TORCHAO_NIGHTLY_VERSION/CU134_TORCHAO_NIGHTLY_VERSIONand the cu134 special case insetup.py. Every train now usesTORCHAO_NIGHTLY_VERSION.Not in this PR: torch 2.15
An earlier version of this PR also moved every train to torch 2.15.0, which would have dropped the cu134 torch nightly pin. CI showed that needs separate work, so it moves to a follow-up:
triton~=3.9.flash-linear-attentionbefore 0.6.0 doesn't import under triton 3.9 (autotune key contains names that are not kernel arguments). I reproduced this locally for 0.4.2 and 0.5.0–0.5.2. 0.6.0 changes the kernel signatures thatbackends/cuda/triton/kernels/chunk_gated_delta_rule.pycalls.aoti_torch_dtype_element_size, whichbackends/cuda/runtime/aoti_cuda_shims.libdoesn't export, so the Windows export fails to link.So
CU134_TORCH_PACKAGESstays for now:test/cu134has no torch 2.14.0.Test plan
pytest .ci/scripts/tests/test_cu134_dependencies.py .ci/scripts/tests/test_cuda_workflow.py .ci/scripts/tests/test_filter_cuda_matrix.py: 51 passed. This adds a test that a 13.0 toolkit is rejected and one that nocuda.ymljob uses 13.0.bash examples/espressif/test_version_stamp.sh: no FAILs. It failed on the earlier version of this PR.