Skip to content

[Config] Add MI350P (gfx950, 128 CU) a8w8 blockscale GEMM configs for Gemma-4-31B FP8-block - #7254

Merged
yifehuan merged 2 commits into
ROCm:mainfrom
amd-sriram:config/gemma4-31b-fp8block-mi350p
Nov 11, 2026
Merged

yifehuan merged 2 commits into
ROCm:mainfrom
amd-sriram:config/gemma4-31b-fp8block-mi350p

Conversation

@amd-sriram

@amd-sriram amd-sriram commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds 84 tuned CK / CK-Tile a8w8 blockscale GEMM rows for Gemma-4-31B FP8-block on MI350P (gfx950, 128 CUs) to the existing a8w8_blockscale_tuned_gemm_gemma4_31b.csv (which today only holds gfx942/304-CU rows from #5062).

Motivation

On MI350P every dense projection of RedHatAI/gemma-4-31B-it-FP8-block printed not found tuned config in a8w8_blockscale_tuned_gemm.csv, will use default config: the table has no cu_num=128 rows, so lookup misses and the default kernel runs. That makes the FP8-block checkpoint slower than BF16 on this part.

Changes

  • aiter/configs/model_configs/a8w8_blockscale_tuned_gemm_gemma4_31b.csv: +84 rows, gfx950,128, the six Gemma-4-31B projection shapes (N,K) = (16384,5376) (20480,5376) (43008,5376) (5376,16384) (5376,21504) (5376,8192), M on the get_padded_m ladder 1..16384. 50 rows pick ck, 34 pick cktile.
  • aiter/configs/model_configs/a8w8_blockscale_untuned_gemm_gemma4_31b.csv (new): the 98 shapes of the tuned file (these MI350P rows plus the gfx942 rows from [CK] Add tuned CK a8w8 blockscale GEMM configs for Gemma-4-31B FP8-block #5062, which had no untuned list), as the tuner's input, so a retune keeps them.
  • Generated with csrc/ck_gemm_a8w8_blockscale/gemm_a8w8_blockscale_tune.py (warmup 5, iters 51). No code change; gfx942 rows untouched.

Performance (if applicable)

vLLM nightly 335dd77b, TP1, ROCM_AITER_UNIFIED_ATTN, fp8 KV, --language-model-only, max-num-batched-tokens 16384. Prefill 8000/50 (peak total tok/s over conc 2-64), decode 50/4096 (peak output tok/s over conc 32-1024). Same image both arms; the only change is these rows (passed via AITER_CONFIG_GEMM_A8W8_BLOCKSCALE).

Hardware Workload/configuration Before After Change
MI350P (gfx950, 128 CU) Gemma-4-31B FP8-block, prefill 8000/50 peak 6,795 tok/s 12,155 tok/s +79%
MI350P (gfx950, 128 CU) Gemma-4-31B FP8-block, decode 50/4096 peak 2,292 tok/s 3,095 tok/s +35%
MI350P (gfx950, 128 CU) prefill conc 2 / conc 64 5,379 / 6,795 8,140 / 12,155 +51% / +79%
MI350P (gfx950, 128 CU) decode conc 32 / conc 1024 1,270 / 2,151 1,463 / 3,071 +15% / +43%

Testing

  • Unit tests added or updated
  • Performance benchmarks run
  • Tested on MI250X
  • Tested on MI300X

GSM8K 5-shot (strict): 0.957 before, 0.958 after.

Documentation

  • No documentation change is needed, with the reason stated below

Config rows only.

Dependencies

  • No new third-party dependencies added

Breaking Changes

None. Rows are keyed on cu_num=128, so other GPUs are unaffected.

PR Self-Review

Reviewed revision

14607ad

Behavior and intent

On MI350P (gfx950, 128 CUs) the six Gemma-4-31B FP8-block projection GEMMs (gemm_a8w8_blockscale) now hit a tuned CK / CK-Tile row. Today the file only has gfx942 (304 CU) rows, so every MI350P lookup misses, logs "not found tuned config" and runs the default kernel, which makes the FP8-block checkpoint slower than BF16 on MI350P.

Validation and unverified scope

  • Tuned on one MI350P with csrc/ck_gemm_a8w8_blockscale/gemm_a8w8_blockscale_tune.py (warmup 5, iters 51); every row has errRatio 0.0.
  • End to end: vLLM nightly 335dd77b, TP1, vllm bench serve prefill 8000/50 and decode 50/4096 sweeps, same image both arms, rows on vs off: prefill peak +79%, decode peak +35%; GSM8K 5-shot 0.957 -> 0.958.
  • All 12 kernels the rows use (8 ck, 4 cktile) exist with the same kernelId and name in the current main instance lists (checked against main 551c50e).
  • Unverified: the tuner ran on AITER 145d062 (the image), not re-timed on this branch. Not run on MI355X or gfx942; these rows never match there (cu_num=128).

PR-specific question

The rows are keyed on (gfx950, cu_num=128, M, N, K) for (N, K) = (16384, 5376), (20480, 5376), (43008, 5376), (5376, 16384), (5376, 21504), (5376, 8192), M on the padded ladder 1 to 16384. The file is picked up by the existing *a8w8_blockscale_tuned_gemm* merge in aiter/jit/core.py. The diff only adds lines (+84 tuned rows, plus the new untuned list), and none of the 84 keys exists in any tuned a8w8 blockscale CSV on main (rechecked against main a0bae86), so every other shape and GPU keeps its current row or default.

Changed op tests

None.

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

@aiter-bot

aiter-bot commented Oct 31, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision 14607ad19b12 · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

On MI350P (gfx950, 128 CUs) the six Gemma-4-31B FP8-block projection GEMMs (`gemm_a8w8_blockscale`) now hit a tuned CK / CK-Tile row. Today the file only has gfx942 (304 CU) rows, so every MI350P lookup misses, logs "not found tuned config" and runs the default kernel, which makes the FP8-block checkpoint slower than BF16 on MI350P.

Validation and unverified scope

- Tuned on one MI350P with `csrc/ck_gemm_a8w8_blockscale/gemm_a8w8_blockscale_tune.py` (warmup 5, iters 51); every row has `errRatio` 0.0.
- End to end: vLLM nightly 335dd77b, TP1, `vllm bench serve` prefill 8000/50 and decode 50/4096 sweeps, same image both arms, rows on vs off: prefill peak +79%, decode peak +35%; GSM8K 5-shot 0.957 -> 0.958.
- All 12 kernels the rows use (8 `ck`, 4 `cktile`) exist with the same `kernelId` and name in the current main instance lists (checked against main 551c50e).
- Unverified: the tuner ran on AITER 145d062 (the image), not re-timed on this branch. Not run on MI355X or gfx942; these rows never match there (`cu_num=128`).

PR-specific question

The rows are keyed on `(gfx950, cu_num=128, M, N, K)` for (N, K) = (16384, 5376), (20480, 5376), (43008, 5376), (5376, 16384), (5376, 21504), (5376, 8192), M on the padded ladder 1 to 16384. The file is picked up by the existing `*a8w8_blockscale_tuned_gemm*` merge in `aiter/jit/core.py`. The diff only adds lines (+84 tuned rows, plus the new untuned list), and none of the 84 keys exists in any tuned a8w8 blockscale CSV on main (rechecked against main a0bae86), so every other shape and GPU keeps its current row or default.

Changed op tests

None.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed
  • PASS — Aiter Test Gate: passed

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

samremes
samremes previously approved these changes Nov 9, 2026

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

@samremes
samremes marked this pull request as ready for review November 9, 2026 12:52
@samremes
samremes requested review from a team and a balanced review from Copilot November 9, 2026 12:52
@github-actions github-actions Bot added the Config label Nov 9, 2026

Copilot AI 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.

🔵 Needs a closer look

The CK/CKTile configurations were tuned on an older AITER revision, so confirming correctness and latency benefits on the current revision requires MI350P hardware validation unavailable in this review.

No open issues 🎉

What changed in this PR

Adds MI350P-specific tuning data to Aiter’s existing Gemma-4-31B FP8 block-scale GEMM configuration, allowing matching workloads to select tuned kernels instead of defaults.

Changes:

  • Adds 84 configurations for gfx950 GPUs with 128 compute units across six projection shapes.
  • Selects CK for 50 configurations and CK-Tile for 34.
  • Preserves existing gfx942 rows and leaves runtime code unchanged.
File Description
aiter/​configs/​model_configs/​a8w8_blockscale_tuned_gemm_gemma4_31b.csv Appends MI350P-specific kernel selections and tuning measurements.

Review effort: Balanced

a8w8_blockscale_untuned_gemm_gemma4_31b.csv lists the 98 shapes of a8w8_blockscale_tuned_gemm_gemma4_31b.csv (the gfx942 rows from ROCm#5062 and the new MI350P rows), so a retune keeps them.
Copilot AI balanced review requested due to automatic review settings November 9, 2026 16:29

Copilot AI 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.

🔵 Needs a closer look

The CK/CKTile selections were tuned on an older AITER build, so correctness and performance on this revision require MI350P GPU validation unavailable in this review environment.

No open issues 🎉

Review effort: Balanced

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

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

@yifehuan
yifehuan merged commit 2165088 into ROCm:main Nov 11, 2026
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.

6 participants