Repository navigation
Use torch 2.15.0 for every CUDA train - #25284
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25284
Note: Links to docs will display an error until the docs builds have been completed. ❌ You can merge normally! (2 Unrelated Failures), 4 Unclassified FailuresAs of commit 32f947b with merge base 679e49e ( 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:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but was 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. |
The cu134 train ran a torch 2.15 nightly whose oldest wheels are days from expiring off the nightly index, while cu132 and CPU used torch 2.14.0. torch 2.15.0 is released and on the test index for cpu, cu132 and cu134, so every train now installs the same torch, torchvision 0.29.2 and torchaudio 2.11.1, read from torch_pin.py. ROCm keeps torch 2.14.0 because rocm7.2 has no 2.15.0 wheel yet. The ESP-IDF generator reads the pin through install_requirements.py instead of scraping its text, and every workflow that triggers on install_requirements.py also triggers on torch_pin.py.
torch 2.15 requires triton 3.9, and every flash-linear-attention release before 0.6.0 fails to import under it (an autotune key names a removed kernel argument). 0.6.0 changed the kernels this op launches: - the gating kernels use exp2, so the chunk cumsum is scaled by 1/ln 2; - the h and o kernels take HV and STATE_V_FIRST and flatten V blocks into grid axis 0; - the cumsum kernel flattens its grid and takes USE_GRAPH instead of HEAD_FIRST; - the kkt and w/u kernels take HV. Only fla-core is installed: it holds the kernels, and the flash-linear-attention meta package now pins transformers>=5.6.2.
torch 2.15's AOTI runtime checks input alignment through aoti_torch_dtype_element_size. The ETensor shims had it, but the Windows DLL is built from the SlimTensor shims, so a model compiled with 2.15 could not load. Add it there and to the import library. The import library was regenerated per aoti_cuda_shims.lib.md with mingw-w64 binutils 2.40, which rebuilds the old export list byte for byte; the new one adds exactly this name.
abdec96 to
12b76fc
Compare
This PR needs a
|
|
@claude review effort=max |
|
Claude finished @Gasoonjia's task in 31m 9s —— View job Needs Discussion: nothing blocks moving every CUDA train to torch 2.15.0 and the FLA op to fla-core 0.6.0, but a leftover pre-0.6.0 FLA install now breaks importing the CUDA backend, and nobody has yet confirmed that torchvision 0.29.2 and torchaudio 2.11.1 work with torch 2.15.0. Detailed review of #25284SummaryThis PR pins torch 2.15.0 from There are no blockers. The two points to settle are under Recommendation. What I could not verify:
The Code Quality
Infrastructure
Testing
Backward Compatibility
Specific Comments
RecommendationNeeds Discussion. Two things should be settled before merging:
Everything else is a minor follow-up. |
- chunk_gated_delta_rule raises ImportError when fla-core is older than 0.6.0, so the kernels package skips the op instead of older FLA's ValueError under triton 3.9 breaking import of the whole CUDA backend. - aoti_torch_dtype_element_size range-checks the code before the int8_t cast. - The FLA test also runs B=2, K=V=128 and T=100. - Quote the fla-core install hint and pin it to 0.6.0. - windows-msvc.yml triggers on torch_pin.py. - The ROCm pin test skips rather than fails once the pins align. - aoti_cuda_shims.lib.md names binutils 2.42, which was checked, not 2.41.
- A missing fla-core raises the same ImportError with the install hint, instead of PackageNotFoundError's bare message. - cuda.yml installs fla-core from qwen3_5_moe/requirements.txt, the pin the Qwen3.5 export already uses, and says the Qwen3.5 tests need it too. - windows-msvc.yml's arm64 step reads the torch index from install_requirements along with the version, fails on a bad import, and triggers on install_requirements.py. - The ESP-IDF release check requires torch==TORCH_VERSION exactly. - The K != V grid shape uses V = 256, which gives several V blocks and a V block count unlike K's for every BV fla-core 0.6.0 autotunes (at most 128). - The Qwen3.5 README lists transformers for run.py: flash-linear-attention depended on it, fla-core does not. - Comment wording (not 0.6.x; fla-core in test-rocm-aoti.sh).
|
Addressed in 9dc9285:
Not changed: renaming the ROCm scripts' shell CI on 9b09091: the
|
|
@claude review effort=max |
|
Claude finished @Gasoonjia's task in 42m 26s —— View job Approve: there are no blockers at Detailed review of #25284SummaryThis PR moves CPU and every CUDA train to torch 2.15.0, read from CI at
Not verified:
Infrastructure
Testing
RecommendationApprove. Neither finding blocks the merge. Before merging:
|
- test_explicit_torchao_source_build_is_kept again checks that nothing after the third-party/ao build pins torchao, which would replace the source build. - build-wheels-cuda-windows.yml triggers on torch_pin.py and install_requirements.py: aoti_cuda_shims.lib has to move with the torch pin, so a pin-only bump must run the Windows CUDA wheel jobs.
|
Addressed in 32f947b:
CI on 9dc9285 (that commit changes only a test and a workflow trigger):
|
…rchcodec from voxtral (#25393) Fix the two ROCm gfx950 jobs that fail on every `main` run. ### `unittest-rocm-gfx950`: `ModuleNotFoundError: No module named 'pandas'` Every failing `main` run from `6b82a162e7` to `e7f6aefd09` has exactly one failure: `test_measured_routing.py::ProbeTest::test_real_measurements`. The last green run was `fe24cf5777`. **Why it errors instead of skipping.** - `ProbeTest.setUp` (added by #25277) imports `executorch.export.utils` before it calls `super().setUp()`. - That import pulls in `executorch.devtools` and then `devtools/inspector/_inspector.py`, which runs `import pandas`. - `test-rocm-aoti.sh` installs the minimal wheel (`EXECUTORCH_BUILD_MINIMAL=1`), which doesn't include pandas. - The base class `_PassTest.setUp` already skips without Triton on CUDA. That's why the other 162 tests in the file skip on ROCm, but `ProbeTest` imports before it reaches that skip. **Fix.** Call `super().setUp()` first, so `ProbeTest` skips on ROCm like the rest of the file. ### `unittest-rocm-gfx950`: flaky `SdpaCellStepAutotuneTest::test_compiled_pick_is_fastest_at_live_extents` The test asserts that the config the autotuner picked at compile time is within 1.10× of the fastest config, timed with CUDA-graph replays. It failed in 2 of the last 13 `main` runs (`c346379f06`, `cd12c4d02d`), both the same way: - At live extent 4650, the pick was `BLOCK_M=16, BLOCK_N=64, PACK_GQA=False` at about 119 µs. - The best was the same tile with `PACK_GQA=True` at about 71.7 µs, a 1.66× regret. **Cause: not confirmed.** It may be a real ROCm mis-pick: the compile-time scenarios run on ROCm too, so a default ROCm export of this SDPA can compile in the slower config. #25397 tracks two hypotheses: no CUDA-graph autotune timing on ROCm, and the compile-time scenarios timing an all-visible mask where this test times a sparse cell mask. **Fix.** Deselect this one test on ROCm, next to the `test_cuda_graph_timing.py` exclusion. The comment cites #25397, which tracks re-enabling it. ### `test-voxtral-realtime-rocm-gfx950`: `Could not load libtorchcodec` - `test-rocm-voxtral.sh` runs `conda install -c conda-forge ffmpeg` without a version. - Since Anaconda `main` published `ffmpeg-9.0.2` (2026-11-20 09:42Z), that resolves to FFmpeg 9. - The pinned `torchcodec==0.11.0` only loads FFmpeg 4–8. The log shows it trying `libavutil.so.56`–`.so.60` and finding none. - Before 09:42Z, the same unpinned install hung in conda's classic solver ("Solving environment"). Runs were cancelled at the 180-minute timeout every time, including #25284's. - No commit in this repo caused it: neither the script nor `rocm.yml` has changed since Oct 30. **Fix: drop torchcodec and FFmpeg here.** - Nothing in this job needs them. `run_rocm_e2e.sh` reads the clip with `wave`, and nothing under `examples/models/voxtral_realtime` imports torchcodec, `datasets` or `librosa`. - `librosa` goes too: nothing in the job imports it. - Their only user was the dataset fetch, and that dataset's rows are WAV bytes. The fetch now reads them with `Audio(decode=False)` and decodes with `soundfile`. - This fixes both the load error and the solver hang. Pinning `ffmpeg<9` would leave the hang. ### Test plan - **Audio fetch:** the new snippet ran locally in a fresh venv with `datasets==5.2.0` (CI's version), `soundfile`, and no torchcodec. It wrote a 16 kHz, mono, 16-bit, 30.0 s WAV, the format `run_rocm_e2e.sh`'s `wave` check expects. - **`ProbeTest.setUp`:** confirmed with `ast` that its first statement is now `super().setUp()`, and that `_PassTest.setUp` skips on `torch.version.hip`. - **Lint:** `black` 24.4.2 and `flake8` are clean, and `bash -n` passes on both scripts. - **CI on this PR:** I'll confirm both ROCm gfx950 jobs pass. I can't run them here, since that needs an MI350. **CI on 6549cb2:** `unittest-rocm-gfx950-rocm7.2` 719 passed, 163 skipped, 1 deselected, 0 failed, with `ProbeTest::test_real_measurements` SKIPPED. `test-voxtral-realtime-rocm-gfx950-rocm7.2` passed on MI350.
_matrix_cuda_versions asserted nothing about exclude rows that name other keys along with the CUDA version; one could drop every row of a train and the coverage test would still count it. Reject them instead. The e2e gate comment's example was the per-train nightly pin #25284 removed.
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 #25255 (drop CUDA 13.0).
Why
The cu134 train installs a torch
2.15.0.dev20260921nightly. 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_pin.py. torchvision 0.29.2 acceptstorch>=2.14.0and torchaudio 2.11.1 acceptstorch>=2.11. All three wheels are on test/{cpu,cu132,cu134}.CU134_TORCH_PACKAGES,cu134_requirements()and the cu134 special cases ininstall_requirements.pyare removed.ROCM_TORCH_VERSION) because the rocm7.2 index has no 2.15.0 wheel.EXECUTORCH_USE_RELEASE_CPU_DEPSstill pairs released torch with torchao 0.18.0. I checked locally that 0.18.0 loads andquantize_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 broketest-cuda-shimson the first version of #25255. The wrapper is ported to the fla-core 0.6.0 kernel signatures:exp2, so the chunk cumsum is scaled byRCP_LN2;HVandSTATE_V_FIRST, and fold the V-block index into grid axis 0;USE_GRAPHinstead ofHEAD_FIRST;HV.CI and the qwen3.5-MoE requirements install
fla-core==0.6.0rather than theflash-linear-attentionmeta package, which now pinstransformers>=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_sizefromassert_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 peraoti_cuda_shims.lib.mdwith 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.mdnow notes that binutils 2.46 numbers import hints differently and does not reproduce the file.Pin readers
TORCH_VERSIONandTORCH_URL_BASEby importinginstall_requirements.pyinstead of sed-scraping its text.torch_pin.pyis added to its stamp inputs, totest_version_stamp.shand to thetest-espressifpath filter, and the negative test now corruptstorch_pin.py.windows-msvc.ymlreads the torch version fromtorch_pin.py.install_requirements.pynow also namestorch_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 pinstorchao==TORCHAO_NIGHTLY_VERSION.examples/espressif/test_version_stamp.sh: 51 OK, 0 FAIL, including the newTORCH_VERSION must be X.Y.Zcase.chunk_gated_delta_rule.pyimports and registerstorch.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 thatwrap_tritonrejects.common_shims_slim.cppand ran a small check ofaoti_torch_dtype_element_sizefor every dtype constant, plus ComplexFloat, which returns 0. The new gtest cases cover the same.test_chunk_gated_delta_rule.pycompares against FLA's naive reference and FLA's own chunk implementation) and the Windows CUDA e2e load.