Repository navigation
Conversation
M>=2048 fp8xfp4 rows were tuned for 256 CUs with a 1x4 cluster. The bench winner drops the cluster and uses 1x4 warps with 2 buffers. TP1 8k/1k c64 +1.7%, 70k/300 c4 +2.6%.
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
… the 256-CU ones. The M >= 2048 winner was measured on a 96-CU partition, so key it cu_num=96 and leave the 256-CU tuning as it was. Write every scheduling cell explicitly instead of leaving them blank; the values are the ones the blanks resolved to.
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
|
The two red Standard Tests shards look unrelated to this change (it only adds gfx1250 / cu_num=96 rows to the gpt-oss grouped-MoE CSV, which gfx950 never looks up):
If shard 2 flakes again after this update, could someone re-run the failed job? Thanks! |
zufayu
left a comment
There was a problem hiding this comment.
AITER SOP code review on current head ff72526:
The five 96-CU rows do not show an independent row-level logic blocker, but the edited gptoss_gfx1250_tuned_grouped_fmoe.csv file no longer exists on current main. This must be rebased and migrated to the active GPT-OSS config schema before the code/config review can close.
Primary reviewer: @yzhou103 (tuning/config owner); @yadaish can co-review the FlyDSL kernel/config pairing.
Author action: migrate the rows, prove the 96-CU TP1 lookup selects them, and attach accuracy plus performance against an explicit baseline. Current Docker Hub rate-limit failures are infrastructure, but CI must be rerun after the migration.
|
@zufayu thanks for the review. The CSV is still on main: On our side, accuracy and performance numbers against an explicit baseline for the 96-CU rows are still outstanding, and so is a check that the TP1 lookup selects them. If the migration you mentioned refers to something other than the file on main, please say what it is. |
… test GptOss96CuPrefillLookupTest reads every tuned grouped-MoE table the runtime merges and checks, with gfx and cu_num mocked: - 96 CUs, fp8 x fp4, M 2048 to 32768 (and M above 32768, capped): the new 128x256x256 rows, 1x4 warps, 2 buffers, no cluster; - 96 CUs at M <= 1024, and fp4 x fp4 at any M: the 256-CU rows, the same row a 256-CU part gets; - 256 CUs: the same row with and without the 96-CU rows in the table. Fails on main's CSV (no 96-CU rows); passes on this branch (CPU only). Co-Authored-By: Claude <[email protected]>
… test dtypes.fp8 follows the host: without a visible GPU it is torch.uint8, so the 96-CU lookup test asked for uint8 activation rows and found none (1 failure, 29 subtest errors on a GPU-less host; reported by codexB). The CSV key is gfx1250's OCP e4m3fn, so the test uses torch.float8_e4m3fn directly. Passes with and without a visible GPU. Co-Authored-By: Claude <[email protected]>
Summary
On a 96-CU gfx1250 partition (MI455X in DPX), gpt-oss TP1 fp8 x fp4 (a8w4) MoE prefill ran the 256-CU rows, tuned with a
1x4 cluster. This adds five
cu_num=96rows (token 2048, 4096, 8192, 16384, 32768): 128x256x256 for both GEMMs, 1x4warps, 2 buffers, no cluster, the schedule the original tuning on a 96-CU partition picked. The 256-CU rows are
unchanged. Config only.
Changes
aiter/configs/model_configs/gptoss_gfx1250_tuned_grouped_fmoe.csv: five rows, gfx1250, cu_num 96, model_dim 3072,inter_dim 3072 (gpt-oss TP1), 128 experts, top-4, Swiglu, bf16 out, fp8 e4m3fn activations, fp4 weights, per-1x32.
The scheduling cells are written out (no cluster, default TDM waves, no next-stage prefetch). Like every row in this
file,
us/tflops/bware 0: they are not measurements.M above 32768 uses the 32768 row (the lookup caps at the largest row). M <= 1024 has no 96-CU row and keeps the 256-CU
rows, as before. A 256-CU part never sees these rows; fp4 x fp4 rows are untouched.
op_tests/tuning_tests/test_grouped_ep_fused_lookup.py:GptOss96CuPrefillLookupTestpins that selection (CPU only,gfx and CU count mocked, reads every merged grouped-MoE table).
TP1 only (inter_dim 3072); TP2 (inter_dim 1536) and other models have no new rows. In SGLang, gpt-oss reaches this table
only through the FlyDSL grouped MoE (
SGLANG_GFX1250_W4A8_FLYDSL=1, batches of at least 384 tokens); without thatswitch the MoE runs the Triton/Gluon
moe_gemm_a8w4and this PR has no effect.Performance
Op level, MI455X (gfx1250) 96-CU partition with the other partition of the card idle, image
rocm/sgl-dev:v1.0.0-rocm101-mi45x-20261202(Triton 3.9.0, FlyDSL 0.5.0), this branch at 99911fa, gpt-oss TP1 MoE (fused_moe, graph timing):Before = main's CSV, after = this CSV, selected through
AITER_CONFIG_GROUPED_FMOEin the same tree (same code); threealternating rounds, fresh process each, spread < 0.2 %. Every case passed the accuracy check. The gemm1 / gemm2 column
is the same command with
--scenario kernel, first round.End to end (serving) not re-measured on this head.
Earlier measurement (original description, November, an older image and stack; not re-run on this head): on the 96-CU
partition, gpt-oss-120b TP1 8k +1.7 %, 70k +2.6 % output throughput, TTFT at 8k about -5 %.
The base1130_v3 stack (MI450 gpt-oss measurements, 12-01) carried this change as an earlier commit with the same five
rows, byte for byte. That stack's A/B has the rows in both arms, so it does not measure this PR alone. The grouped-MoE
kernels under the rows changed on main since then, which is why the numbers above are labelled earlier.
Testing
Unit tests added or updated
Performance benchmarks run on this head (op level; serving not re-run)
Tested on MI250X
Tested on MI300X
CPU:
GptOss96CuPrefillLookupTest5 passed, with and without a visible GPU; it fails on main's CSV.op_tests/tuning_tests/test_config_shape_collision.py -k grouped_fmoepasses.MI455X (gfx1250) 96-CU partition, image
rocm/sgl-dev:v1.0.0-rocm101-mi45x-20261202(torch 2.12.0+rocm10.1.0,Triton 3.9.0, FlyDSL 0.5.0), this branch's CSV against main ecfa616, same device:
the 96-CU rows, M <= 1024 and every fp4 x fp4 case select the 256-CU rows; on main every case selects a 256-CU
row.
python op_tests/flydsl_tests/test_flydsl_grouped_gemm.py --scenario csv --csv-path aiter/configs/model_configs/gptoss_gfx1250_tuned_grouped_fmoe.csv --no-check-aot-cache(fused_moe against thetorch reference, one case per row, two data/scale inits): head 58/58 passed, the new rows included; main 48/48.
GPU_ARCHS=gfx1250 python -m aiter.aot.flydsl.moe --row-tokens-only --csv <the CSV above>: 29 kernels, 174replays, 0 failed. The run-only sweep (same CSV sweep without
--no-check-aot-cache) then passes 54/58: every newrow passes; the 4 failures are the two unchanged 256-CU rows at token 512 (two inits each), which miss the prebuilt
cache on a 96-CU part because their route-quant K split depends on the device CU count while the prebuild uses the
row's 256. Main has the same rows.
Documentation
Tuned rows only; the lookup is unchanged.
Dependencies
Independent of the other gfx1250 gpt-oss PRs (#7743 -> #8883 -> #8884 -> #8885, #7745, #7746). Branch merged main
ecfa616.
Breaking Changes
None.
PR Self-Review
Reviewed revision
99911fa
Behavior and intent
On a 96-CU gfx1250 partition, gpt-oss TP1 a8w4 MoE prefill at M >= 1025 (padded token 2048 and up) uses a 96-CU
schedule (128x256x256, 1x4 warps, 2 buffers, no cluster) instead of the 256-CU rows tuned with a cluster. A 96-CU part
had no rows of its own for this shape.
Validation and unverified scope
python -m unittest op_tests.tuning_tests.test_grouped_ep_fused_lookup.GptOss96CuPrefillLookupTest: 5 passed.test): device lookup, 0 unexpected selections on this branch and on main;
test_flydsl_grouped_gemm.py --scenario csvagainst the torch reference, 58/58 passed (main 48/48);aiter.aot.flydsl.moeprebuild, 174 replays passed; run-only sweep 54/58 (the misses are unchanged 256-CU rows).test_flydsl_grouped_gemm.py --scenario bench/--scenario kernel,main's CSV vs this CSV, all cases passed; fused_moe -20 to -22 % at M 8192 to 65536 (Performance).
and other models (no rows); 256-CU parts (unchanged by construction, pinned by the CPU test).
PR-specific question
Consumers: rows with
gfx1250, cu_num 96, token 2048..32768, model_dim 3072, inter_dim 3072, expert 128, topk 4, Swiglu, bf16, fp8 e4m3fn x fp4x2, per_1x32, read by_find_grouped_config(FlyDSL grouped MoE,aiter.fused_moeon gfx1250).Unrelated shapes:
GptOss96CuPrefillLookupTestasserts that 256-CU lookups return the same row with and without the newrows, that 96-CU lookups at M <= 1024 and every fp4 x fp4 lookup return the 256-CU row, and that only these five rows
exist for the shape. The device lookup on main and this branch agrees.
Changed op tests
op_tests/tuning_tests/test_grouped_ep_fused_lookup.py: newGptOss96CuPrefillLookupTest(CPU): selection of the 96-CUrows, the M > 32768 cap, the M <= 1024 and fp4 fallbacks, 256-CU lookups unchanged. Not redundant: no test covered a
per-CU-count row in this table.
🤖 Generated with Claude Code