Skip to content

Drop CUDA 13.0 support and use a single TorchAO nightly pin - #25255

Merged
Gasoonjia merged 5 commits into
mainfrom
gasoonjia/drop-cuda-13.0
Nov 19, 2026
Merged

Gasoonjia merged 5 commits into
mainfrom
gasoonjia/drop-cuda-13.0

Conversation

@Gasoonjia

@Gasoonjia Gasoonjia commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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 now CUDA_ARCHES = ["13.2", "13.4", "13.5"] with CUDA_STABLE = "13.2". The cu130 channel's last torch nightly is dev20261102 and its last TorchAO nightly is 0.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

  • CUDA 13.0 removed: SUPPORTED_CUDA_VERSIONS is (13,2), (13,4). The 11 fixed 13.0 jobs in cuda.yml and the cuda-windows.yml export 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). cu130 is removed from cuda_arch_list.sh, install_cuda_redist.py, filter_cuda_matrix.py comments and the CUDA docs.
  • One TorchAO pin: removed CU130_TORCHAO_NIGHTLY_VERSION / CU134_TORCHAO_NIGHTLY_VERSION and the cu134 special case in setup.py. Every train now uses TORCHAO_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:

  • torch 2.15 requires triton~=3.9. flash-linear-attention before 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 that backends/cuda/triton/kernels/chunk_gated_delta_rule.py calls.
  • The torch 2.15 AOTI wrapper calls aoti_torch_dtype_element_size, which backends/cuda/runtime/aoti_cuda_shims.lib doesn't export, so the Windows export fails to link.

So CU134_TORCH_PACKAGES stays for now: test/cu134 has 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 no cuda.yml job uses 13.0.
  • bash examples/espressif/test_version_stamp.sh: no FAILs. It failed on the earlier version of this PR.
  • CI on this PR.

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.
@pytorch-bot

pytorch-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

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

