Skip to content

[Config] [MoE] [gfx950] Qwen3-235B FP8 EP: drop the token=1,2 tuned fmoe rows that lose to the CK 2-stage default - #6681

Merged
yifehuan merged 1 commit into
ROCm:mainfrom
afriedri-amd:gfx950-fmoe-qwen3-235b-ep-decode
Oct 22, 2026
Merged

yifehuan merged 1 commit into
ROCm:mainfrom
afriedri-amd:gfx950-fmoe-qwen3-235b-ep-decode

Conversation

@afriedri-amd

Copy link
Copy Markdown
Contributor

Purpose

aiter/configs/model_configs/a8w8_blockscale_tuned_fmoe_qwen3_235b.csv has rows for the Qwen3-235B-A22B FP8 TP8 + expert-parallel shape (cu_num 256, model_dim 4096, inter_dim 1536, 16 local experts, top-8, per_1x128). At token=1 and token=2 those rows select the 1-stage ASM fmoe_bf16_blockscaleFp8_g1u1_vs_pf2_silu_16x128, which is slower than the CK 2-stage default that fused_moe picks when no row matches.

These rows were not reachable under EP until #5734 (in v0.1.23). Before that, get_2stage_cfgs did topk -= int(is_ep), so the lookup key had topk=7 and missed these topk=8 rows. EP runs then fell back to the CK 2-stage default. After #5734 the rows match. On MI355X/MI350X that makes Qwen3-235B-A22B-Thinking-2507-FP8 (TP8, --enable-expert-parallel, conc 1) about 6% slower in serving between vllm/vllm-openai-rocm:v0.30.0 (aiter 0.1.21.post2) and v0.31.0 (aiter 0.1.23) (internal ticket ROCM-32522).

This PR removes only the token=1 and token=2 rows. The token=4 and token=8 rows (also 1-stage ASM) are kept because they beat the default; every other row is unchanged.

Test results

Kernel, µs per call (two runs agree within 0.5 µs):

tokens tuned row (1-stage ASM) no row (CK 2-stage default)
1 31.9 26.8 default 16% faster → row removed
2 32.0 30.5 default 5% faster → row removed
4 36.6 41.6 row 12% faster → kept
8 37.9 46.5 row 18% faster → kept

Path comparison (same inputs): cosine similarity 0.99991–0.99995 and relative L2 difference about 1e-2 at tokens 1–8, consistent with the two paths quantizing intermediates differently.

Serving at conc 1 (only token=1 is exercised), 8x MI350X, output tok/s and median TPOT:

Arm tok/s TPOT (ms)
v0.30.0 (aiter 0.1.21.post2, rows unreachable) 49.71 20.03
v0.31.0 (aiter 0.1.23, rows used) 45.36 21.97
v0.31.0 with the token ≤ 8 rows removed 48.24 20.66

AI assistance (Claude) was used to triage, measure and draft this change. All changes reviewed.

…rows that lose to the CK 2-stage default

The Qwen3-235B-A22B FP8 TP8+EP rows (cu_num 256, model_dim 4096,
inter_dim 1536, 16 local experts, top-8, per_1x128) at token=1 and
token=2 select the 1-stage ASM fmoe_bf16_blockscaleFp8_g1u1_vs_pf2_silu_16x128,
which is slower than the CK 2-stage default used when no row matches.

These rows only became reachable under EP with ROCm#5734, which removed
`topk -= int(is_ep)` from get_2stage_cfgs (before that the lookup used
topk=7 and fell back to the default). That made Qwen3-235B FP8 EP about
6% slower at conc 1 between the vLLM v0.30.0 and v0.31.0 ROCm images.

On aiter main (MI350X): token=1 32.2 -> 26.7 us, token=2 32.1 -> 30.6 us.
The token=4 and token=8 rows are kept because the tuned ASM kernel beats
the default there (36.5 vs 41.6 us, 37.8 vs 46.5 us).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012XYVab4mQWCMPp2QoPkThy
@afriedri-amd
afriedri-amd requested a review from a team October 19, 2026 17:20
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter op tests (gfx942 + gfx950)
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the gfx1201 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full 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 6681 --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.

@yifehuan yifehuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants