Repository navigation
[cuda] Check INT4 autotune decisions on ROCm without the CUDA-graph pick-quality bound - #23642
Merged
Merged
Conversation
…ick-quality bound Int4AutotunePickTest lowers eight INT4 decode kernels through the CUDA backend with every core busy, then re-times every candidate with the CPU paused and asserts AOTI picked within 10% of the fastest. That bound holds because AOTI times candidates with CUDA graphs, which #23604 turned off on ROCm (a failed capture invalidates the HIP stream). On gfx950 the test fails on a different kernel every run (regret 1.26, 1.42, 1.57) and takes ~40 min, most of it re-timing candidates whose result cannot pass. On ROCm the test now records the decisions without re-timing them (record_autotune_picks(..., measure=False)) and keeps its other checks: the CPU-saturated AOTI compile through every INT4 kernel, one decision per kernel, and a candidate count the pruning allows. The regret bounds stay on CUDA, unchanged. The docstrings say what ROCm checks.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23642
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Cancelled JobAs of commit ea9dded with merge base 068c08e ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
Gasoonjia
added a commit
that referenced
this pull request
Oct 9, 2026
Since #23603 the QuantizedGemmFamily kernels compile and run on gfx950 instead of failing fast at the Triton compile. As a result `unittest-rocm-gfx950` went from ~28 to ~80 minutes (https://github.com/pytorch/executorch/actions/runs/37914177023/job/113766563170: 10:02–11:22, pytest 67.6 min). At the current 90-minute timeout one run was already cancelled (https://github.com/pytorch/executorch/actions/runs/37848283613/job/113554882943). Where the time goes (gfx950, with #23642): | | minutes | |---|---| | `test_int4_quantized_gemm.py` | 46.4 (of which `Int4AutotunePickTest` 36.6) | | `test_int8_quantized_gemm.py` | 4.4 | | `test_int5_quantized_gemm.py` | 3.4 | | everything else | < 3 each | `Int4AutotunePickTest`'s time is the CPU-saturated AOTI compile, which is what that test exercises. ### Change - Raise the job's `timeout` from 90 to 150 minutes. The other gfx950 jobs in this workflow use 180. - No test is dropped or split out. Splitting would be the alternative if the extra runner time per PR is acceptable. ### Test plan CI: `unittest-rocm-gfx950` completes instead of being cancelled at 90 minutes.
Gasoonjia
marked this pull request as ready for review
October 13, 2026 00:11
rascani
approved these changes
Oct 13, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Int4AutotunePickTestlowers eight INT4 decode kernels through the CUDA backend with every core busy. It then re-times every candidate with the CPU paused and asserts that AOTI picked within 10% of the fastest. That bound holds because AOTI times candidates with CUDA graphs, and #23604 turned that off on ROCm (a failed capture invalidates the HIP stream).On
unittest-rocm-gfx950the test fails on a different kernel every run (https://github.com/pytorch/executorch/actions/runs/37885665609/job/113675175602):_int4_w4a8_bucket_kernel_11.26×4cc27a3511_int4_w4a8_bucket_kernel_31.42×4cc27a3511_int4_w4a8_bucket_kernel_41.57×It also takes ~40 min there (~20 min on CUDA), most of it re-timing candidates whose result can't pass. That's what pushes the ROCm job toward its 90-min timeout.
Change
record_autotune_picks(..., measure=False)).Test plan
CI:
unittest-rocm-gfx950(Int4AutotunePickTestshould pass and get much faster) andunittest-cuda/unittest-cuda-quantized-gemm(unchanged on CUDA).