Conversation
mmangkad
requested review from
BBuf,
Edwardf0t1,
Fridge003,
HaiShaw,
Ying1123,
ch-wan,
ispobock and
merrymercy
as code owners
September 12, 2026 07:26
Collaborator
Author
|
/rerun-test test/registered/kernels/ops/layernorm/test_mhc_kernels.py test/registered/e2e/models/test_glm53_flash_b200.py test/registered/e2e/models/test_glm53_flash_h200.py |
Contributor
|
Results for 🚀 🚀 🚀 |
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
GLM-5.3-Flash crosses 90 mHC post-then-pre boundaries per forward (45 layers, twice each). Each ran as three launches —
mhc_post, the tf32 pre-norm GEMM,mhc_pre_big_fuse— which at a 6-token verify batch is launch cost, not work.mhc_fused_post_preandapply_mhc_post_pre_boundaryalready exist and are live for DeepSeek-V4.glm5_nextnever called them: it routes throughMHCLayerCommunicator, not DeepSeek-V4's layer code.Modifications
MHCState.hc_ffn_post_preattn_to_mlp;Nonekeeps the unfused chainGlm5NextDecoderLayer.hc_ffn_post_pre_MHC_FUSED_BOUNDARY_MAX_TOKENS = 16Folds
mhc_postinto the pre-norm GEMM —mhc_pre_big_fusestill launches separately, so two launches instead of three. 45 of 90 boundaries fuse; the rest need DeepSeek-V4's cross-layer deferral.fn_transpose=Truematches DeepSeek-V4's call sites but is read only by the ROCm Triton tier, so it is unexercised on CUDA. Scope isglm5_nextwithmhc=True(config default isFalse).Why 16
CUDA-graph replays, GLM-5.3-Flash's
hc_mult=4/hidden_size=4096:Past the crossover the fused pre-norm GEMM drops the split-K kernel
mhc_preuses to 2048 tokens. 16 is conservative — parity is at 24, 17–23 unmeasured. The gate is in the GLM callback, not the shared dispatcher, which also serves DeepSeek-V4 athc_hidden_size=28672— these numbers cover one shape on one hardware config.Verify batch is
bs * speculative_num_draft_tokens: c=1 is 6 tokens and fuses, c=64 is 384 and declines.Accuracy Tests
GPQA Diamond, thinking on: 92.42% (183/198), 0 truncated, 0 errors.
temperature=1.0,top_p=0.95,max_tokens=131072, 1 repeat.Speed Tests and Profiling
GLM-5.3-Flash, tp4 on 4x GB300, 8192 in / 1024 out at c=1. 12 runs: 3 per arm across 4 server sessions, arms interleaved. The metric is verify steps per second, tok/s divided by accept length — the decode-loop rate, which is what a per-forward change moves. Raw tok/s scales with accept length, which clusters per server process.
Faster in both, with each session's run ranges disjoint.
At c=64 the gate declines and throughput is unchanged: 3466.9 vs 3456.3 tok/s.
Checklist
pre-commitcleantest_mhc_kernels.py; revertingcommunicator_mhc.pyfails 8, moving the cutoff to 64 or 4 fails 2 eachCI States
Latest PR Test (Base): ❌ Run #34830061832
Latest PR Test (Extra): ❌ Run #34830061740
Latest PR Test (AMD ROCm 10): ❌ Run #34830061928