As of commit 06e7ad5 with merge base fb0a1c2 (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:

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.

@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 18, 2026
@github-actions github-actions Bot added the ciflow/docker Trigger docker-builds to rebuild and push the CI images for this PR label Nov 18, 2026
@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.

@shoumikhin

Copy link
Copy Markdown
Contributor

@claude review effort=max

@claude

claude Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Claude finished @shoumikhin's task in 30m 34s —— View job


This PR drops CUDA 13.0 and moves every train to one torch==2.15.0 pin, but it breaks the Espressif component generator and, once the pinned flash-linear-attention is installed, the executorch.backends.cuda import, so the recommendation is Request Changes.

Detailed review

PR Review: #25255

Summary

The PR drops CUDA 13.0: CI moves to 13.2 and SUPPORTED_CUDA_VERSIONS loses (13, 0). It also replaces the per-train torch/torchao pins with a single torch==2.15.0 read from torch_pin.py.

Two regressions block it:

  • The Espressif component generator can no longer read the torch pin.
  • torch 2.15.0 pulls a triton under which executorch.backends.cuda fails to import when the pinned flash-linear-attention is installed.

Smaller issues:

  • The release-CPU path now pairs mismatched torch and torchao versions.
  • Several CI hooks still key on the old pin location.
  • Some tests can no longer fail.

Infrastructure

  • Blocker: the Espressif component generator can no longer read the torch pin. There are two separate breaks:

    • Wrong pin text. examples/espressif/build_idf_component.sh:256 sed-scrapes "torch==…" if use_pytorch_nightly out of install_requirements.py. After this PR it captures the literal torch=={TORCH_VERSION}, which still passes the one-match check at :258. The README pip line (:537) and the VERSION stamp (:767) would then carry that placeholder, and .ci/scripts/test_espressif_idf_component.sh:112 rejects it.
    • Missing file. install_requirements.py now needs torch_pin.py next to it at import time. examples/espressif/test_version_stamp.sh:26 copies only install_requirements.py and install_utils.py into its scratch repo, so the TORCH_URL_BASE import at :261 fails with FileNotFoundError: …/torch_pin.py. That is the "17 version stamp checks failed" in Test ESP32 Emulators.

    Fix: read TORCH_VERSION in the same Python snippet that reads TORCH_URL_BASE instead of using sed. Add torch_pin.py to:

    • OTHER_INPUTS (:129-132), so uncommitted pin edits are detected;
    • the cp at test_version_stamp.sh:26;
    • the test-espressif.yml:27-28 paths.

    Then point the "cannot read the pin" negative test (test_version_stamp.sh:81-84) at torch_pin.py. Fix this →

  • A PR that only bumps torch no longer triggers the jobs that depend on it. The torch version now lives in torch_pin.py, but these filters still list only install_requirements.py:

    • build-wheels-cuda-linux.yml:14
    • build-wheels-cuda-aarch64-linux.yml:14
    • pull.yml:960, :1051 and :2162
    • trunk.yml:733
    • vulkan.yml:29 and :152
    • test-native.yml:13

    rocm.yml:25, apple.yml:30 and trunk.yml:236 already list torch_pin.py. A later PR that edits only torch_pin.py will skip the CUDA wheel builds and these jobs. Fix this →

  • windows-msvc.yml:94 hardcodes torch==2.15.0. This copy of the pin was edited by hand, so the next torch_pin.py bump will leave this job building against the old torch. Read TORCH_VERSION from torch_pin.py the way lint.yml:51-56 does. Fix this →

Testing

  • test_explicit_torchao_source_build_is_kept can no longer fail. test_install_dependencies.py:358-360 asserts that commands[1] contains no torchao==. But commands[1] is the third-party/ao install, which never carries a pin now.

    • The behavior that assertion used to guard has also changed. On cu134, commands[0] now pins torchao==0.19.0.dev20261118 even for a TorchAO source build, because install_requirements.py:112 adds the pin unconditionally. The removed cu134_requirements skipped it under torchao_from_source().
    • If installing the nightly wheel before the source build is intended (test_cpu_source_build_keeps_nightly_torchao asserts this for CPU), assert it on commands[0]. Otherwise, guard the pin with torchao_from_source().

    Fix this →

  • Several new tests restate constants instead of checking behavior.

    • test_rocm_keeps_its_own_torch_pin (test_install_dependencies.py:192-198) asserts the literal "2.14.0" and greps two scripts for strings.
    • test_domain_pins_do_not_depend_on_python_version (:187-189) passes a made-up [f"torch=={TORCH_VERSION}"] as core, so the torch half of assert_pins can only pass.
    • test_build_matrix_covers_supported_cuda_versions (test_cuda_workflow.py:35-38) hardcodes ["13.2", "13.4"] instead of reading install_utils.SUPPORTED_CUDA_VERSIONS.
    • test_no_job_uses_cuda_13_0 (:40-43) rejects only "13.0", and only in cuda.yml, although this PR also moves cuda-windows.yml.

    A test that every literal gpu-arch-version in both workflows is in SUPPORTED_CUDA_VERSIONS would also catch the next train being dropped. Fix this →

Backward Compatibility

  • Blocker: with the pinned flash-linear-attention installed, executorch.backends.cuda no longer imports.

    • Cause. This PR moves the CUDA jobs from torch==2.14.0+cu130 to torch==2.15.0+cu132, which pulls triton 3.9.0. Under that triton, importing flash-linear-attention==0.4.2 raises ValueError: key contains names that are not kernel arguments: STAGE. The error comes from the @triton.autotune at fla/ops/cp/chunk_delta_h.py:23.
    • Effect. The guard at backends/cuda/triton/kernels/__init__.py:43-50 catches only ImportError. So import executorch.backends.cuda.cuda_backend fails for anyone with that pin (cuda.yml:631, examples/models/qwen3_5_moe/requirements.txt:1). Both unittest-cuda shards on this PR fail at test collection with this error: kernel, system.
    • Fix. Move FLA to a release that supports triton 3.9, or keep CUDA on torch 2.14.0 until one exists. Also catching this failure in the guard would limit an incompatible optional FLA to disabling chunk_gated_delta_rule.
    • Confidence. I inferred, but did not reproduce, that the triton pulled by torch 2.14.0 accepted this key. The evidence is that this job ran the same FLA pin before the PR.

    Fix this →

  • Suspected: EXECUTORCH_USE_RELEASE_CPU_DEPS=1 now pairs torch 2.15.0 with torchao 0.18.0.

    • What changed. That path still installs TORCHAO_STABLE_VERSION = "0.18.0" from whl/cpu, but install_requirements.py:111 now pins torch==2.15.0 there as well. Before, it installed the matched 2.14.0 pair that examples/arm/silero_vad_example_ethos_u/README.md:39 and :42 document.
    • Risk. torchao release wheels are built against one torch release and may skip loading their C++ extensions on another. Users of this opt-in, such as examples/arm/mobilesam_prompt_segmentation_example_ethos_u/README.md:20, could silently lose torchao's compiled ops.
    • Coverage. No CI job exercises this path, and test_cpu_release_dependencies_are_opt_in only asserts the pins as written.
    • Ask. Keep a release torch matched to TORCHAO_STABLE_VERSION for this path, as ROCM_TORCH_VERSION does for ROCm, or confirm that 0.18.0 loads cleanly on 2.15.0.
    • Confidence. Low: I did not run this path.

    Fix this →

  • CUDA 13.0 source builds now fall back to CPU-only without failing.

    • On a 13.0 toolkit, determine_torch_url (install_utils.py:369-373) catches the new "13.0 is not supported" error and installs CPU torch.
    • is_cuda_available() is now false, so setup.py:2776-2784 stops auto-enabling EXECUTORCH_BUILD_CUDA.
    • The result: an existing 13.0 setup that re-runs ./install_executorch.sh loses the CUDA backend, and the only sign is one line in the install log.

    Consider a stderr warning when nvcc is found but unsupported, plus a BC note in the release notes. test_cuda_13_0_is_unsupported covers only _get_cuda_version, not this fallback. Fix this →

Recommendation

Request Changes

This PR introduces two regressions, and both already fail in its CI:

  • the Espressif generator break (Test ESP32 Emulators);
  • the executorch.backends.cuda import failure, from torch 2.15.0's triton against flash-linear-attention==0.4.2 (unittest-cuda).

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.
@Gasoonjia Gasoonjia changed the title Drop CUDA 13.0 and use one set of torch/torchao pins Drop CUDA 13.0 support and use a single TorchAO nightly pin Nov 18, 2026
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.
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 02:12 — with GitHub Actions Inactive
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results November 19, 2026 04:57 Inactive
@Gasoonjia

Copy link
Copy Markdown
Contributor Author

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 aoti_torch_dtype_element_size Windows shim, and the ESP-IDF pin read. So the ESP-IDF, FLA/triton, torch_pin.py path-filter, windows-msvc, release-CPU pairing and source-build torchao comments no longer apply: torch_pin.py, examples/espressif and the torch pins match main. Addressed in bf18dba: an unsupported CUDA toolkit now warns on stderr before falling back to CPU (tested through determine_torch_url), and the workflow tests derive versions from SUPPORTED_CUDA_VERSIONS and check every literal gpu-arch-version in cuda.yml and cuda-windows.yml.

@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 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 review

PR Review: #25255

Summary

The 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 setup.py supports on purpose, and it detects the version a second time. One workflow test misses the toolkit that the Windows export actually uses.

Code Quality

  • The warning is wrong when CUDA is turned on explicitly. install_utils.py:375-378 says "so the CUDA backend will not be built". That is only true when setup.py decides on its own (setup.py:2776-2784), which needs a supported toolkit. An explicit -DEXECUTORCH_BUILD_CUDA=ON still builds the backend on an unlisted toolkit, and setup.py:852-857 and setup.py:2755-2759 say that is deliberate. For a 13.0 toolkit, _cuda_train() then returns "13" (setup.py:858-883). So CMAKE_ARGS="-DEXECUTORCH_BUILD_CUDA=ON" ./install_executorch.sh on CUDA 13.0 installs CPU-only PyTorch next to a CUDA backend, and the log says the opposite. Fix: have the message say only what determine_torch_url decides: CPU-only PyTorch is installed because the toolkit is not a supported version. Fix this →

  • The warning detects the version a second time. _get_cuda_version has already parsed (major, minor) when it raises at install_utils.py:145. The handler still runs nvcc again through _detected_cuda_version() (install_utils.py:373), which handles errors differently. That causes three problems:

    • _selected_nvcc() raises ValueError on an unbalanced quote (install_utils.py:190), such as an apostrophe in a CUDACXX path. _detected_cuda_version catches only CalledProcessError and OSError (install_utils.py:246), so that input now crashes determine_torch_url where it used to fall back to CPU. In practice this matters only with CUDA explicitly OFF, because otherwise setup.py:788 already raises on the same input.
    • Every test in test_cu134_dependencies.py now has to mock _detected_cuda_version (:36-38).
    • The new test mocks it to return (13, 0) (:141), so the detection behind the warning never runs under test.

    Fix: raise a RuntimeError subclass carrying (major, minor) at line 145 and catch it in determine_torch_url. Then drop both mocks and patch only subprocess.run and platform.system, as test_filter_cuda_matrix.py:313-335 does. Fix this →

Testing

  • test_every_cuda_job_uses_a_supported_version (.ci/scripts/tests/test_cuda_workflow.py:49-61) checks gpu-arch-version, but export-model-cuda-windows-artifact (cuda-windows.yml:108) does not take its toolkit from there. The toolkit comes from the executorch-ubuntu-22.04-cuda-windows image, whose CUDA_VERSION is set at .ci/docker/build.sh:91, and this PR edited that line by hand. If build.sh later names an unsupported version, or a version that differs from the workflow's, the test still passes. It also passes when no job matches, because it never asserts that it checked one. Fix: read that image's CUDA_VERSION from build.sh, assert that it is supported and equals the export job's gpu-arch-version, and assert that at least one job was checked. Fix this →

Recommendation

Approve. All three points are minor follow-ups.

One more point lies outside this diff, and my confidence in it is low. The comment at install_requirements.py:30-32 says download.pytorch.org keeps nightlies for about 60 days. By that note, the kept torch==2.15.0.dev20260921+cu134 pin expires around 2026-11-20, which is now. That would break the 13.4 cell of test-cuda-builds and default cu134 installs, so the torch 2.15 follow-up is urgent.

_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.
@Gasoonjia
Gasoonjia temporarily deployed to upload-benchmark-results November 19, 2026 08:22 — with GitHub Actions Inactive
@pytorch-bot
pytorch-bot Bot temporarily deployed to upload-benchmark-results November 19, 2026 10:59 Inactive
@Gasoonjia
Gasoonjia merged commit 5e70618 into main Nov 19, 2026
@Gasoonjia
Gasoonjia deleted the gasoonjia/drop-cuda-13.0 branch November 19, 2026 18:01
Gasoonjia added a commit that referenced this pull request Nov 20, 2026
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.
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 — 06e7ad52 Deployed Nov 19, 2026 by pytorch-bot[bot]
cadence — 06e7ad52 Deployed Nov 19, 2026 by Gasoonjia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/cuda ciflow/docker Trigger docker-builds to rebuild and push the CI images for this PR ciflow/trunk 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.

3 participants