Skip to content

[Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark down at M192 - #8711

Open
ZLkanyo009 wants to merge 1 commit into
ROCm:mainfrom
ZLkanyo009:tune/kimi-tp1-dspark-down-m192-20261125
Open

ZLkanyo009 wants to merge 1 commit into
ROCm:mainfrom
ZLkanyo009:tune/kimi-tp1-dspark-down-m192-20261125

Conversation

@ZLkanyo009

Copy link
Copy Markdown
Contributor

Add one gfx1250/CU256 Kimi K3 TP1 DSpark down MXFP8/E8M0 tuning row at M192, N7168, K14336. Native default lookup changes M177-192 from fallback kernel1124 to kernel1112. M176 and M193 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 aafb867ca261fc1951793564c544aa2eaf22ef14 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
177 41.8402 31.3209 869.43 1161.44 33.59% 25.40%
192 40.0229 25.8095 985.93 1528.90 55.07% 35.45%

Each BF16-output stage times the complete native backend with FP8/E8M0 inputs and full TP1 N/K. The protocol uses 22 rotating weight copies (2,260,867,840 bytes), 44 graph calls, seven ABBA rounds and seven A/A controls. All seven paired rounds favor the candidate. Maximum absolute null drift is 0.7101% at M177 and 0.6203% at M192. 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 M176/177/192/193 with BF16 and FP16 output: 32 full-output checks, 42,319,872 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 1.021379% for BF16 and 0.963262% 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-25T19:51:08.083656+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 19:53
@github-actions github-actions Bot changed the title [Perf] Tune gfx1250 Kimi K3 TP1 DSpark down at M192 [Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark down at M192 Nov 25, 2026
@aiter-bot

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision aafb867ca261 · 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.

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

@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 aafb867ca261fc1951793564c544aa2eaf22ef14 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 aafb867ca. 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 unlike all 303 prior rows in this file and every GEMM tuned CSV in aiter/configs/, so sort_values("us") in aiter/jit/core.py:665 and aiter/ops/gemm_op_a8w8.py:1390 sorts NaN last and will silently evict this row on any future key collision while aiter/utility/base_tuner.py:2348 rewrites blanks as literal "Null". Author must populate us, tflops, bw, and errRatio from the M=192 measurement (matching lines 303–304) or confirm leaving them blank is intentional.
  2. ⚠️ [verified] The claimed 25.40% (M=177) and 35.45% (M=192) paired latency reductions for aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 describe a custom 22-weight-copy ABBA protocol but omit any runnable script path, CLI command, or explicit ROCm version (citing only an internal container digest), leaving reviewers unable to reproduce the benchmark or accuracy checks on current main. Author must include the exact reproducible benchmark and validation commands (or in-repo tuner invocation) and the ROCm version.
  3. 📝 [verified] Author comment update script #3 states that this PR's change to aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 is superseded by consolidated PR [FlyDSL] [Perf] Consolidate Kimi K3 TP1 GEMM tuning on gfx1250 #8729 and should not be merged independently (with the PR self-review section also left blank), so merging both creates a merge conflict or a duplicate-shape collision during runtime config merge. Question for the author: to close or mark PR [Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark down at M192 #8711 do-not-merge and complete review in PR [FlyDSL] [Perf] Consolidate Kimi K3 TP1 GEMM tuning on gfx1250 #8729 instead.

@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 — queued behind 25 review(s); expect to start in about 7.2 h. The box reviews one PR at a time.

@aiter-bot aiter-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROCm/aiter PR #8711 — [Config] [Perf] Tune gfx1250 Kimi K3 TP1 DSpark down at M192

Review (advisory): ⚠️ NEEDS WORK
Validation (deterministic): NOT RUN — triage found no test target (the PR changes runtime code but ships none), and the changed path IS executed at run time: the tuned table is merged and read by the serving dispatch (aiter/jit/core.py model_config_files → aiter/ops/gemm_op_a8w8.py:1380, reached from aiter/aot/flydsl/gemm.py:165), so unlike a tuner-input CSV this is not a nothing-loads-it data diff and the missing target is reported below; this box is also gfx942-only, so the row could not be exercised here regardless.
Perf (advisory): MEASURED — M=177/192, N=7168, K=14336 on gfx1250/CU256: base 41.84/40.02 us vs head 31.32/25.81 us (−25.40%/−35.45% paired latency, 7 ABBA rounds per shape, both arms, same box) — PR-reported, not re-run here (no gfx1250 on this box; a config row ships no in-repo benchmark entry point).
Size: 1 lines / 1 files
Design (advisory): NONE — one row appended inside the existing per-model tuned-table pattern (the kimik3 file joins the dsv4/dsv41/minimax_m3 siblings of the same family); the kernel choice is a measured tuning result, not a structural decision.
Human: N/A — the diff decides nothing structural (one row inside the existing per-model tuned-table pattern); the blank-cells convention question is carried as an ordinary finding with a concrete case, not as a design routing.

⚠️ [verified] The 25.40%/35.45% latency claims for the row appended to aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv rest on a custom protocol (22 rotating weight copies, 44 graph calls, 7 ABBA rounds) whose description carries no runnable script path, CLI command or ROCm version — the environment is pinned only by an internal container digest and an internal tracker (wuhuikx/LLM-Booster#710) — so no reviewer can re-run the benchmark or the accuracy checks on current main. Author must supply the exact benchmark and validation commands (or the in-repo tuner invocation) and the ROCm version.

📝 [verified] The author's own comment and the PR state confirm OPEN PR #8729 edits this same file (+22/−9) including this row, with the author stating the two must not be merged independently — merging both re-edits the same file tail, a git conflict at best and a duplicate-shape RuntimeError from the merge dedup at worst. Reviewer should ask that this PR be closed in favor of #8729 and the three fixes above carried over there.

2 finding(s) posted inline, on the lines they are about:

  • aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 — leaves us, tflops, bw and errRatio blank
  • aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 — The row aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 adds is…

gfx1250,256,32768,12288,1536,128x128,flydsl,262,1,287.2498,flydsl_mxfp8_128_bpreshuffle_wmma_t256x256x128_mw2_nw2_nb4_sk1_cm1_cn1,4306.18,3044.43,0.0034
gfx1250,256,128,7168,8192,128x128,flydsl,1195,4,11.482124775648117,flydsl_mxfp8_128_bpreshuffle_compute_wmma_t128x128x128_mw2_nw2_nb4_sk4_cm1_cn4,1309.20,5365.20,0.007883344776928425
gfx1250,256,128,7168,14336,128x128,flydsl,1195,4,14.264249801635742,flydsl_mxfp8_128_bpreshuffle_compute_wmma_t128x128x128_mw2_nw2_nb4_sk4_cm1_cn4,1844.24,7461.34,0.0104642603546381
gfx1250,256,192,7168,14336,128x128,flydsl,1112,1,,flydsl_mxfp8_128_bpreshuffle_compute_wmma_t128x128x128_mw2_nw2_nb4_sk1_cm1_cn4,,,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [verified] aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 leaves us, tflops, bw and errRatio blank — unlike all 303 prior rows in this file — and both us-ranked dedups (aiter/ops/gemm_op_a8w8.py:1389 and the config merge at aiter/jit/core.py:667) sort NaN last, so any future row with the same key (gfx1250,256,192,7168,14336,128x128) silently evicts this one (demonstrated in pandas: a populated-us duplicate displaces kernel 1112), while the tuner never produces this state because it writes blanks as literal "Null" (aiter/utility/base_tuner.py:2349); today no collision exists and the row is selected, so this is latent, not live. Author must populate the four cells from the M=192 measurement (25.8095 us / 1528.90 TFLOPS, as lines 303–304 do) or state the blank convention — and note the same blank pattern spans the whole #8729 batch.

gfx1250,256,32768,12288,1536,128x128,flydsl,262,1,287.2498,flydsl_mxfp8_128_bpreshuffle_wmma_t256x256x128_mw2_nw2_nb4_sk1_cm1_cn1,4306.18,3044.43,0.0034
gfx1250,256,128,7168,8192,128x128,flydsl,1195,4,11.482124775648117,flydsl_mxfp8_128_bpreshuffle_compute_wmma_t128x128x128_mw2_nw2_nb4_sk4_cm1_cn4,1309.20,5365.20,0.007883344776928425
gfx1250,256,128,7168,14336,128x128,flydsl,1195,4,14.264249801635742,flydsl_mxfp8_128_bpreshuffle_compute_wmma_t128x128x128_mw2_nw2_nb4_sk4_cm1_cn4,1844.24,7461.34,0.0104642603546381
gfx1250,256,192,7168,14336,128x128,flydsl,1112,1,,flydsl_mxfp8_128_bpreshuffle_compute_wmma_t128x128x128_mw2_nw2_nb4_sk1_cm1_cn4,,,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [verified] The row aiter/configs/model_configs/kimik3_a8w8_blockscale_mxscale_bpreshuffle_tuned_gemm.csv:305 adds is loaded in the serving path but nothing in-repo exercises it: no op test iterates this table (op_tests/test_gemm_a8w8_mxfp8_bpreshuffle.py walks the a8w8_mxfp8_bpreshuffle family, tuning_tests/test_csv_validation.py checks only the header-only default configs/ CSV), and standard CI runs on MI35X with gfx1250 behind an opt-in label — so a wrong kernelName in the row would surface only at first serving call for M177–192 on gfx1250. Author must add or point to an in-repo target that resolves the row (e.g. extend a tuned-shape iteration test to this family), or state that the out-of-repo validation is the intended coverage.

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