You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All GEMM tests call get_shapes(). Kernel limits come in as arguments, so each
kernel runs the shapes it supports. Shapes that pin one kernel's bug or config
stay in that kernel's test file.
ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm
vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all
All standard extended tests (excludes ci:atom_full)
Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 8214 --add-label <label>
One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.
PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.
Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.
The reason will be displayed to describe this comment to others. Learn more.
🟡 Changes recommended
Several newly shared shapes violate kernel or shuffle divisibility requirements, causing pre-launch test failures, while kernel-specific regression coverage is also lost.
This PR centralizes shape selection for AITER’s Triton/Gluon GEMM tests. It replaces repeated shape lists with a shared helper that filters cases by kernel limits.
Changes:
Adds common edge-case, decode, and prefill shapes.
Supports alignment and size filters, batch dimensions, and two-output GEMMs.
Migrates basic, batched, fused, and feed-forward tests to get_shapes().
All paths below are relative to op_tests/triton_tests/gemm/.
The shared set has no M between 33 and 64, so this test loses the router case that selects M_LEQ_64 in configs/gfx950/triton/gemm/gemm_a16w16/GEMM-A16W16-N=256-K=7168.json. Append (64, 256, 7168) locally to keep this tuned split-K tile covered without adding a kernel-specific case to the shared set.
Retain B=128 MLA decode cases for config selection
The new batch list stops testing the B=128 MLA decode configs, including BATCHED_GEMM-A16W8-B=128-N=512-K=128.json; the remaining B=128 tests in this file pass explicit configs and do not test config selection. Keep the MLA shapes as local cases added to get_shapes() so those tuned paths remain covered.
This removes the (M, 16384, 96, 5120) cases for M=1,16,64,128, leaving their specialized-config buckets unchecked. Append the tuned cases to get_shapes(); the remaining M=4 test overrides num_ksplit2 and does not cover those buckets.
The new shuffled (M, N1, K) = (1, 512, 128) case passes this guard, but its BLOCK_SIZE_K=128 gives a zero dimension in the kernel's scale reshape and prevents compilation. Also skip shuffled cases with K % 256 != 0, as the basic FP4 test does.
I like the idea of an unified get_shapes function. However, I'm not sure if changing the test shapes (adding or removing shapes) is ideal.
Every get_shapes call in this PR changes the shapes that tests run. An agent compared the old GEMM shapes with the new ones. All 47 call sites differ. A shape still present on both sides is left out of the comments.
get_shapes() replaces get_x_vals() and changes the shapes (27 → 31). On the gated call, max_size=4096*106496*16384 does not drop any shared shape, so it is this same set. On the FF tests the tuple is (batch, hidden_dim, intermediate_dim).
Added (21): (1, 128, 512), (1, 256, 7168), (1, 512, 128), (1, 1280, 8192), (1, 5120, 2880), (1, 8192, 1024), (17, 200, 384), (31, 7168, 4608), (32, 128, 512), (32, 512, 128), (32, 1280, 8192), (32, 8192, 1024), (128, 128, 512), (128, 512, 128), (128, 1280, 8192), (128, 8192, 1024), (159, 17389, 597), (1024, 256, 7168), (1024, 1280, 8192), (1024, 5120, 2880), (1024, 8192, 1024)
Removed (17): (32, 128, 2880), (32, 2880, 4096), (64, 128, 2880), (64, 256, 7168), (64, 2880, 4096), (64, 5120, 2880), (128, 128, 2880), (128, 2880, 4096), (256, 128, 2880), (256, 256, 7168), (256, 2880, 4096), (256, 5120, 2880), (2048, 2048, 2048), (2048, 5120, 2880), (4096, 106496, 16384), (5120, 5120, 5120), (8192, 8192, 8192)
Those removals are the old GPT-OSS output projection (M, 2880, 4096), GPT-OSS router (M, 128, 2880), DSR1 router and QKV at M=64 and M=256, QKV at M=2048, Llama-3 405B FC1 at M=4096, and the square GEMMs at 2048 / 5120 / 8192.
The old helper built a long list and then replaced it. What actually ran was B=1..16, M=2^0..2^8, (N, K) in {(512, 128), (128, 512)}, plus three kernel shapes. Those three stay in _KERNEL_SHAPES: (16, 32, 512, 192), (2, 7, 512, 1120), (3, 16, 128, 1120).
get_shapes(k_mult=32, max_size=256*512*128, batch=[1, 2, 4, 8, 16]) + _KERNEL_SHAPES replaces that grid (291 → 14). Six grid tuples still fall out of the new call: (1, 1, 512, 128), (2, 32, 512, 128), (4, 128, 512, 128), (8, 1, 128, 512), (16, 32, 128, 512), (1, 128, 128, 512). The other 282 are dropped.
Added (5): (1, 17, 200, 384), (2, 1, 256, 7168), (4, 1, 1280, 8192), (8, 1, 8192, 1024), (16, 1, 5120, 2880)
Tuple is (B, M, N, K). Both parts of the old helper ran: the long (M, N, K) list with B round-robin from [1, 2, 3, 5, 7, 8] (B forced to 1 when K > 16384), plus B=1..16 × M=2^0..2^8 × {(512, 128), (128, 512)}.
The new batch list excludes B=128, so this test no longer loads the two shipped B=128 MLA configs; the remaining B=128 cases pass explicit configs. Retain the former B=128 MLA shapes beside get_shapes() to keep coverage of batch-specific config selection.
[P2] This drops the gfx950 tuned-table checks at (M, 16384, 96, 5120) for M=1,16,64,128, while the remaining M=4 test overrides num_ksplit2. Append the tuned shapes here so the normal config path remains covered.
The reason will be displayed to describe this comment to others. Learn more.
Hi @Boss2002n. I'm sharing more comments on this PR:
CI passed on gfx942. Thanks for addressing this point.
Could you please ask someone more familiar with shuffling to review the PR? I'm don't understand shuffling very well, I see some test skips due to shuffling...
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The new guard skips the dedicated (8, 8192, 8192) launch regression on gfx950, leaving the specialized configuration untested instead of fixing it or preserving coverage with a strict expected failure.
Resolve the conflict in op_tests/triton_tests/gemm/basic/test_gemm_a16w16.py:
main (#8214) replaced get_fewer_x_vals() with get_shapes(), and this branch
added test_gemm_a16_w16_atomic_uneven_split directly above that decorator.
Keep the new test and take the get_shapes() decorator from main.
yuyzhang512
added a commit
to yuyzhang512/aiter
that referenced
this pull request
Nov 22, 2026
ROCm#8214 (unified get_shapes for GEMMs) multiplied the GEMM test case counts
(e.g. test_fused_gemm_a8w8_blockscale_mul_add.py 642 -> 4866 cases,
test_gemm_a8w8.py 1845 -> 8141), while split-test-times/triton.tsv still
holds the pre-ROCm#8214 times. The shards are unbalanced: MI300X shard 5 took
56.7 min of tests and hit the 60-minute job limit, and MI35X shard 7 took
54.3 min against its 60-minute test step limit.
Raise the MI300X job limit and the MI35X "Triton Tests" step limit from
60 to 90 minutes.
Co-Authored-By: Claude <[email protected]>
…with gfx950 fixes and config retune (#8266)
* ci: install triton 3.9.0 (f1bf9132) from the release_1031 channel
Move the Triton used by CI and by `pip install aiter` (setup.py runs
install_triton.sh) from triton 3.8.0 (release_0914, 7cb7b059) to triton
3.9.0 (release_1031, f1bf9132).
- Python 3.11+ only: release_1031 has cp311-cp314 wheels. On Python 3.10
install_triton.sh prints a reminder and exits 0, keeping the existing
triton; setup.py prints the same reminder instead of "Replacing existing
triton", and the README notes the requirement.
- The ROCm version comes from rocm-core (dpkg or rpm) or, on pip ROCm SDK
images, the pip `rocm` package; a failed rpm query is ignored.
- Candidate indices: the derived rocm-X.Y.0, then the newest one of the
same ROCm major (rocm-7.2.0 for 7.x such as 7.12, rocm-10.2.0 for 10.x),
then the default. An index is used only if it lists a wheel with this
interpreter's full tag (cpXY[t]-cpXY[t]-linux_<arch>), probed with
python3 urllib (no curl): HTTP 403/404 tries the next candidate, a network
error is retried and then stops.
- A local wheelhouse is used only if it holds a matching wheel. Nothing is
uninstalled until a usable source is found, so a failure leaves the
existing triton in place.
download_triton_wheel.sh reuses the same lookup via
`install_triton.sh --resolve` instead of a copy of it.
Co-Authored-By: Claude <[email protected]>
* [Triton] Fix mxfp4 quant compile on triton 3.9
Triton 3.9 rejects `scalar[None, :]` ("too many indices for tensor of
rank 0"). _dynamic_mxfp4_quant_kernel_asm_layout indexes the scalar pid_n
that way in its block-scale stores. Use `pid_n + tl.arange(0, 1)`: a
rank-1, size-1 range that broadcasts identically and compiles on triton
3.8 and 3.9.
Co-Authored-By: Claude <[email protected]>
* [Triton][gfx950] Retune FF fused small-M tiles to fit LDS on triton 3.9
The M_LEQ_4 / M_LEQ_8 buckets of 7 FF-A16W16-fused-N=*-K=* configs, and the
M_LEQ_64 bucket of 4 of them (N=11264/K=2048, N=16384/K=1280,2048,8192),
used BM=32, BN=128, BK=256, ns=2, which needs 168864 B of LDS on triton 3.9
(limit 163840) and fails to compile. The ungated kernel already overflowed
on triton 3.8.
- M_LEQ_4, M_LEQ_8 (all 7 files): BM=16, BN=128, BK=256, ns=2, nw=4.
- M_LEQ_64 (those 4 files): BK=128, ns=3 (BM=32, BN=128, nw=8 unchanged).
The other 3 files' M_LEQ_64 (BM=64, BN=256, BK=64, ns=3) is unchanged.
Picked from tile sweeps on triton 3.9 (gfx950). BN stays 128: the ungated
kernel adds its output with bf16 atomic adds, one per N-tile, and BN=64
doubled the misses against the torch reference. The new tiles fit LDS on
triton 3.8 and 3.9. On MI350X, gated shapes are +3.0% TFLOPS over triton
3.8 with the old configs (median; +13.2% at M 16-64), and the ungated
shapes, which failed before, now run. With triton 3.8 alone the new
configs are +3.4% over the old ones.
The gfx950 launch tests now also cover the retuned buckets: gated M=4/64
(N=16384, K=8192) and ungated M=8/64 (N=16384, K=1280), checked against the
torch reference. get_x_vals() does not reach these buckets.
Co-Authored-By: Claude <[email protected]>
* ci: deselect triton 3.9 known-issue attention cases
- test_mha_dao_ai_capture[mha-cpu] and [mha-cuda] (MI35X and MI300X):
GPU memory fault in bwd_kernel_fused_causal (MHA backward with dropout),
an LLVM InlineSpiller miscompile. The gqa variants pass. Fix pending in
llvm/llvm-project#226689, verified on gfx950 by
rebuilding the triton 3.9 codegen LLVM with it.
- 8 varlen head-dim 33/53 test_mha_dao_ai_backward_head_size cases
(MI300X): wrong gradients or a fault on gfx942; not root-caused.
Restore them once triton ships a fix.
Co-Authored-By: Claude <[email protected]>
* [Triton][gfx942] unified_attention: 3D config for head sizes >= 256 fits LDS on triton 3.9
Heads above 256 pad to a 512-wide tile. With the default attn_3d config
(num_warps=2, num_stages=2) the 3D kernel needs 128 KiB of LDS on triton 3.9,
over gfx942's 64 KiB, so test_triton_unified_attn_prefill_head_sizes
[q_dtype0-kv_dtype0-None-320-seq_lens0] fails on MI300X (OutOfResources).
Use the D_GEQ_512 settings (num_warps=4, num_stages=1) from head 256 up.
Co-Authored-By: Claude <[email protected]>
* ci: deselect three triton 3.9 known failures in the flash-attention tests
With triton 3.9 (f1bf9132) these cases fault or hang in
bwd_kernel_fused_causal, the same LLVM miscompile as test_mha_dao_ai_capture:
- test_flash_attn_output[0.0-0.17-2048-2048-128-True-False-False-False-mha-dtype0-True]
- test_flash_attn_output[0.0-0.17-2048-2048-128-True-False-False-False-mha-dtype0-False]
- test_flash_attn_varlen_output[0.0-0.17-1024-1024-32-True-False-True-False-mha-dtype0-False]
They pass on triton 3.8 and pass once the triton 3.9 codegen LLVM has
llvm/llvm-project#226689 (still open). On MI350X,
all 396 dropout cases of both tests were run one per process; only these
three fail, every time. One of them hangs, which --timeout=120 does not
stop, so CI would hit the step limit.
Deselect them where test.sh runs these tests (v2-pr and v2-full).
Co-Authored-By: Claude <[email protected]>
* ci: install triton from the release-1031 index
Switch the AMD Triton index path from release_1031 to release-1031. The
new index serves triton 3.9.0 git24d5394c (release_1031 had f1bf9132) with
the same layout: cp311-cp314 wheels and triton-kernels 1.0.0 for ROCm 7.0,
7.1, 7.2, 10.1 and 10.2, and HTTP 403 for ROCm versions without an index.
Co-Authored-By: Claude <[email protected]>
* [CI] Raise triton test timeouts to 90 minutes
#8214 (unified get_shapes for GEMMs) multiplied the GEMM test case counts
(e.g. test_fused_gemm_a8w8_blockscale_mul_add.py 642 -> 4866 cases,
test_gemm_a8w8.py 1845 -> 8141), while split-test-times/triton.tsv still
holds the pre-#8214 times. The shards are unbalanced: MI300X shard 5 took
56.7 min of tests and hit the 60-minute job limit, and MI35X shard 7 took
54.3 min against its 60-minute test step limit.
Raise the MI300X job limit and the MI35X "Triton Tests" step limit from
60 to 90 minutes.
Co-Authored-By: Claude <[email protected]>
* [Triton] dao_ai bwd: smaller RDNA tiles to avoid an LLVM crash on gfx1100
Triton 3.9's LLVM aborts while compiling bwd_kernel_fused_causal for
gfx1100 at head dim 112 with varlen (InlineSpiller::reMaterializeFor
"corrupted sub-interval" assertion). This killed the RDNA3 MHA bench at
kimik25-tp4 d=112 bwd_varlen.
Halve BLOCK_M1 and BLOCK_N2 (32 -> 16) in the RDNA bwd configs, autotune on
and off. Only the arch.is_rdna branches change; gfx942/gfx950 configs are
untouched. Cross-compiled for gfx1100, all 160 bench bwd/bwd_varlen cases
now compile. Runtime behaviour on RDNA3 is checked by the RDNA3 CI job.
Co-Authored-By: Claude <[email protected]>
* ci: deselect a triton 3.9 RDNA3 failure in the FA output test
test_flash_attn_output[0.0-0.17-2048-2048-96-False-False-False-False-mha-dtype0-True]
fails on the RDNA3 (gfx1100) runner with triton 3.9. Deselect it in the
v2-pr-rdna3 run only; other archs still run it.
Co-Authored-By: Claude <[email protected]>
* ci: skip the triton 3.9 RDNA3 flash-attention output failures by pattern
On RDNA3 (gfx1100) 30 test_flash_attn_output -k 2048-2048 cases fail with
triton 3.9, some by crashing the pytest process. All are mha (no mqa or gqa),
in two groups:
- dropout 0.0, causal, head dim 32/59/64: all alibi x kvpacked combinations (12)
- dropout 0.17, head dim 96/111/128: 18 of 24 causal x alibi x kvpacked combinations
Skip both groups with one -k pattern instead of ids, which also covers the
96-False-False-False-False case deselected before. The pattern skips 36 of the
528 cases: the 30 failures, the 2 96-False-False-False-False cases, and 4
dropout cases that passed in this run (96 causal+alibi, 128 non-causal without
alibi), which look like dropout luck rather than a different rule. 492 cases
still run.
Co-Authored-By: Claude <[email protected]>
---------
Co-authored-by: Claude <[email protected]>
…e list (#8534)
#8214 moved test_gemm_afp4wfp4.py onto the shared get_shapes list. Four
exact test_gemm_afp4_wfp4 IDs no longer exist, so the P1 manifest fails at
collection, and test_gemm_mxfp4_preshuffled_gfx1250 no longer collects 70
nodes. Select the 44 preshuffled nodes that run on gfx1250 by ID, leaving
out the 42 that skip by design and the (256, 106496, 16384) shape (#8533),
and replace the four removed shapes with four from the shared list. P1 is
229 nodes, all passing on gfx1250.
Co-authored-by: Claude <[email protected]>
Conflicts resolved in op_tests only: kept upstream's shared get_shapes() and the test removals of ROCm#8036/ROCm#8214 next to this branch's changes.
Signed-off-by: Martin Domanský <[email protected]>
Ragua1
added a commit
to Ragua1/aiter
that referenced
this pull request
Nov 30, 2026
Conflicts resolved in op_tests only: kept upstream's shared get_shapes() and the test removals of ROCm#8036/ROCm#8214 next to this branch's changes.
Signed-off-by: Martin Domanský <[email protected]>
Ragua1
added a commit
to Ragua1/aiter
that referenced
this pull request
Nov 30, 2026
Conflicts resolved in op_tests only: kept upstream's shared get_shapes() (ROCm#8214) next to this branch's changes. The new 16 < M < 32 skip for preshuffled weights in test_fused_gemm_afp4wfp4_a16w16 no longer applies on software-emulated FP4 archs: they run only with their own table, which gives M < 32 a BLOCK_SIZE_M of 16.
Signed-off-by: Martin Domanský <[email protected]>
Ragua1
added a commit
to Ragua1/aiter
that referenced
this pull request
Nov 30, 2026
Conflicts resolved in op_tests only: kept upstream's shared get_shapes() and the test removals of ROCm#8036/ROCm#8214 next to this branch's changes.
Signed-off-by: Martin Domanský <[email protected]>
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
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.
All GEMM tests call get_shapes(). Kernel limits come in as arguments, so each
kernel runs the shapes it supports. Shapes that pin one kernel's bug or config
stay in that kernel's test file.