Repository navigation
[Triton/Gluon] [Config] [gfx1250] DSv4.1 router GEMM (N=384, K=5120): Gluon buckets and bf16 rows for M 1344 / 1536 (on #7663) - #8049
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
There was a problem hiding this comment.
🟡 Changes recommended
The new bandwidth values in dsv41_bf16_tuned_gemm.csv use TB/s rather than the expected GB/s, understating both rows by about 1000×.
1 open issue
What changed in this PR
This PR builds on #7663 to tune the DSv4.1 bf16 router GEMM (N=384, K=5120) on gfx1250 for larger speculative-decode workloads.
Changes:
- Adds Gluon configuration buckets for M=1344 and M=1536.
- Adds exact model dispatch rows that select Gluon for these sizes.
- Extends TN-layout tests with the lower and upper boundaries of the new buckets.
| File | Description |
|---|---|
op_tests/triton_tests/gemm/basic/test_gemm_a16w16.py |
Adds DSv4.1 router shapes to the GEMM tests. |
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a16w16/GEMM-A16W16-N=384-K=5120.json |
Extends M bounds and adds tuned Gluon configurations. |
aiter/configs/model_configs/dsv41_bf16_tuned_gemm.csv |
Updates router dispatch rows and recorded performance metrics. |
Review effort: Balanced
8fdea71 to
24c3717
Compare
|
Rebased onto #7663's new head 7818b63 (main df3e0b2); now at 24c3717. The CSV and JSON hunks applied unchanged; the only conflict was test_gemm_a16w16.py (main's #8214 replaced get_x_vals() with get_shapes()), resolved like #7663 by adding M 1025 / 1344 / 1345 / 1536 to the inline N=384, K=5120 list. Self-Review updated. |
24c3717 to
31ef4a3
Compare
|
Rebased onto current main ( |
31ef4a3 to
333a764
Compare
|
Rebased onto current main ( |
…1344 / 1536 The DSv4.1 router GEMM at the high-concurrency decode widths (M 1344 and 1536 rows with speculative tokens) had no exact bf16 row and ran the default selection. Add Gluon a16w16 buckets M_LEQ_1344 (32x64x256, 4 buffers) and M_LEQ_1536 (64x64x256, 4 buffers) to the N=384, K=5120 config, and the two bf16 rows that select Gluon at those M. The logits are bit identical to the previous kernel; the other buckets are unchanged. Builds on ROCm#7663 (M_BOUNDS and the M 576 / 672 / 768 buckets of the same file), which is in main. No op test is added: ROCm#8036 trimmed the router shapes from the a16w16 test to keep the shard within its time limit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…GB/s The two bf16 rows added for M 1344 and 1536 stored the bandwidth column in TB/s, while the rest of the table (and BaseTuner.calculate) use GB/s. Convert the two cells from the recorded time with the same formula; the kernel selection and the other columns are unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
333a764 to
c11c2c8
Compare
|
Rebased onto current main ( |

Motivation
The DSv4.1 router GEMM (bf16, N=384, K=5120) at the high-concurrency decode widths with speculative tokens (M = 1344 and 1536 rows) had no exact bf16 row: it ran the M 2048 row's kernel. A Gluon a16w16 tile sized for these M is a better fit.
#7663 (now merged) added
M_BOUNDSand the M 576 / 672 / 768 buckets to the same JSON; this PR builds on it.Technical Details
aiter/ops/triton/configs/gfx1250/gluon/gemm/gemm_a16w16/GEMM-A16W16-N=384-K=5120.json:M_BOUNDSgains 1344 and 1536; new bucketsM_LEQ_1344(BLOCK 32x64x256, 4 buffers, 4 warps) andM_LEQ_1536(64x64x256, 4 buffers, 4 warps). The other buckets are unchanged.aiter/configs/model_configs/dsv41_bf16_tuned_gemm.csv: two gfx1250 rows (M 1344 / 1536, N 384, K 5120) that select the Gluon kernel.test_gemm_a16w16.pyto keep the test shard within its time limit, so this PR no longer changes any op test and the two new tiles (M_LEQ_1344,M_LEQ_1536) have no dedicated op test. Their gfx1250 validation is the run already posted (see Test Result).Test Plan
4342568a73, which still carried the router test shapes that [Triton/Gluon] Reduce the number of tests in shard 1 to avoid time out #8036 later removed):pytest op_tests/triton_tests/gemm/basic/test_gemm_a16w16.py -k "test_gemm_a16_w16 and 384 and 5120".tgemm.mmat M in {1024, 1025, 1152, 1344, 1345, 1400, 1536, 1537, 2048}, N 384, K 5120 on main and on this branch: tuned-row selection (withAITER_LOG_TUNED_CONFIG=1), output hash comparison and cosine against an fp32 reference.Test Result
libtype triton); every output is byte-identical to main for all nine M (the router logits do not change), cosine against fp32 is at the bf16 level.PR Self-Review
Reviewed revision
c11c2c8bc9Behavior and intent
M_BOUNDS1344 / 1536 with bucketsM_LEQ_1344andM_LEQ_1536, anddsv41_bf16_tuned_gemm.csvgains two gfx1250 rows (M 1344 / 1536, N 384, K 5120) that route these M to the Gluon kernel. The other buckets are unchanged.M_BOUNDSand the M 576 / 672 / 768 buckets came from [Triton/Gluon] [gfx1250] DSv4.1 router GEMM (N=384, K=5120): Gluon buckets and bf16 rows for M 576/672/768 #7663, which is now in main.Validation and unverified scope
4342568a73(the only later commit,8fdea7181c, converts thebwcolumn of the two new CSV rows from TB/s to GB/s; that column is tuning metadata and is not read at dispatch):pytest op_tests/triton_tests/gemm/basic/test_gemm_a16w16.py -k "test_gemm_a16_w16 and 384 and 5120"passed (skips are the non-gfx1250 / layout combinations the test itself skips).tgemm.mmat M in {1024, 1025, 1152, 1344, 1345, 1400, 1536, 1537, 2048}, N 384, K 5120, withAITER_LOG_TUNED_CONFIG=1: M 1344 / 1536 resolve to the new rows (libtype triton); all nine outputs byte-identical to main; cosine against an fp32 reference at the bf16 level.e9efac0e2plus DSv4.1 serving patches): with real router weights at M 1344 / 1536 the Gluon logits were byte-identical to the previous kernel in every case, and the rows were part of the gfx1250 DSv4.1-Flash serving stack that passed its accuracy checks.deca29ee4(previous head333a7645a4, kept asbak/8049-pre1127a). The JSON hunk applied unchanged (main has not touched this file). The CSV conflict was textual only: [FlyDSL] [gfx1250] TDM HGEMM: FP32 cluster split-K, and DSV4.1 BF16 rows where TDM measures faster #8031 retuned the adjacent lm_head rows (N 32320, K 5120, M 4096 / 8192) that sit right before the two rows this PR appends; main's values were kept and this PR's two rows were appended after them, so the added lines are identical to the previous head. main still has no gfx1250 N 384, K 5120 row at M 1344 / 1536, so no key is shared. [FlyDSL] [gfx1250] TDM HGEMM: FP32 cluster split-K, and DSV4.1 BF16 rows where TDM measures faster #8031 did retune the M 2048 router row that these M fell back to before this PR; the earlier byte-identical comparison was against the previous M 2048 kernel and has not been repeated against the new one. The test file stays as on main ([Triton/Gluon] Reduce the number of tests in shard 1 to avoid time out #8036). On this head,test_config_shape_collisionandtest_csv_validationpass (python -m unittest), the JSON parses with no duplicate keys, the CSV has no duplicate keys and every row has the header's column count, and black and ruff report clean on the test file (unchanged from main).PR-specific question
The keys consumed are the bf16 CSV rows
(gfx1250, cu_num 256, M 1344 / 1536, N 384, K 5120, bf16, no bias)indsv41_bf16_tuned_gemm.csv, and theM_LEQ_1344/M_LEQ_1536buckets ofGEMM-A16W16-N=384-K=5120.json(read only when a row routes to the Gluon kernel). Unrelated shapes keep their selection because no other row or bucket changes; within this shape, the nine-M run above (both sides of each new bound) gave outputs byte-identical to main.Changed op tests
None changed. #8036 trimmed the DSv4.1 router shapes from
test_gemm_a16w16.pyto keep the test shard within its time limit, so this PR no longer changes any op test and the two new tiles (M_LEQ_1344,M_LEQ_1536) have no dedicated op test. Their gfx1250 validation is the run already reported below (the a16w16 pytest at4342568a73and the main-vs-branchtgemm.mmcomparison).🤖 Generated with Claude Code