Skip to content

[Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark o_proj at M96 - #8709

Open
ZLkanyo009 wants to merge 1 commit into
ROCm:mainfrom
ZLkanyo009:tune/kimi-tp1-dspark-o-proj-m96-20261125
Open

ZLkanyo009 wants to merge 1 commit into
ROCm:mainfrom
ZLkanyo009:tune/kimi-tp1-dspark-o-proj-m96-20261125

Conversation

@ZLkanyo009

Copy link
Copy Markdown
Contributor

Add one gfx1250/CU256 Kimi K3 TP1 DSpark o_proj MXFP8/E8M0 tuning row at M96, N7168, K8192. Native default lookup changes M81-96 from fallback kernel222 to kernel130. M80 and M97 retain their original selections. All 303 prior CSV rows and their bytes are preserved; only this row is appended.

The comparison uses parent 3fd42598ca239020765f3eb9be84fc5f84cd8d6c and exact candidate 1f1f280801f4eafe02163e22033a09d3641a6a28 with identical backend source. Hardware and runtime: gfx1250/CU256, native1120 image sha256:4a4ca99b58fa9a2ea949431cf6063d84532a6c88c6d210cda81d35fbd28c81d0, FlyDSL 0.5.3, NUMA balancing 0.

M Baseline us Candidate us Baseline TFLOPS Candidate TFLOPS Throughput increase Paired latency reduction
81 86.8302 22.2068 109.56 428.37 291.01% 74.45%
96 86.1315 22.3979 130.90 503.36 284.55% 73.96%

Each BF16-output stage times the complete native backend with FP8/E8M0 inputs and full TP1 N/K. The protocol uses 38 rotating weight copies (2,231,505,920 bytes), 76 graph calls, seven ABBA rounds and seven A/A controls. All seven paired rounds favor the candidate. Maximum absolute null drift is 0.2919% at M81 and 0.2488% at M96. TFLOPS uses pooled per-arm median latency; paired reduction uses the median of round ratios. CSV timing cells stay blank. These measurements cover the affected interval's endpoints; interior points, public-wrapper cost and model/E2E performance were not timed.

Validation of this exact candidate:

  • Both public allocating and out APIs pass at M80/81/96/97 with BF16 and FP16 output: 32 full-output checks, 20,299,776 compared elements, eager execution and NaN-poisoned graph replay. Real Python/JIT padding is exercised.
  • Native no-device selection checks verify 9,029 source files per arm, all five default table inputs, and 4,292 parent / 4,293 candidate merged keys. The parent correctly uses fallback and the candidate uses the appended row. Accepted native scalar padding is reused.
  • Paired stages add eight full-output checks with full-K references and TF32 disabled. All checks use rtol=atol=0.01 and maximum mismatch fraction 5%. Public maximum mismatch is 0.755964% for BF16 and 0.721657% for FP16. Observed mismatches are nonzero; this is tolerance-based correctness.
  • Both public dtype stages and both paired GPU stages exited 0, preserved their raw results and removed the exact owned containers. No new matching fault lines appeared in the retained intervals. CI and reviewer assessment remain separate.

Observed upstream main at 2026-11-25T18:50:00.663792+00:00: 8b98c823cccb4be51d1ea0962e76d791907f5b79. Measurements remain bound to the parent and candidate above. The earlier a3005ac8 exploratory result is separate from this main comparison.

Tracking: https://github.com/wuhuikx/LLM-Booster/issues/710

@ZLkanyo009
ZLkanyo009 requested a review from a team November 25, 2026 18:50
@github-actions github-actions Bot changed the title [Perf] Tune gfx1250 Kimi K3 TP1 DSpark o_proj at M96 [Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark o_proj at M96 Nov 25, 2026
@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 8709 --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 1f1f280801f4 · 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.

@ZLkanyo009

Copy link
Copy Markdown
Contributor Author

Superseded as the review entry for this tuning batch by #8729 (head 0cbdcc3ea501d0cf2c957af7e5c65dea51147add). The consolidated main PR includes this PR's final changes at 1f1f280801f4eafe02163e22033a09d3641a6a28 and links the original validation and review history. Its CPU composition checks preserve the final configuration choices; the original GPU results keep their measured-source and protocol limits.

Please use the consolidated PR for review of this batch. This source PR remains open for provenance; no merge or closure is performed here, and the two should not be merged independently.

@demonsan

Copy link
Copy Markdown
Contributor

Advisory review with the repo's .claude/skills/review-pr skill, run locally against head 1f1f28080. All 8 gates passed and an independent reader refuted each finding before it was kept. [verified] means the finding was checked against the code; [inferred] means it is a question for the author to confirm.

Verdict: ⚠️ NEEDS WORK

  1. ⚠️ [verified] aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 leaves us, tflops, bw, and errRatio blank (the only untimed row across all 4,523 merged table rows), so sort_values("us", kind="stable") in aiter/jit/core.py:667 and aiter/ops/gemm_op_a8w8.py:1389 sorts it last as NaN behind any future slower duplicate row and aiter/utility/base_tuner.py:2345 rewrites the blanks to "Null" on the next tuner run. Author must populate us, tflops, bw, and errRatio from the measured M=96 run (22.3979 us, 503.36 TFLOPS) or confirm consolidated PR [FlyDSL] [Perf] Consolidate Kimi K3 TP1 GEMM tuning on gfx1250 #8729 fills them.
  2. ⚠️ [verified] The PR claims a 74% latency reduction (86.1315 → 22.3979 us at M=96, 86.8302 → 22.2068 us at M=81) for the new row in aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 using an internal native1120 image digest, without providing any benchmark script path, CLI command, or explicit ROCm version — reviewers cannot independently reproduce the gfx1250 measurement or verify the timed inputs match production gemm_a8w8_blockscale_bpreshuffle. Author must add the exact reproduction script/command and ROCm version used for the M81/M96 benchmark.
  3. 📝 [verified] Author comment on PR [Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark o_proj at M96 #8709 marks this row in aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 as superseded by consolidated PR [FlyDSL] [Perf] Consolidate Kimi K3 TP1 GEMM tuning on gfx1250 #8729 (0cbdcc3e) and warns against merging both independently — merging both risks a duplicate (gfx1250, 256, 96, 7168, 8192, 128x128) key that raises RuntimeError in aiter/jit/core.py:_raise_on_duplicate_shapes. Question for the author: the author to close PR [Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark o_proj at M96 #8709 or convert it to draft so only PR [FlyDSL] [Perf] Consolidate Kimi K3 TP1 GEMM tuning on gfx1250 #8729 remains open for merge.

@demonsan

Copy link
Copy Markdown
Contributor

This PR's rows were folded into #8729 ("Consolidate Kimi K3 TP1 GEMM tuning on gfx1250", still open), as noted in your earlier comment. Please close this PR so the same kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv edits are reviewed only once, and carry the fixes from my previous comment over to #8729: fill us / tflops / bw / errRatio for every row, and give per-row speedups from repeated rounds.

@demonsan

demonsan commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

@aiter-bot review

@aiter-bot

Copy link
Copy Markdown

aiter-bot — the box reviews one PR at a time and is 29 deep right now (roughly 8.3 h of work ahead).

This request was not queued: a job that waits more than 24 h is cancelled silently, so saying no now is better than losing it later.

Re-comment @aiter-bot review once the queue is shorter.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants