Repository navigation
feat(gemm): Muse Spark pooler gemm_n4096_k8192 at 24 m in 581-896 - #219
Merged
Merged
Conversation
fanxingran
requested review from
RuibinCheung,
irvineoy,
jiejingzhangamd,
kyle-256,
xiaobochen-amd and
zhenhuang12
as code owners
November 16, 2026 06:47
fanxingran
temporarily deployed
to
gpu-trusted
November 16, 2026 06:58 — with
GitHub Actions
Inactive
Collaborator
|
please rebase main |
zhenhuang12
approved these changes
Nov 18, 2026
zhenhuang12
approved these changes
Nov 18, 2026
A second gemm_n4096_k8192 schema for the m the pooler runs at above 512: the padded CUDA graph token counts of DSpark decode and mixed prefill steps at higher concurrency. Same kernel as the existing schema plus an m-fastest tile order for "big" rows; m 513-1024 use a 128x256 tile, split-K 2 with the last-split fold, m-fastest, so the tiles sharing a B column block run together on one XCD. Pins flydsl>=0.3.2. Of 54 candidate m, the 24 that reach 1.05x over aiter in three bench runs are kept.
zhenhuang12
force-pushed
the
fanxingran/muse-gemm-pooler-2
branch
from
November 18, 2026 01:55
09bfd06 to
cc629f7
Compare
zhenhuang12
temporarily deployed
to
gpu-trusted
November 18, 2026 01:57 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
#110 added FlyDSL kernels for Muse Spark's MoE pooler (
gemm_n4096_k8192) and unpooler (gemm_n8192_k4096), and #112 routes Muse'sF.linearthere. #110 covers only the pooler's small m, up to 248. At higher concurrency the pooler runs at m 581-1024, where AKLR has no kernel. This adds a second pooler schema for those m. It is the same kernel plus an m-fastest tile order.Scope
gemm_n4096_k8192(pooler), new kernel file: m 581, 630, 632, 640, 728, 735, 742, 744, 752, 756, 763, 768, 826, 832, 861, 864, 872, 875, 880, 882, 888, 889, 893, 896._CONFIGSis feat(gemm): FlyDSL gemm for Muse's MoE pooler and unpooler (n4096_k8192, n8192_k4096) #110's.AKLR_EXPORTrun and in a kernel trace at concurrency 64, both higher than feat(gemm): FlyDSL gemm for Muse's MoE pooler and unpooler (n4096_k8192, n8192_k4096) #110's export run (TP8 + EP, DSpark k=7).50af7968, m <= 248); dispatch picks the schema per m (Verification).Tradeoffs
The pooler and unpooler at m 192-576 were also tried on hipBLASLt solutions pinned by index through AITER's
_hipb_mm. They are not in this PR. Such a kernel has no FlyDSL, andkernel.requirescannot name hipBLASLt (#168), so its measurements would not be tied to the library that produced them. The minimal change would be ahipblaslttoolchain thatrequirescan pin. That is a separate PR.Verification
Environment: head
09bfd06d; MI355X x8,lmsysorg/sglang:v0.5.22-rocm10-mi35x, ROCm 10.0 / HIP 7.15, torch 2.11, Triton 3.8.0, FlyDSL 0.3.2, AITERdbd8bf5(CI's); also FlyDSL 0.3.4.1 (the image's) for the build checkGate overrides: none (
FLYDSL_RUNTIME_ENABLE_CACHE=0)Kernels
python -m aklr validate --base origin/main --stages audit,benchon this head:aiter.tuned_gemm.gemm_a16w16Per m:
F.linear: 1.02 – 1.11 (geomean 1.07). It is under 1.05 at m 581 and 864 – 896, whereF.linearis within a few percent of AITER's time.F.linear's (55.6 dB), and its output is bitwise deterministic. AITER here gets 52.2 dB, with about 1.7x the max error.50af7968serves its m 1 – 248 (unchanged).no_workload.Validation log
Code
No code changes; a schema file only.
python -m aklr export check: passed.pre-commiton the changed file: passed.pytest tests/ops/test_contracts.py tests/plugins tests/ops/test_reference.py tests/core/runtime/test_dispatch.py -k "gemm or test_contracts or plugins or dispatch"(GPU): 221 passed, 19 skipped, identical toorigin/main.Not run
ci:gpu).Risk
Affects:
gemm_n4096_k8192(Muse Spark's pooler) at the 24 listed m.If wrong: wrong pooler output in Muse Spark's MoE at those m, or slower than AITER. m 861 and 864 measured 1.053 in one run each, so CI may put one under 1.05; that m is then not served.
Undo:
[email protected], orgit revert.