Skip to content

[Config] Add gfx950 a4w4 GEMM configs for Qwen3.8-2.4T GDN in_proj_qkvz at TP8 - #7441

Merged
yifehuan merged 3 commits into
ROCm:mainfrom
mjkvaak-amd:config/qwen38-2p4t-a4w4-gdn-in-proj-qkvz
Nov 5, 2026
Merged

yifehuan merged 3 commits into
ROCm:mainfrom
mjkvaak-amd:config/qwen38-2p4t-a4w4-gdn-in-proj-qkvz

Conversation

@mjkvaak-amd

Copy link
Copy Markdown
Contributor

Summary

Adds gfx950 a4w4 GEMM configs for N = 4608, K = 8192, the GDN in_proj_qkvz of Qwen3.8-2.4T-A95B at TP8. No code changes.

Motivation

The projection runs as an MXFP4 GEMM on 65 of the model's 92 layers, and AITER has no a4w4 tuning for its shape. vLLM's AITER MXFP4 linear only takes the ASM FP4 GEMM (gemm_a4w4) for shapes tuned in AITER's a4w4 configs, so the projection stays on the Triton gemm_afp4wfp4, which is up to 4.9x slower at prefill sizes.

Changes

  • aiter/configs/model_configs/qwen38_2p4t_a4w4_blockscale_{un,}tuned_gemm.csv add gfx950 (256 CU) entries for N = 4608, K = 8192 at 26 values of M from 1 to 16384, tuned with gemm_a4w4_blockscale_tune.py. An ASM f4gemm_bf16_per1x32Fp4_BpreShuffle kernel wins at every M, with error ratio 0.
  • No shape overlaps an existing a4w4 table; the merged tables have no duplicate (gfx, cu_num, M, N, K) keys.
  • With these rows, vLLM runs M > 64 on gemm_a4w4 and M ≤ 64 on the Triton preshuffled GEMM, whose config for this shape is already in AITER.

Performance (if applicable)

N = 4608, K = 8192, us. Before: Triton gemm_afp4wfp4, the path vLLM takes without these configs, timed with bench_gemm_afp4wfp4.py. After: tuned ASM gemm_a4w4, timed by the tuner.

Hardware Workload/configuration Before After Change
MI355X M = 256 24.9 16.3 −35%
MI355X M = 1024 139.4 28.2 −80%
MI355X M = 8192 418.1 154.2 −63%

Testing

  • Unit tests added or updated
  • Performance benchmarks run
  • Tested on MI250X
  • Tested on MI300X
  • Tested on MI355X (gfx950)

Documentation

  • Docstrings updated
  • User guide updated
  • Performance guide updated
  • No documentation change is needed, with the reason stated below

Tuned config rows only; no API or behavior change.

Dependencies

  • No new third-party dependencies added
  • New dependencies are listed and justified below

Breaking Changes

None.

PR Self-Review

Reviewed revision

2b91ef3

Behavior and intent

get_GEMM_config now returns a tuned ASM kernel for gfx950 a4w4 GEMMs with N = 4608, K = 8192, where it previously returned nothing. vLLM then routes that shape's M > 64 calls from the Triton FP4 GEMM to the faster ASM gemm_a4w4.

Validation and unverified scope

MI355X (gfx950, 256 CU). Configs produced with gemm_a4w4_blockscale_tune.py on the untuned CSV; every winner has error ratio 0. Loaded the merged a4w4 tables through get_config_file: 8 files, 2636 rows, no duplicate keys. Triton baseline: python op_tests/op_benchmarks/triton/bench_gemm_afp4wfp4.py --shape M 4608 8192 --metric time for M = 256, 1024 and 8192.

Unverified: other architectures and CU counts have no entries and keep their current kernels. End-to-end model throughput is measured on the vLLM side.

PR-specific question

The rows are keyed by (gfx, cu_num, M, N, K) = (gfx950, 256, M, 4608, 8192), so only that arch, CU count and shape select them; other lookups are unaffected. Each row names a kernel that the tuner ran and checked against the reference on that hardware.

Changed op tests

None.

Co-authored-by: Cursor [email protected]

N=4608, K=8192, 26 values of M from 1 to 16384, tuned with
gemm_a4w4_blockscale_tune.py. An ASM kernel wins at every M, with error
ratio 0. vLLM's AITER MXFP4 linear takes the ASM FP4 GEMM only for shapes
tuned here, so this projection moves off the Triton GEMM.

Signed-off-by: Mikko Tukiainen <[email protected]>
Co-authored-by: Cursor <[email protected]>
@mjkvaak-amd
mjkvaak-amd requested a review from a team November 4, 2026 08:33
@github-actions

github-actions Bot commented Nov 4, 2026

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

@github-actions github-actions Bot added the Config label Nov 4, 2026
@aiter-bot

aiter-bot commented Nov 4, 2026 •

Copy link
Copy Markdown

NOT READY FOR HUMAN REVIEW

PR Self-Review

Revision 6f4b3c939ba9 · mode shadow

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

  1. What behavior does this PR change, and why is the existing behavior insufficient?
  2. What did you validate, and what remains unverified? Include commands, hardware/configuration and results.
  3. Which exact workload keys consume these configuration changes, and what evidence shows that unrelated shapes keep their previous selection?
  4. For every changed op_tests/ file, what behavior does it cover and why is it not redundant? Write None if no op test changed.

Edit the PR Self-Review section in the PR description. Include the current revision SHA; this comment refreshes automatically.

Missing or invalid answers

  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

@mjkvaak-amd
mjkvaak-amd requested a review from yifehuan November 4, 2026 11:05

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

3 participants