Skip to content

Fix main ROCm CI: ProbeTest skip order, flaky SDPA pick test, drop torchcodec from voxtral - #25393

Merged
Gasoonjia merged 2 commits into
mainfrom
gasoonjia/fix-main-rocm-ci
Nov 21, 2026
Merged

Gasoonjia merged 2 commits into
mainfrom
gasoonjia/fix-main-rocm-ci

Conversation

@Gasoonjia

@Gasoonjia Gasoonjia commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

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 [executorch][cuda] Choose among a call's implementations by measuring them on the export GPU #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 Use torch 2.15.0 for every CUDA train #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.

…hcodec

- ProbeTest.setUp imported executorch.export (and so pandas, which the minimal
  ROCm install lacks) before the base class skip without Triton on CUDA, so it
  errored on ROCm instead of skipping. Call super().setUp() first.
- Deselect SdpaCellStepAutotuneTest::test_compiled_pick_is_fastest_at_live_extents
  on ROCm: without CUDA-graph autotune timing the compiled pick is sometimes
  1.66x off the graph-timed best on MI350.
- The voxtral ROCm job's unpinned conda ffmpeg now resolves to FFmpeg 9, which
  torchcodec 0.11 can't load, and before that hung the conda solve until the
  180-minute timeout. Nothing in the job needs either: decode the dataset's WAV
  bytes with soundfile and drop torchcodec and ffmpeg.
@pytorch-bot

pytorch-bot Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

⏳ 48 Pending, 1 Unrelated Failure

