Skip to content

[Config] Add gfx950 BF16 GEMM tunings for Muse Spark - #7785

Open
zijiecode wants to merge 1 commit into
ROCm:mainfrom
zijiecode:config/muse-spark-bf16-tuned-gemm
Open

zijiecode wants to merge 1 commit into
ROCm:mainfrom
zijiecode:config/muse-spark-bf16-tuned-gemm

Conversation

@zijiecode

Copy link
Copy Markdown
Contributor

Motivation

Muse Spark's BF16 GEMMs (attention projections, MoE pooler/unpooler) at TP8 verify widths have no rows in aiter's tuned tables and fall back to the default solution. Seven of the pooler/unpooler shapes are already in qwen3_5_397b_bf16_tuned_gemm.csv, and aiter rejects duplicate keys when it merges model_configs/, so a separate Muse table cannot be loaded next to it.

Modifications

  • Add aiter/configs/model_configs/muse_spark_bf16_tuned_gemm.csv: 36 gfx950 / 256 CU rows (hipBLASLt or torch).
    • N 2304, K 8192: attention QKV + gate.
    • N 8192, K 1024: O projection.
    • N 4096, K 8192: MoE pooler.
    • N 8192, K 4096: MoE unpooler.
  • Seven pooler/unpooler shapes overlap with qwen3_5_397b_bf16_tuned_gemm.csv. For each one, keep the faster row, measured on the same MI355X:
    • The Qwen3.5 FlyDSL rows stay at (128, 4096, 8192) and (256, 8192, 4096).
    • The Muse hipBLASLt rows replace the Qwen3.5 rows at (192/384, 4096, 8192) and (96/192/384, 8192, 4096); those five rows are removed from the Qwen3.5 table.
    • Every shape stays tuned for every model after the merge.

Accuracy

The merged table loads without the duplicate-shape error, and every Muse shape resolves to a tuned row. At the seven shared shapes, the max relative error against an FP32 reference is 2–3e-3 for hipBLASLt and 3–8e-3 for FlyDSL (BF16 output).

Benchmark

MI355X, the seven shared shapes, CUDA-graph timed, median of 3 runs (µs). ✓ marks the row kept.

M, N, K Qwen3.5 FlyDSL Muse hipBLASLt
128, 4096, 8192 16.8 ✓ 23.4
192, 4096, 8192 25.3 23.3 ✓
384, 4096, 8192 38.7 34.1 ✓
96, 8192, 4096 17.8 16.6 ✓
192, 8192, 4096 24.3 22.4 ✓
256, 8192, 4096 25.9 ✓ 28.6
384, 8192, 4096 34.4 30.9 ✓

hipBLASLt / torch rows at Muse Spark TP8 shapes: attention QKV+gate
(N 2304, K 8192) and O (N 8192, K 1024) projections, and the MoE pooler
(N 4096, K 8192) / unpooler (N 8192, K 4096).

Seven pooler / unpooler shapes were already in
qwen3_5_397b_bf16_tuned_gemm.csv, and aiter rejects duplicate keys when it
merges model_configs, so both tables could not be loaded together. Keep
the faster row of each, measured on MI355X: the Qwen3.5 FlyDSL rows at
M 128 (4096x8192) and M 256 (8192x4096), the Muse hipBLASLt rows at the
other five.
@zijiecode
zijiecode requested a review from a team November 11, 2026 02:13
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
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 Radeon R9700 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 7785 --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.

@aiter-bot

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision 1bb644a64abb · 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 — missing ### Reviewed revision in the PR description
  • FAIL — missing ### Behavior and intent in the PR description
  • FAIL — missing ### Validation and unverified scope in the PR description
  • FAIL — missing ### PR-specific question in the PR description
  • FAIL — missing ### Changed op tests in the PR description
  • FAIL — Reviewed revision must contain at least the first 7 characters of the current head SHA
  • FAIL — Behavior and intent has no substantive answer
  • FAIL — Validation and unverified scope has no substantive answer
  • FAIL — PR-specific question has no substantive answer

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

gfx,cu_num,M,N,K,bias,dtype,outdtype,scaleAB,bpreshuffle,libtype,solidx,splitK,us,kernelName,err_ratio,tflops,bw
gfx950,256,144,2304,8192,False,torch.bfloat16,torch.bfloat16,False,False,torch,0,0,0.0,native,0.0,0.0,0.0
gfx950,256,160,2304,8192,False,torch.bfloat16,torch.bfloat16,False,False,torch,0,0,0.0,native,0.0,0.0,0.0
gfx950,256,176,2304,8192,False,torch.bfloat16,torch.bfloat16,False,False,hipblaslt,438566,0,21.31,,0.0,311.77,0.0

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.

please use torch native instead... blaslt update very frequently which will lead to many CI failures.

@github-actions

Copy link
Copy Markdown
Contributor

No activity for 15 days, so this is now labelled stale. A push or a comment clears it; keep-open exempts it. Nothing is closed automatically.

@github-actions github-actions Bot added the stale The PR hasn't been updated in 2 weeks label Nov 29, 2026

This branch has not been deployed

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

Labels

Config stale The PR hasn't been updated in 2 weeks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants