Repository navigation
[Fix] deepseek-v4.1: Keep the padded query buffer inside decoder tail graphs - #45301
Merged
Merged
Conversation
hnyls2002
requested review from
Fridge003,
HaiShaw,
Qiaolin-Yu,
hebiao064,
ispobock and
merrymercy
as code owners
October 20, 2026 04:09
Collaborator
Author
|
/rerun-test registered/attention/unittests/dsv4/test_deepseek_v4.py test_deepseek_v41_flash_gb300_encoder_bcg.py |
Collaborator
Author
|
/tag-and-rerun-ci |
Contributor
|
🚀 🚀 🚀 |
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 20, 2026
… correctness) - core batch [10-15]: sgl-project#43376 long-ctx indexer OOM bound, sgl-project#42368 FlashInfer-0.7 decode dispatch, sgl-project#39914 extra-KV 64-token page split + candidate fallback, sgl-project#42714 graph-safe page-split buffers, sgl-project#32464 SM120 sparse-prefill test gate, sgl-project#34027 int32->int64 page-split overflow guard. - Group C [16-23]: sgl-project#42717 TP-rank verify-budget, sgl-project#43225/sgl-project#43374 compact-verify seq_lens + padding renorm, sgl-project#42718 packed-verify token->request map, sgl-project#42713 forced-uniform capture metadata, sgl-project#45301 padded-query graph lifetime, sgl-project#44141 bounded-replay guard, sgl-project#45185 V4.1-Flash-1017 FP8 QDQ (env-gated, default OFF). sgl-project#42710 skipped (superseded upstream: step_logits already fp32).
4 of 5 tasks
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.
trtllm, notflashmla_mega), DeepSeek-V4.1 caches the zeroed padded query buffer on the step's attention metadata (q_pad_buffer) and replaced it whenever the shape changed.flush_cache(which empties the CUDA cache) they hit an MMU fault infused_q_norm_rope.MqaAttentionBase._zero_padded_q). Every bucket a tail step captures shares the largest one, which the graphs keep through the metadata they hold. The padding is still zeroed once and never rewritten. The graphs keep that one largest buffer alive (128 MiB at 2048 rows with TP8 heads padded to 64), where before each bucket's buffer was freed under it.q_pad_captured) and a later growth fails an assert instead of freeing a captured buffer. HIP's breakable-graph metadata keeps the mark across replays like the buffer.trtllm, andflashmla_mega.--dsv4-attn-backend flashmla(pads the query on this GPU too), the external-linker load-back KL cases, which flush the cache between requests.CI States
Latest PR Test (Base): 🚫 Run #39368034936
Latest PR Test (Extra): ❌ Run #39368034911
Latest PR Test (AMD ROCm 10): ⏳ Run #39368035086