Skip to content

[Config] Add three gfx1250 K3 DSpark prefill and decode tuning rows - #8677

Open
ZLkanyo009 wants to merge 1 commit into
ROCm:mainfrom
ZLkanyo009:tune/kimi-k3-tp1-dspark-three-main-20261125
Open

ZLkanyo009 wants to merge 1 commit into
ROCm:mainfrom
ZLkanyo009:tune/kimi-k3-tp1-dspark-three-main-20261125

Conversation

@ZLkanyo009

@ZLkanyo009 ZLkanyo009 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Add three DSpark tuned rows for gfx1250/CU256 so o_proj and down at M384, and kv_b at M64, select existing main kernels instead of the default fallback. The change adds only three CSV rows on main 7f1f7d159e2c2fd0a7aa3a8e47c6d2d23fb7416c; it changes no kernel implementation. CSV measurement cells remain blank; the paired main measurements below are recorded separately.

Operation M / N / K Input / scale scheme Candidate
DSpark o_proj 384 / 7168 / 8192 FP8 / E8M0 128×128 Compute WMMA 128×128×128, split-K 1, cluster 1×4
DSpark down 384 / 7168 / 14336 FP8 / E8M0 128×128 Same compute WMMA kernel
DSpark kv_b 64 / 16384 / 512 FP8 / FP32 per-token, per-channel WMMA 64×128×256, split-K 1

Local source checks match each exact kernel name to the main catalog and confirm its shape constraints. The complete default table populations have 4,217 MX and 4,959 PTPC keys, with no duplicate keys or unrelated row changes. Kernel IDs were resolved against main rather than copied from the dev branch.

The exact main candidate dff7809da2ac0ddda04ef3590fb1a98bc47d5721 has now passed native default-table and public GPU correctness checks on gfx1250/CU256, NUMA0, fixed native1120 image and FlyDSL 0.5.3:

  • Both BF16 and FP16 outputs: 30 dtype cases, 46 public forms, 92 full-output checks and 192,315,392 compared elements across eight completed stages.
  • MX down/o_proj at M352/353/384/385: allocating and out forms, actual default merge, native Python/JIT M-padding, eager execution and NaN-poisoned graph replay. The new M384 rows affect M353–384.
  • PTPC kv_b at M32/33/48/49/64/65, plus logical K384 with physical K512: allocating public form and the same eager/graph checks. The new M64 row affects M33–64. The separate gemm_a8w8_bpreshuffle_out API rejects gfx1250 and was not bypassed.

Numerical acceptance uses rtol=atol 0.01 and a maximum allowed mismatch ratio of 5%. Observed maximum mismatch ratios were 1.031455% for MX and 0.123724% for PTPC; maximum absolute errors were 128 and 64 respectively. These are passing tolerance checks with nonzero mismatches, not bit-exact equality. Every stage exited 0, its exact container was removed, and no new matching GPU faults appeared in the retained log intervals.

Paired main performance is complete for eight exact shapes on the same gfx1250/CU256, NUMA0, native1120 and FlyDSL 0.5.3 configuration, with FP8 inputs and BF16 outputs. Both arms run in the same candidate-source process at dff7809da2ac0ddda04ef3590fb1a98bc47d5721. Separate native CPU default-table/lookup checks bind the parent-selected backend from frozen main 7f1f7d159e2c2fd0a7aa3a8e47c6d2d23fb7416c and the candidate-selected backend. This is a same-source isolated complete-backend comparison, not two branch executions, public-default-route timing, or model/E2E timing.

Operation M / N / K Parent-selected backend, us Candidate-selected backend, us Paired latency reduction Candidate TFLOPS
DSpark down 353 / 7168 / 14336 56.862 32.838 42.14% 2209.27
DSpark down 384 / 7168 / 14336 49.314 27.313 44.56% 2889.43
DSpark o_proj 353 / 7168 / 8192 32.990 19.351 41.33% 2142.36
DSpark o_proj 384 / 7168 / 8192 29.279 16.802 42.65% 2684.11
DSpark kv_b 33 / 16384 / 512 6.087 3.822 37.20% 144.85
DSpark kv_b 48 / 16384 / 512 6.143 3.847 37.35% 209.33
DSpark kv_b 49 / 16384 / 512 6.146 3.842 37.51% 213.99
DSpark kv_b 64 / 16384 / 512 6.224 3.900 37.33% 275.29

The timed calls include the complete native backend; quantization and reference generation are outside timing. Each case rotates distinct weight/scale storage of at least 2.2 GB and uses CUDA graph events with seven ABBA paired rounds and seven A/A null rounds. The latency columns are medians of 14 samples per arm; the reduction is the median of seven paired-round reductions. All paired rounds favored the candidate, and every median reduction exceeded its maximum absolute A/A drift.

The MX comparison changes the parent fallback compute_wmma_t256x256x128_mw2_nw2_nb4_sk1_cm2_cn4 to compute_wmma_t128x128x128_mw2_nw2_nb4_sk1_cm1_cn4. PTPC changes wmma_t64x512x256_mw1_nw4_nb2_sk1_cm1_cn1 to wmma_t64x128x256_mw1_nw4_nb2_sk1_cm1_cn1. These are existing kernels selected by the rows; each configuration has split-K 1.

The timing inputs also passed 32 full-output endpoint checks across eight cases, including eager and NaN-poisoned graph replay. Their maximum MX mismatch ratio was 1.021419%; PTPC had zero mismatches under the stated tolerances for these timing samples. This does not change the nonzero mismatch results of the broader public-correctness matrix above or establish bit-exact equality.

Earlier selection experiments on dev a3005ac8abc7d230df9f98d49a5e512190d2c4ce remain historical evidence. The table reports fresh measurements of the frozen main candidate and its CPU-bound parent choices. Performance coverage is limited to these eight measured M values; no unmeasured bucket-wide or model/E2E gain is claimed.

@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 8677 --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
ZLkanyo009 marked this pull request as ready for review November 25, 2026 13:44
@ZLkanyo009
ZLkanyo009 requested a review from a team November 25, 2026 13:44
@aiter-bot

Copy link
Copy Markdown

WAITING ON AUTHOR

PR Self-Review

Revision dff7809da2ac · 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 dff7809da2ac0ddda04ef3590fb1a98bc47d5721 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.

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