Repository navigation
[GLM-5] Tune the threshold of router GEMM - #29470
Merged
Merged
Conversation
b8zhong
requested review from
Fridge003,
ch-wan,
fzyzcjy,
ispobock and
merrymercy
as code owners
June 27, 2026 01:24
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
b8zhong
force-pushed
the
brayden/tune-glm5-router-gemm-threshold
branch
from
June 27, 2026 01:30
d35f28a to
ce8062d
Compare
b8zhong
enabled auto-merge (squash)
June 29, 2026 13:57
Fridge003
approved these changes
Jun 29, 2026
Collaborator
|
cc @nvjullin for vis |
vstone-w
pushed a commit
to ClownBin/sglang
that referenced
this pull request
Jul 2, 2026
Chronostasys
pushed a commit
to MindLab-Research/sglang
that referenced
this pull request
Aug 24, 2026
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.
Motivation
It seem that it will be very difficult for microbenchmarks to the amount of PDL overlap with the next kernel (and thus E2E performance timing), even with cold L2 + CUPTI + CUDA graph, or warm L2 + CUDA graph. When Torch is using splitK mode for very small problem size. Caused by https://github.com/sgl-project/sglang/pull/21531/changes
After doing a little research vllm-project/vllm#44217 (which uses warm L2 and is not entirely correct, but the point is similar) and lightseekorg/tokenspeed#33 (for E = 384)
So, use a crossover testing of 1K/1K, token sweep from 1 to 16, to find the real threshold.
Performance result on SM103:
GLM-5.2 1K-1K
With router GEMM vs without [M, 6144] x [256, 6144]:
For example, for num tokens = 8, it will (essentially) fail to PDL overlap. Also PyTorch has improved this problem size on SM10X too. (Remember, this kernel was introduced in May 2025)
Vs. using PyTorch GEMM:

Modifications
Change it. Need more careful testing in the future for these sort of changes.
CI States
Latest PR Test (Base): ✅ Run #28325522191
Latest PR Test (Extra): ❌ Run #28325522125