As of commit 6549cb2 with merge base e9ddcda (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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 20, 2026
@Gasoonjia

Copy link
Copy Markdown
Contributor Author

@claude review effort=max

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

@claude

claude Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Claude finished @Gasoonjia's task in 16m 20s —— View job


PR Review: #25393

Requesting one change: the SDPA deselect in test-rocm-aoti.sh hides a real ROCm autotune mis-pick, gives a cause the code doesn't support, and links no tracking issue. The other points are minor.

Detailed review

Summary

The PR fixes the two ROCm gfx950 jobs that fail on main:

  • ProbeTest.setUp now calls super().setUp() before the executorch.export import.
  • The flaky SdpaCellStepAutotuneTest pick test is deselected.
  • torchcodec and FFmpeg are dropped from the voxtral job.

The deselect is the one problem to fix before merge. There are also two small points about the voxtral job's dependencies.

Testing

  • .ci/scripts/test-rocm-aoti.sh:153-155: the deselect removes the only ROCm check of a config that real ROCm exports pick. The cause it gives isn't backed by the code, and it links no tracking issue.
    • The comparison with the test_cuda_graph_timing.py exclusion doesn't hold.
      • That file tests autotune/cuda_graph_timing.py, which CudaBackend turns off on ROCm (cuda_backend.py:1655, :1717).
      • This test covers autotune_input_scenarios(), which runs unconditionally, ROCm included (cuda_backend.py:1710).
      • _compile_picks goes through CudaBackend with only the method-name spec (test_autotune_inputs.py:181-189). So a default ROCm export of this masked cell-step SDPA can compile in the config that ran 1.66× slower at live=4650.
      • The test is catching the ROCm performance problem it was written to catch, not an artifact of its own timing.
    • Missing graph timing doesn't explain the flake on its own.
      • SdpaKvLenAutotuneTest::test_compiled_pick_is_fastest_at_runtime_kv_lengths (test_autotune_inputs.py:264-271) makes the same comparison and stays enabled:
        • the compile-time pick is made without graph timing on ROCm;
        • it is checked against time_with_cuda_graph_us;
        • the bound is the same MAX_REGRET = 1.10.
      • The difference is the mask. The compile-time scenarios time an all-visible mask (triton/kernels/sdpa.py:55-62), but the test times a sparse cell mask (test_autotune_inputs.py:296-301).
      • If the two PACK_GQA variants nearly tie on the all-visible objective, that alone would explain a pick that flips in 2 of 13 runs. This is low confidence and needs an MI350 to confirm.
    • Suggestion:
      • Keep the deselect if main needs to go green now, but file an issue and cite it.
      • Have the comment state what was observed, not a cause. For example: # Flaky on gfx950: the compiled pick was 1.66x the best at live=4650 in 2/13 main runs (#NNNN).
      • Fix this →

Infrastructure

  • .ci/scripts/test-rocm-voxtral.sh:124-136: question, low confidence. Could the same FFmpeg 9 break hit test_model_e2e.sh?
    • .ci/scripts/test_model_e2e.sh:379-394 has the same three pieces this PR removes:
      • an unpinned conda install -y -c conda-forge ffmpeg;
      • torchcodec==0.11.0;
      • a fetch that decodes load_dataset(...)[0]['audio'].
    • Whisper and voxtral_realtime take that path, since both set AUDIO_URL="" (lines 192 and 281).
    • On Linux, the apt-get branch installs the distro FFmpeg. On macOS (the Metal whisper jobs, metal.yml:316), the conda branch runs whenever ffmpeg isn't already on PATH.
    • If those runners don't ship FFmpeg, the same Audio(decode=False) plus soundfile fetch would remove the dependency there too.

Code Quality

  • .ci/scripts/test-rocm-voxtral.sh:75: librosa is still installed, though nothing in the job imports it.
    • The PR description says this itself, and grep agrees. Nothing under examples/models/voxtral_realtime imports it. Under extension/audio, it only appears in the Buck-only targets.bzl:19.
    • The PR's own reasoning ("Nothing in this job needs them") applies, so it can go with torchcodec. That also saves installing numba, llvmlite and scikit-learn on every run.
    • Fix this →

Recommendation

Request Changes. The blocking change is small: the SDPA deselect needs a tracking issue, and its comment should describe what was observed rather than an unproven cause. That's a two-line edit. The other two points are optional.

  • Load /pr-review skill and gather context
  • Run 3 independent reviewers over every changed line
  • Consolidate and fact-check findings against the code
  • Check CI status. Both ROCm gfx950 jobs on this PR (unittest-rocm-gfx950, test-voxtral-realtime-rocm-gfx950) were still running when this was posted, so neither fix has been confirmed on hardware yet.
  • Post final review
    • Branch: gasoonjia/fix-main-rocm-ci

The deselect comment now states what was observed and links the tracking issue
instead of an unconfirmed cause. Nothing in the voxtral ROCm job imports
librosa.
@Gasoonjia

Copy link
Copy Markdown
Contributor Author

Addressed in the latest push:

  • SDPA deselect: filed ROCm gfx950: SdpaCellStepAutotuneTest compiled pick intermittently 1.66x off the best #25397 with the observed failures and your two hypotheses: no graph timing on ROCm, and the all-visible vs. sparse-cell mask in the compile-time scenarios. The comment now says only what was observed: Flaky on gfx950: the compiled pick was 1.66x the best at live=4650 in 2 of 13 main runs (#25397). I'm keeping the deselect so main goes green; the issue tracks re-enabling the test.
  • librosa: dropped. Nothing in the voxtral ROCm job imports it.
  • test_model_e2e.sh with FFmpeg 9: a fair question, but it covers other jobs, so I'm leaving it out of this PR. On Linux, that script installs FFmpeg with apt-get. On macOS it only uses conda when ffmpeg isn't on PATH.

CI on 8c03ae8: test-voxtral-realtime-rocm-gfx950-rocm7.2 passes on MI350. The new soundfile fetch worked, and the conda install no longer hangs.

@Gasoonjia

Copy link
Copy Markdown
Contributor Author

@claude review effort=max

@claude

claude Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Claude finished @Gasoonjia's task in 17m 30s —— View job


PR Review: #25393

Approve: nothing blocking is left. The one minor item is the PR description, which becomes the commit message on merge and was written before 6549cb2.

Detailed review

Summary

The PR does three things:

The only problem found is that the PR description is out of date.

Code Quality

Recommendation

Approve. The description update is optional and doesn't block the merge.

  • Load /pr-review skill and gather context. main has moved to e1390b6 (Use torch 2.15.0 for every CUDA train #25284) since this branch was cut. It edits both ROCm scripts, but in different hunks.
  • Run 3 independent reviewers over every changed line
  • Consolidate and fact-check findings against the code. I dropped candidates that repeated first-round points you already settled, and ones that didn't hold up against the code.
  • Check CI status. On 6549cb2, unittest-rocm-gfx950-rocm7.2 and test-voxtral-realtime-rocm-gfx950-rocm7.2 were still running when this was posted. So far the only reported green run is voxtral on 8c03ae8, which still installed librosa. unittest-rocm-gfx950 has no reported result yet, and it's the job that covers the ProbeTest and deselect fixes.
  • Post final review
    • Branch: gasoonjia/fix-main-rocm-ci

@Gasoonjia
Gasoonjia merged commit f8907c1 into main Nov 21, 2026
@Gasoonjia
Gasoonjia deleted the gasoonjia/fix-main-rocm-ci branch November 21, 2026 00:07

This branch was successfully deployed

1 active and 1 inactive deployments
upload-benchmark-results — 6549cb21 Deployed Nov 21, 2026 by Gasoonjia
cadence — 6549cb21 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/rocm CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: rocm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants