Skip to content

Use torch 2.15.0 for every CUDA train - #25284

Merged
Gasoonjia merged 9 commits into
mainfrom
gasoonjia/torch-2.15
Nov 20, 2026
Merged

Gasoonjia merged 9 commits into
mainfrom
gasoonjia/torch-2.15

Conversation

@Gasoonjia

@Gasoonjia Gasoonjia commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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.

@pytorch-bot

pytorch-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

🔗 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 Failures

As of commit 32f947b with merge base 679e49e (image):

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 19, 2026
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 11:05 — with GitHub Actions Inactive
Base automatically changed from gasoonjia/drop-cuda-13.0 to main November 19, 2026 18:01
@github-actions github-actions Bot added the ciflow/docker Trigger docker-builds to rebuild and push the CI images for this PR label Nov 19, 2026
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.
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@Gasoonjia

Copy link
Copy Markdown
Contributor Author

@claude review effort=max

@claude

claude Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

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 #25284

Summary

This PR pins torch 2.15.0 from torch_pin.py for CPU and every CUDA train, while ROCm stays on 2.14.0. It also ports chunk_gated_delta_rule to fla-core 0.6.0 for triton 3.9, and adds aoti_torch_dtype_element_size to the SlimTensor shims and the Windows import library.

There are no blockers. The two points to settle are under Recommendation.

What I could not verify:

  • the regenerated aoti_cuda_shims.lib, because it is binary;
  • fla-core 0.6.0's kernel internals, because its source could not be fetched from this job;
  • whether the needed wheels exist on the package indexes.

The pull, trunk and Test CUDA Builds runs were still queued when I checked.

Code Quality

  • The install hint fla-core>=0.6.0 is wrong (backends/cuda/triton/kernels/chunk_gated_delta_rule.py:26, backends/cuda/tests/test_chunk_gated_delta_rule.py:10).
    • Pasted into a shell, the unquoted >=0.6.0 is a redirect. It installs the latest fla-core and writes a file named =0.6.0.
    • The wrapper passes 0.6.0's private kernel arguments (HV, STATE_V_FIRST, USE_GRAPH). A later fla-core can break it even with the operator quoted.
    • CI and examples/models/qwen3_5_moe/requirements.txt both pin ==0.6.0. Use pip install "fla-core==0.6.0".
    • Fix this →
  • The ESP-IDF stamp builds its own torch requirement (examples/espressif/build_idf_component.sh:264).
    • It writes torch==$TORCH_VERSION itself, so the requirement format now lives in two places: here and in TORCH_PACKAGE (install_requirements.py:111).
    • Suppose TORCH_PACKAGE goes back to a nightly pin, torch=={TORCH_VERSION}.{NIGHTLY_VERSION}, with TORCH_URL_BASE on /whl/nightly. The X.Y.Z check still passes, and the component quietly declares a torch==X.Y.Z that the nightly index does not have. The text scrape this PR removes would have failed loudly.
    • Fix: export the requirement string from install_requirements.py and print that here.
    • Fix this →
  • The new shim narrows the dtype before validating it (backends/aoti/common_shims_slim.cpp:188).
    • slim::c10::ScalarType is enum class : int8_t, so the cast truncates the value before isValidScalarType sees it.
    • aoti_torch_dtype_element_size(262) therefore returns 4 (Float), not the 0 that common_shims_slim.h:96 documents for an unsupported code.
    • AOTI only passes real dtype codes, so this is minor. Range-check dtype before the cast.
    • Fix this →

