Repository navigation
[SM120] Read FlashInfer 0.7's DSV4 decode dispatch through membership - #42368
Open
juliankang4 wants to merge 1 commit into
Open
juliankang4 wants to merge 1 commit into
juliankang4 wants to merge 1 commit into
Conversation
FlashInfer 0.7 turned `_DECODE_DSV4_DISPATCH` from a set of (num_heads, topk) pairs into a membership envelope that cannot be iterated, so the native-head probe raised TypeError during DeepSeek-V4 decode CUDA graph capture on SM12x. Ask it `(num_heads, 512) in dispatch` instead, which both forms answer.
juliankang4
requested review from
BBuf,
DarkSharpness,
HaiShaw,
HydraQYH,
celve and
yuan-luo
as code owners
October 3, 2026 09:03
4 of 5 tasks
detain
added a commit
to detain/sglang
that referenced
this pull request
Oct 20, 2026
…indexer) + stack_want decisions - stack.txt: entries 1-2 (local) + Group A boot-critical indexer chain sgl-project#42371/sgl-project#42861/sgl-project#45261/sgl-project#42294/sgl-project#43008 (fe7be85..0dbd8c5). - stack_want.txt: consolidated decision set from 8 parallel evaluators + dsv41(422)/SM120(254) sweeps + sybil/qwen harvests. Records E verdict (merge only sgl-project#43376) and D verdict (merge only sgl-project#42368; sgl-project#33407/sgl-project#34717 dead on flashinfer 0.7.2).
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).
This branch has not been 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.
Fixes #42367.
Motivation
FlashInfer 0.7 changed
flashinfer.mla._sparse_mla_sm120._DECODE_DSV4_DISPATCHfrom a frozenset of(num_heads, topk)pairs to a_DecodeDispatchEnvelopethat only answers membership._flashinfer_dsv4_decode_capabilities()iterates it to collect head counts, so with the FlashInfer that main pins (0.7.0.post1), DeepSeek-V4.1-Flash on SM12x with attention TP > 1 raisesTypeError: '_DecodeDispatchEnvelope' object is not iterablewhile capturing the decode CUDA graphs. Details and a one-line repro are in #42367.Modifications
_flashinfer_dsv4_decode_capabilities()returns the dispatch object as it is, instead of a set of head counts built from it.flashinfer_dsv4_decode_supports_num_heads()asks(num_heads, 512) in dispatch. 512 is the index top-k (index_topkin DeepSeek-V4.1-Flash's config, andDEFAULT_INDEX_TOPKindeepseek_v4_backend.py). FlashInfer 0.6 lists every head count it supports at 512, so the answer there is the same as before. 0.7 accepts any top-k >= 1 for the DSV4 family, so it answers by head count alone.This is how vLLM reads the same table (
has_flashinfer_sparse_mla_sm120_config()invllm/utils/flashinfer.py). The check stays fail-closed: without the FlashInfer module it still returns False and the padded 64-head path is used.Tests:
test/registered/unit/test_flashinfer_sparse_mla.py, newTestFlashInferDSV4DecodeHeads(CPU), with a fake_sparse_mla_sm120module in both forms:_DECODE_MAX_TOKENS. Fails on main with the sameTypeError._DECODE_MAX_TOKENS. Passes before and after, so 0.6 behaves as before.Accuracy Tests
No kernel changes. The probe only picks between the native per-rank head count and the padded 64-head decode, which #36655 already treats as equivalent (
test_flashinfer_exact_heads_match_padded_64_heads).End to end on four GB10 (SM121), DeepSeek-V4.1-Flash TP4, 16 query heads per rank: main stops at decode graph capture with the
TypeError. With the same membership probe applied, together with #42371 (the fix for #42364, which DeepSeek-V4.1 on SM12x also needs), the server captures its graphs and serves. GSM8K, all 1319, no thinking, temperature 0: 1276/1319. The setup and the rest of the numbers are in #42371.Speed Tests and Profiling
With FlashInfer 0.7, SM12x TP4 now takes the native 16-head decode that #36655 added, instead of crashing. Decode numbers on GB10 are in #42371.
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci