Skip to content

[Config] [Bugfix] Remove all shipped hipBLASLt BF16 tuned rows - #8490

Merged
yifehuan merged 2 commits into
mainfrom
yifehuan/hipblaslt-config-validation
Nov 24, 2026
Merged

yifehuan merged 2 commits into
mainfrom
yifehuan/hipblaslt-config-validation

Conversation

@yifehuan

@yifehuan yifehuan commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Remove all 81 shipped libtype=hipblaslt BF16 tuned GEMM rows. Their saved solution indexes depend on the installed hipBLASLt catalog; a library upgrade can map an index to a different kernel or remove it. The affected workloads now use the existing default selection instead of those saved indexes.

Related to #8406. This removes the current unsafe tuning dependency; future tuning-version provenance and configuration policy remain separate work.

Motivation

#8406 reports wrong BF16 output after a hipBLASLt upgrade remapped a saved index. The seven gfx950 rows also lack saved kernel names. Remove the tuned rows across library versions rather than retain library-specific solution indexes in the shipped tables.

Changes

  • Remove 74 gfx942/80-CU rows from qwen38_flash_next_bf16_tuned_gemm.csv.
  • Remove 7 gfx950/256-CU rows from kimik3_bf16_tuned_gemm.csv.
  • Keep headers and all remaining rows byte-for-byte. The Qwen table becomes header-only, preserving its path for explicit config overrides and tuning.

No runtime operator, backend or test changes. Existing defaults remain available, including Torch's own use of hipBLASLt where applicable. The final diff contains only these two CSV files and 81 row deletions.

Performance

This is a correctness fallback, with no speedup claim. Shapes whose saved indexes still worked on a particular library may lose their tuned performance. No before/after performance benchmark was run against the removed, library-dependent indexes.

Testing

  • Existing CPU CSV validation: 19 tests passed.
  • BF16 runtime family merge and duplicate-guard controls: 3 tests passed, no skips, using current-source config functions in the ROCm container.
  • All 81 removed keys select an existing default: 77 Torch, 4 skinny.
  • All 7 affected gfx950 shapes passed GPU numerical checks with FP32 output.
  • MI300X/MI308X numerical validation — not run; gfx942 keys were checked for selection only.
  • Performance benchmarks — not run; no speedup claim.

Documentation

  • No documentation change is needed: this removes tuned selections without changing an API or config format.

Dependencies

  • No new third-party dependencies added.

Breaking Changes

None to APIs or CSV format. The affected shapes use existing defaults and may have different performance.

PR Self-Review

Reviewed revision

81d29b2

Behavior and intent

The shipped tables no longer select any saved hipBLASLt solution index. A lookup for a removed key now reaches existing default dispatch, avoiding catalog-dependent index selection. Other tuned rows and runtime code are unchanged.

Validation and unverified scope

CPU: python -m unittest op_tests.tuning_tests.test_csv_validation -v passed all 19 existing tests. A byte-preservation check confirmed that only libtype=hipblaslt records were removed and all other rows and headers are unchanged. A repository-wide CSV scan found no remaining hipBLASLt rows.

ROCm validation used user-provided job 302856, crsuse2-m2m-v3-032, MI355X/gfx950/256 CU, physical GPU 7. GPU 0–3's model processes were left running. The container has aiter 41d4d8d7ea831d35f4a60a6c44228d7a33ed2e27, PyTorch 2.10.0+rocm7.2.4.git3d3aa833, HIP 7.2.53211.

Because the installed package is older than main, the probe loaded the unchanged current-source AITER_CONFIG class, family-resolution and BF16 lookup/Torch fallback functions into its own process, using the changed CSV snapshot and installed native bindings. It did not replace container files or rebuild native libraries. The affected BF16 merge test and the guard's planted-duplicate/clean controls passed: 3 tests, no skips. The real merge produced 7,139 rows, down from 7,220, with zero hipBLASLt tuned rows. All 81 deleted keys select defaults: 77 Torch and 4 skinny.

The existing aiter.tuned_gemm.gemm_a16w16 wrapper was exercised for all seven gfx950 shapes: M in {7,14,16,512,1024,1536,2048}, N=6016, K=7168, BF16 inputs and FP32 output. Outputs were finite, retained FP32 dtype, and passed FP32 matmul reference checks (rtol=1e-4, atol=1e-3, plus relative L2 < 1e-5). The absolute allowance covers reduction-order rounding near cancellation at K=7168. Observed relative L2 ranged from 2.47e-7 to 9.94e-7.

Unverified: a clean current-main native build, gfx942 GPU numerics, performance and full-model accuracy. The CPU-only host's full collision suite skipped because ROCm was absent. A broader mixed-version container probe reached an unrelated batched-MXFP lookup KeyError; it is not a passing full-suite result. Required full-branch CI remains the clean-install validation.

PR-specific question

The removed keys are gfx942/80-CU Qwen BF16-to-BF16 rows and gfx950/256-CU Kimi BF16-to-FP32 rows, keyed by (gfx, cu_num, M, N, K, bias, dtype, outdtype, scaleAB, bpreshuffle). The runtime family merge continues to derive its keys from the untuned CSV. The full merge contains exactly 81 fewer rows, and lookup checks cover every removed key. Unrelated shapes retain their config records byte-for-byte; no runtime lookup or default-selection code changes.

Changed op tests

None. Existing CSV validation and runtime BF16 merge tests cover the configuration edit. The GPU probes are local validation artifacts, not a new test suite committed to this PR.

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

@yifehuan yifehuan changed the title [Feature] Add live hipBLASLt tuned-config validation [Bugfix] Remove all shipped hipBLASLt BF16 tuned rows Nov 23, 2026
@yifehuan
yifehuan marked this pull request as ready for review November 23, 2026 08:10
@yifehuan
yifehuan requested a review from a team November 23, 2026 08:10
@github-actions github-actions Bot changed the title [Bugfix] Remove all shipped hipBLASLt BF16 tuned rows [Config] [Bugfix] Remove all shipped hipBLASLt BF16 tuned rows Nov 23, 2026
@aiter-bot

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision 81d29b2748d5 · 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

The shipped tables no longer select any saved hipBLASLt solution index. A lookup for a removed key now reaches existing default dispatch, avoiding catalog-dependent index selection. Other tuned rows and runtime code are unchanged.

Validation and unverified scope

CPU: `python -m unittest op_tests.tuning_tests.test_csv_validation -v` passed all 19 existing tests. A byte-preservation check confirmed that only `libtype=hipblaslt` records were removed and all other rows and headers are unchanged. A repository-wide CSV scan found no remaining hipBLASLt rows.

ROCm validation used user-provided job 302856, `crsuse2-m2m-v3-032`, MI355X/gfx950/256 CU, physical GPU 7. GPU 0–3's model processes were left running. The container has aiter `41d4d8d7ea831d35f4a60a6c44228d7a33ed2e27`, PyTorch `2.10.0+rocm7.2.4.git3d3aa833`, HIP `7.2.53211`.

Because the installed package is older than main, the probe loaded the unchanged current-source `AITER_CONFIG` class, family-resolution and BF16 lookup/Torch fallback functions into its own process, using the changed CSV snapshot and installed native bindings. It did not replace container files or rebuild native libraries. The affected BF16 merge test and the guard's planted-duplicate/clean controls passed: 3 tests, no skips. The real merge produced 7,139 rows, down from 7,220, with zero hipBLASLt tuned rows. All 81 deleted keys select defaults: 77 Torch and 4 skinny.

The existing `aiter.tuned_gemm.gemm_a16w16` wrapper was exercised for all seven gfx950 shapes: M in `{7,14,16,512,1024,1536,2048}`, N=6016, K=7168, BF16 inputs and FP32 output. Outputs were finite, retained FP32 dtype, and passed FP32 matmul reference checks (`rtol=1e-4`, `atol=1e-3`, plus relative L2 < 1e-5). The absolute allowance covers reduction-order rounding near cancellation at K=7168. Observed relative L2 ranged from 2.47e-7 to 9.94e-7.

Unverified: a clean current-main native build, gfx942 GPU numerics, performance and full-model accuracy. The CPU-only host's full collision suite skipped because ROCm was absent. A broader mixed-version container probe reached an unrelated batched-MXFP lookup `KeyError`; it is not a passing full-suite result. Required full-branch CI remains the clean-install validation.

PR-specific question

The removed keys are gfx942/80-CU Qwen BF16-to-BF16 rows and gfx950/256-CU Kimi BF16-to-FP32 rows, keyed by `(gfx, cu_num, M, N, K, bias, dtype, outdtype, scaleAB, bpreshuffle)`. The runtime family merge continues to derive its keys from the untuned CSV. The full merge contains exactly 81 fewer rows, and lookup checks cover every removed key. Unrelated shapes retain their config records byte-for-byte; no runtime lookup or default-selection code changes.

Changed op tests

None. Existing CSV validation and runtime BF16 merge tests cover the configuration edit. The GPU probes are local validation artifacts, not a new test suite committed to this PR.

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply
  • ADVISORY — Copilot did not review the current head SHA

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.

@yifehuan
yifehuan merged commit 9065223 into main Nov 24, 2026
101 of 102 checks passed
@yifehuan
yifehuan deleted the yifehuan/hipblaslt-config-validation branch November 24, 2026 03:05
AndreasKaratzas added a commit to AndreasKaratzas/aiter that referenced this pull request Nov 24, 2026
Conflicts:
- gemm_a16w16_gfx950.py: keep this branch's whole-tile split partition
  (last split takes the remainder) and its validator. Drop main's FT
  balanced-split branch in the kernel body, because the host now always
  passes a block_k-aligned working_k, so that branch cannot run. Keep
  this branch's kernel names (they already differ from main's
  _kst4/_kst5 names). Keep main's bpreshuffle shape check.
- gemm_a16w16_policy.py: keep both the whole_tile_splits field and
  main's tdm/b_k_contiguous fields. Keep this branch's split_k
  candidates, which are a superset of main's 1..9 for K >= 9.
- kimik3, qwen38_flash_next, qwen3_5_397b tables: key-based 3-way
  merge. Take main's change where this branch did not touch a row
  (incl. the hipBLASLt row removal from ROCm#8490). For the five gfx950
  kimik3 896x3584 rows (M 8-64) that both sides retuned, keep this
  branch's exact fp32-partial rows.

Co-authored-by: Claude <[email protected]>
Signed-off-by: Andreas Karatzas <[email protected]>
AndreasKaratzas added a commit to AndreasKaratzas/aiter that referenced this pull request Nov 27, 2026
…28x12288x6144

Main removed every shipped hipBLASLt BF16 row in ROCm#8490, because a saved
solution index can map to another kernel with a different hipBLASLt
build (ROCm#8406). This row goes back to the exact FlyDSL config from
aca9344 (t128x96x64x5 ks2 w4x1x1 stg3 bnt, 41.81 us).

Co-authored-by: Claude <[email protected]>
Signed-off-by: Andreas Karatzas <[email protected]>
whx-sjtu added a commit to whx-sjtu/aiter that referenced this pull request Nov 27, 2026
…x950)

Eight rows in kimik3_bf16_tuned_gemm.csv (2 replaced in place, 6 new keys),
from a single-card T0 screen on MI355X (gfx950, 256 CU) against the kernel
each shape resolves to today:

  16384x7168x4224  dense down     asm 256x256   671.5 -> torch     648.0 us
  1280x7168x3584   latent up      asm (2048 row)      -> torch      58.1 us
  60x4096x1536     indexer wq_b   triton auto     8.23 -> flydsl     6.31 us
  512x1536x128     KDA f_b        flydsl t32x64   3.40 -> t64x64     3.30 us
  1280/1536/1792x4096x1536 (bpreshuffle, indexer wq_b at token-graph rows)
                   no row, 2048 row's t128x128  29.98/30.64/31.24
                                            -> 25.52/27.28/28.45 us
  2048x4096x1536   (bpreshuffle)  t128x128      32.13 -> t256x128  30.34 us

Bit-exact: the confirm compared every output element with the current
kernel at the row's own M; none differed.

hipBLASLt solution-index rows from the same screen are not included
(ROCm/aiter ROCm#8490 removed every shipped hipBLASLt BF16 row), nor the
pin rows that only existed to keep neighbouring Ms off those rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
whx-sjtu added a commit to whx-sjtu/aiter that referenced this pull request Nov 28, 2026
…x950)

Eight rows in kimik3_bf16_tuned_gemm.csv (2 replaced in place, 6 new keys),
from a single-card T0 screen on MI355X (gfx950, 256 CU) against the kernel
each shape resolves to today:

  16384x7168x4224  dense down     asm 256x256   671.5 -> torch     648.0 us
  1280x7168x3584   latent up      asm (2048 row)      -> torch      58.1 us
  60x4096x1536     indexer wq_b   triton auto     8.23 -> flydsl     6.31 us
  512x1536x128     KDA f_b        flydsl t32x64   3.40 -> t64x64     3.30 us
  1280/1536/1792x4096x1536 (bpreshuffle, indexer wq_b at token-graph rows)
                   no row, 2048 row's t128x128  29.98/30.64/31.24
                                            -> 25.52/27.28/28.45 us
  2048x4096x1536   (bpreshuffle)  t128x128      32.13 -> t256x128  30.34 us

Bit-exact: the confirm compared every output element with the current
kernel at the row's own M; none differed.

hipBLASLt solution-index rows from the same screen are not included
(ROCm/aiter ROCm#8490 removed every shipped hipBLASLt BF16 row), nor the
pin rows that only existed to keep neighbouring Ms off those rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
whx-sjtu added a commit to whx-sjtu/aiter that referenced this pull request Nov 30, 2026
…x950)

Eight rows in kimik3_bf16_tuned_gemm.csv (2 replaced in place, 6 new keys),
from a single-card T0 screen on MI355X (gfx950, 256 CU) against the kernel
each shape resolves to today:

  16384x7168x4224  dense down     asm 256x256   671.5 -> torch     648.0 us
  1280x7168x3584   latent up      asm (2048 row)      -> torch      58.1 us
  60x4096x1536     indexer wq_b   triton auto     8.23 -> flydsl     6.31 us
  512x1536x128     KDA f_b        flydsl t32x64   3.40 -> t64x64     3.30 us
  1280/1536/1792x4096x1536 (bpreshuffle, indexer wq_b at token-graph rows)
                   no row, 2048 row's t128x128  29.98/30.64/31.24
                                            -> 25.52/27.28/28.45 us
  2048x4096x1536   (bpreshuffle)  t128x128      32.13 -> t256x128  30.34 us

Bit-exact: the confirm compared every output element with the current
kernel at the row's own M; none differed.

hipBLASLt solution-index rows from the same screen are not included
(ROCm/aiter ROCm#8490 removed every shipped hipBLASLt BF16 row), nor the
pin rows that only existed to keep neighbouring Ms off those rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
samremes added a commit to samremes/aiter that referenced this pull request Dec 1, 2026
The helper had grown to ~450 lines plus ~450 lines of tests, mostly
special cases for renames, moves, multi-file groups, ambiguity and
summary counts. It is an advisory hint the reviewer checks against the
diff, so drop them: a tuned CSV pairs with the one untuned CSV in its
folder whose name has the same tokens, and the four mismatch kinds are
set differences over the rows the PR changed. Same findings on recent
tuning merges (ROCm#8016, ROCm#8161, ROCm#7109, ROCm#8566, ROCm#8490); renames and moves
are left to the reviewer.

Also drop the triage audit plumbing for tuning_coverage.txt (A5 findings
are backed through verdicts like any other rule), the .toml/tuning JSON
triggers (aiter tracks no tuning .toml files) and the unrelated
pre-commit change. Key columns are no longer dropped for the whole pair
when one untuned cell is blank, which hid real changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
nehmathe2 added a commit to nehmathe2/aiter that referenced this pull request Dec 3, 2026
…M rows for gfx950

Kimi-K3.1-Pro AgentX at C48 on 8x MI355X (TP8 x DCP8, MTP k=4) runs its
BF16 linears at batch sizes the kimik3 table does not list: decode
verify steps at M = 132 to 240, and mixed prefill + decode steps at
M = 288 to 5120. Without a row at the exact M, tgemm takes the
padded-M bucket's row, which was tuned for a different M, or the
default backend.

Add 261 rows, all at exact M (gfx950, 256 CUs, bf16, no bias, no
preshuffle), with each shape also listed in kimik3_bf16_untuned_gemm.csv:
- 155 decode rows over 1536x7168, 2112x7168, 2304x1536, 3584x7168,
  4096x1536, 6288x7168, 7168x768 and 7168x1536;
- 100 mixed-step rows over the same shapes, mostly pinning torch where
  it beat the bucket's kernel;
- 6 rows pinning torch for 7168x35840 at M where it measured fastest.
The libraries are FlyDSL (149 rows), torch (111) and opus (1).

Every row was re-timed on this main (FlyDSL 0.5.5) on MI355X against
what main resolves for the same shape, through tgemm's own backends,
graph-captured over rotated weight copies. Kept rows are at least 1.02x
faster as the median over runs on different GPUs: median 1.23x for the
decode rows, 1.18x for the mixed-step rows and 1.26x for 7168x35840.

Not included:
- 98 tuned rows that are not faster on this main: 37 resolve to the
  kernel main already picks, and 61 are within noise or slower,
  including every 32x7168 and 128x7168 row;
- (192, 3584, 7168): already tuned here, with the same kernel within
  0.4 %;
- nine hipBLASLt rows (8448x7168, 7168x35840, 2304x1536 and 1536x1536),
  since ROCm#8490 removed shipped hipBLASLt BF16 rows. For 1536x1536 at
  M = 1536, 3072 and 3584 this keeps the torch rows the hipBLASLt rows
  replaced.

Signed-off-by: nehmathe <[email protected]>
Co-authored-by: Cursor <[email protected]>
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.

4 participants