Infrastructure

  • Two workflows do not trigger on torch_pin.py.
    • .github/workflows/windows-msvc.yml:95 now reads the torch version from torch_pin.py. That file is missing from pull_request.paths (lines 11-14) and from the build-windows-arm64 if: (lines 65-69).
    • In cuda.yml, neither pull_request.paths (lines 24-50) nor any job if: lists torch_pin.py or install_requirements.py. That was already true on main, but after this PR torch_pin.py chooses the torch for every CUDA train.
    • So a PR that only bumps TORCH_VERSION runs neither the arm64 install nor the CUDA workflow. On main, they only run on sampled full runs.
    • This PR is covered only because it also touches .ci/scripts/** and backends/cuda/**.
    • Fix this →
  • Low confidence: torchvision and torchaudio may not match torch 2.15.0. I could not reach the package indexes, so this needs a check on your side.
    • TORCHVISION_VERSION = "0.29.2" (install_requirements.py:38) belongs to the torch 2.14 series; 0.30.x is the series for 2.15. Even if pip accepts the pair, that does not show torchvision._C, which was built against 2.14, loads on 2.15.0.
    • TORCHAUDIO_VERSION = "2.11.1" now also applies below Python 3.15, where main deliberately used 2.11.0.
    • Please confirm that install_executorch.sh --example on cpu, cu132 and cu134 keeps torch at 2.15.0 and can import torchvision.ops and torchaudio. Check with both the oldest and the newest supported Python.

Testing

  • The FLA test runs a single shape (backends/cuda/tests/test_chunk_gated_delta_rule.py:45).
    • Every test uses B, T, H, K, V = 1, 128, 4, 64, 64.
    • This PR rewrites the wrapper's grid math. The V blocks are folded into axis 0 of the h and o grids, and the cumsum grid becomes (NT * B * H,).
    • With B = 1 the B factor has no effect. With V = 64, cdiv(V, BV) can be 1, depending on which BV the autotuner picks. A grid that dropped either factor would still pass.
    • The test also never uses Qwen3.5's K = V = 128 (examples/models/qwen3_5_moe/model.py:43-44), or a T that is not a multiple of 64.
    • Add shapes such as (1, 128, 4, 128, 128) and (2, 100, 4, 128, 128) to test_eager_fla_configs.
    • Fix this →
  • The ROCm script test asserts a temporary state (.ci/scripts/tests/test_install_dependencies.py:204).
    • assertNotEqual(ROCM_TORCH_VERSION, TORCH_VERSION) will fail with no explanation once rocm7.2 gets 2.15.0 and the two pins are aligned.
    • Replace it with a skipTest that says the test needs the pins to differ.
    • Fix this →

Backward Compatibility

  • An old FLA install now breaks importing the CUDA backend (backends/cuda/triton/kernels/__init__.py:49).
    • The guard only catches ImportError. Per the PR description, FLA releases before 0.6.0 fail under triton 3.9 with ValueError: key contains names that are not kernel arguments: STAGE.
    • cuda_backend.py:61 imports this package. Take any environment that still has the old pin flash-linear-attention==0.4.2, from the previous qwen3_5_moe requirements and cuda.yml. Re-running install_executorch.sh brings in torch 2.15 and triton 3.9, and import executorch.backends.cuda.cuda_backend then fails.
    • That breaks every CUDA lowering, not just Qwen3.5.
    • Fix: check importlib.metadata.version("fla-core") before importing FLA, and raise an ImportError that names the required version. PackageNotFoundError is a subclass of ImportError, so the existing except already skips the op when fla-core is missing.
    • Fix this →

Specific Comments

  • backends/cuda/runtime/aoti_cuda_shims.lib.md:30 says binutils 2.40 and 2.41 reproduce the checked-in file byte for byte. The commit message only reports checking 2.40. Fix this →
  • install_requirements.py:36-39: the rocm7.2 comment sits directly above TORCHVISION_VERSION and TORCHAUDIO_VERSION, so those read like ROCm pins.
    • The commit message says the set is "read from torch_pin.py", but only torch is. The next TORCH_VERSION bump has to change these two by hand.
    • Moving them into torch_pin.py would clash with the weekly bump, which rewrites that file. A blank line plus a note that they must move with TORCH_VERSION is enough.
    • Fix this →

Recommendation

Needs Discussion. Two things should be settled before merging:

  1. Whether an old FLA install should stop CudaBackend from importing. The fix is a few lines.
  2. Whether the torchvision and torchaudio pins load on torch 2.15.0. The queued pull and trunk runs may answer this.

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).
@Gasoonjia

Copy link
Copy Markdown
Contributor Author

Addressed in 9dc9285:

  • Missing fla-core: PackageNotFoundError now raises the same ImportError with the hint (found none: pip install "fla-core==0.6.0"). With metadata hidden, the message is that one. 0.4.2 and a fake 0.7rc1 still give the hint, and 0.6.0 still imports.
  • fla-core pinned in two places: cuda.yml now runs pip install -r examples/models/qwen3_5_moe/requirements.txt. The comment says the Qwen3.5 tests need it too.
  • windows-msvc.yml arm64: the step reads TORCH_URL_BASE from install_requirements together with TORCH_VERSION. It sets $PSNativeCommandUseErrorActionPreference = $true and $ErrorActionPreference = 'Stop', and triggers on install_requirements.py.
  • ESP-IDF stamp: the release check now requires exactly torch_requirement: torch=={TORCH_VERSION}, imported from torch_pin.
  • K != V shape: changed to (2, 100, 4, 64, 256). fla-core 0.6.0 autotunes BV in {32, 64} for chunk_delta_h and up to 128 for chunk_o. So V = 256 always gives several V blocks, and a V block count different from K = 64's.
  • transformers: confirmed. flash-linear-attention==0.4.2 requires transformers, and fla-core==0.6.0 only needs einops plus torch/triton. install_executorch.sh installs requirements-examples.txt (transformers == 5.11.0) unless run with --minimal. So I didn't add a second, unpinned copy to requirements.txt. The README now lists it as a prerequisite for run.py and says where it comes from.
  • Wording: "missing or not 0.6.x", and test-rocm-aoti.sh now says fla-core.

Not changed: renaming the ROCm scripts' shell TORCH_VERSION. It's local to those two scripts and is read straight from ROCM_TORCH_VERSION two lines above.

CI on 9b09091: the test-vulkan-* jobs now pass after merging main (#24000's wmma configs).

  • Infra failures, unrelated to this PR:
    • the macOS jobs fail at Setup miniconda with CondaHTTPError: HTTP 429;
    • test-moshi-linux and test-arm-backend-ethos-u hit HuggingFace 429s;
    • the Android emulator times out booting.
  • Test CUDA Builds (the FLA kernel tests) and the Windows e2e are still running.

@Gasoonjia

Copy link
Copy Markdown
Contributor Author

@claude review effort=max

@claude

claude Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Claude finished @Gasoonjia's task in 42m 26s —— View job


Approve: there are no blockers at 9dc9285 and only two minor findings, but two CI jobs still need to pass before merge: rerun the parakeet non-quantized Windows export (a cut-off nvidia-cusparselt-cu13 download failed it, and that skipped the Windows CUDA e2e), and wait for unittest-cuda (kernel).

Detailed review of #25284

Summary

This PR moves CPU and every CUDA train to torch 2.15.0, read from torch_pin.py; ROCm stays on 2.14.0. It also ports chunk_gated_delta_rule to fla-core 0.6.0 for triton 3.9, and adds aoti_torch_dtype_element_size to the SlimTensor shims and aoti_cuda_shims.lib. 9dc9285 addresses the previous round. Two minor findings remain: bumping the torch pin doesn't run the Windows CUDA jobs, and the torchao source-build test lost a check.

CI at 9dc9285:

  • Windows export failure. export-model-cuda-windows-artifact (nvidia, parakeet-tdt, non-quantized) failed while installing torch==2.15.0. pip stopped downloading nvidia-cusparselt-cu13==0.8.1 at 73.4 of 170.1 MB, then reported THESE PACKAGES DO NOT MATCH THE HASHES. The other five exports installed the same pins without trouble, so this looks like a network flake.
  • Skipped Windows e2e. Because that export failed, test-model-cuda-windows-e2e was skipped. The new .lib has no Windows run on this commit.
  • Kernel test still queued. unittest-cuda (kernel) is the only job that runs the ported FLA kernels on a GPU. On d6e9b57 it failed before any test ran (conda-forge 403).
  • Still running: ROCm AOTI, pull and trunk.

Not verified:

  • I confirmed the new aoti_cuda_shims.lib names aoti_torch_dtype_element_size, but I didn't compare its full export list with main's.
  • fla-core 0.6.0 isn't installed here, so I couldn't check the new kernel arguments against its source.

Infrastructure

  • Bumping the torch pin doesn't run the Windows CUDA jobs, but aoti_cuda_shims.lib has to change with it (minor)
    • Why it matters: backends/cuda/runtime/aoti_cuda_shims.lib.md:8-9 says to regenerate the .lib "whenever the PyTorch pin moves". This PR is an example: torch 2.15 needed aoti_torch_dtype_element_size added to it.
    • What the PR did: it added torch_pin.py everywhere install_requirements.py already triggered a workflow, including the Linux and aarch64 CUDA wheel builds.
    • What it missed: two Windows CUDA workflows never listed install_requirements.py, so neither got torch_pin.py:
      • .github/workflows/build-wheels-cuda-windows.yml:6-22 (paths)
      • .github/workflows/cuda-windows.yml:15-26 (paths), and the changed-files if: blocks of the export job (59-69) and the e2e job (165-175). Those if: blocks also filter pushes to main.
    • Failure case: a later bump changes only torch_pin.py and the domain pins and forgets the .lib. No Windows CUDA job runs, either on the PR or on main outside a sampled full run. The missing shim shows up on the next PR that touches backends/cuda. In this PR the jobs ran only because files under backends/cuda/** and .ci/** changed.
    • Suggestion: this could go in the cuda.yml trigger follow-up you already planned.
    • Fix this →

Testing

  • test_explicit_torchao_source_build_is_kept no longer checks that later installs leave the source-built torchao alone (minor)
    • Where: .ci/scripts/tests/test_install_dependencies.py:384-390.
    • What changed: the cu134 version of this test asserted that no command pinned torchao==. commands[0] now pins the nightly wheel on purpose, so that loop became a positive check on commands[0] alone.
    • The gap: nothing checks commands[2:] (pip install ., the domain libraries and requirements-examples.txt). These run after the third-party/ao build in commands[1].
    • Failure case: if one of those steps starts pinning torchao==, pip replaces the source build and the test still passes.
    • Fix: self.assertFalse(any(arg.startswith("torchao==") for command in commands[2:] for arg in command)).
    • Fix this →

Recommendation

Approve. Neither finding blocks the merge. Before merging:

  • rerun the failed Windows export, so test-model-cuda-windows-e2e runs against the new .lib;
  • wait for unittest-cuda (kernel) to pass.

  • Load the review skill and the changes since the last round
  • Run independent reviewers
  • Merge duplicate findings and re-read the cited code
  • Check CI status
  • Post the review

- 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.
@Gasoonjia

Copy link
Copy Markdown
Contributor Author

Addressed in 32f947b:

  • torchao source build: test_explicit_torchao_source_build_is_kept again asserts that nothing after the third-party/ao build (commands[2:]) pins torchao==.
  • Windows CUDA triggers on the pin: build-wheels-cuda-windows.yml now triggers on torch_pin.py and install_requirements.py. The same triggers for cuda-windows.yml (paths plus the export, e2e and runtime if: lists) are in Cover CUDA 13.4 in the Windows CUDA pull request jobs #25307, which already reworks those lists.

CI on 9dc9285 (that commit changes only a test and a workflow trigger):

  • unittest-cuda (kernel): fla-core-0.6.0 is installed and all 5 test_chunk_gated_delta_rule tests pass, test_eager_fla_configs included with all four GRID_SHAPES. The job's only failures are the same 5 test_conv_implicit_gemm OutOfResources: shared memory cases that fail on main (6840285).
  • Windows export + e2e (rerun after a truncated nvidia-cusparselt-cu13 download failed one export): all 6 exports and all 6 test-model-cuda-windows-e2e rows pass against the regenerated aoti_cuda_shims.lib. delete-model-cuda-windows-artifacts then ran.
  • Remaining red is infra or also fails on main:
    • macOS Setup miniconda HTTP 429;
    • HuggingFace 429 in test-moshi-linux and test-arm-backend-ethos-u;
    • Android emulator boot timeout;
    • ROCm gfx950 missing pandas;
    • test-models-cuda cancelled at its 90-minute timeout, as on main.
  • Still queued: Qwen3.5-35B-A3B and gemma-4-31B are waiting for an A100 runner, as they are on main right now.

@Gasoonjia
Gasoonjia merged commit e1390b6 into main Nov 20, 2026
@Gasoonjia
Gasoonjia deleted the gasoonjia/torch-2.15 branch November 20, 2026 22:57
Gasoonjia added a commit that referenced this pull request Nov 21, 2026
…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.
Gasoonjia added a commit that referenced this pull request Nov 21, 2026
_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.
Gasoonjia added a commit that referenced this pull request Nov 21, 2026
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`.

This branch was previously deployed

2 inactive deployments
upload-benchmark-results — 32f947bf Deployed Nov 20, 2026 by Gasoonjia
cadence — 32f947bf Deployed Nov 20, 2026 by Gasoonjia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/docker Trigger docker-builds to rebuild and push the CI images for this PR CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants