Skip to content

[executorch][ci] Split unittest-cuda into kernel and system shards - #24047

Open
Gasoonjia wants to merge 1 commit into
mainfrom
gasoonjia/split-unittest-cuda
Open

Gasoonjia wants to merge 1 commit into
mainfrom
gasoonjia/split-unittest-cuda

Conversation

@Gasoonjia

Copy link
Copy Markdown
Contributor

unittest-cuda has hit its 90 min timeout on every main run since a04a9f9 (#24004). That commit made the SDPA autotune tests about 6.5 min slower (test_triton_sdpa.py went from 10.4 to 16.9 min). The job already took 83–89 min before it, so the extra time pushed it over the limit. Example run: https://github.com/pytorch/executorch/actions/runs/39464763398/job/118773442760

This PR splits the job into a two-shard matrix:

  • unittest-cuda (kernel): Triton kernel and autotune tests. That covers SDPA, split-K SDPA, SDPA NaN, tq4 SDPA, int4 matmul, int5 large GEMM, quantized GEMM family, fused MoE, fused deltanet decode, chunk gated delta rule, topk, autotune inputs and launch params, and the Triton mutation cache. About 42 min of pytest.
  • unittest-cuda (system): everything else under backends/cuda/tests and backends/cuda/passes/tests. That covers the lowering passes (off-graph KV, DFlash off-graph KV, SDPA split-K replacement), quantized op dispatch, and export, partitioner and runtime tests. This shard also runs the pybindings device tests, the C++ shim tests, and the Qwen 3.5 MoE and Gemma 4 31B model tests. About 28 min of pytest.

Kernel tests are listed explicitly in KERNEL_TESTS. The system shard runs the test directories and passes --ignore for the kernel files and for the quantized GEMM files that unittest-cuda-quantized-gemm already runs, so any new test file goes to the system shard by default. Both shards still do the full install and build, including executor_runner, because both have e2e tests that need it. Both pytest calls now pass --durations=20.

Test plan:

  • Checked that the YAML parses, that every listed test file exists, and that the kernel shard (14 files), system shard (19), and quantized GEMM job (7) together cover all 40 backends/cuda/tests/test_*.py files with no overlap.
  • Ran bash -n on the script for each shard.
  • python -m unittest .ci/scripts/tests/test_muse_glimmer_batching_ci.py passes. That test parses cuda.yml.
  • CI on this PR: both unittest-cuda shards should finish well under 90 min.

@pytorch-bot

pytorch-bot Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24047

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure, 9 Pending

As of commit 491e1ca with merge base 8d9eec3 (image):

NEW FAILURE - The following job has failed:

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 Oct 21, 2026
@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Gasoonjia / name: gasoonjia (491e1ca)

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

unittest-cuda has timed out at 90 min on every main run since a04a9f9
made the SDPA autotune tests ~6.5 min slower; the job was already at
83-89 min before that.

Split it into a matrix:
- kernel: Triton kernel and autotune tests (SDPA, tq4 SDPA, int4 matmul,
  int5 large GEMM, fused MoE, deltanet, topk, autotune inputs/launch
  params, mutation cache). ~42 min of pytest.
- system: everything else under backends/cuda/tests and passes/tests
  (lowering passes, op dispatch, export/partitioner/runtime), plus the
  pybindings device tests, C++ shim tests, and Qwen 3.5 MoE / Gemma 4 31B
  model tests. ~28 min of pytest.

The system shard runs the test directories with the kernel and quantized
GEMM files ignored, so new tests default to it.

Test plan: CI on this PR; both unittest-cuda shards should finish well
under the 90 min timeout.
@Gasoonjia
Gasoonjia force-pushed the gasoonjia/split-unittest-cuda branch from 91352c3 to 491e1ca Compare October 21, 2026 17:25
@Gasoonjia
Gasoonjia marked this pull request as ready for review October 22, 2026 05:56
@Gasoonjia
Gasoonjia added this pull request to stack #24077 October 22, 2026 07:28

This branch was successfully deployed

1 active deployment
cadence — 491e1ca1 Deployed Oct 21, 2026 by Gasoonjia via hifi1s-op-test / hifi1s #34288
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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