Repository navigation
Conversation
…rch top-k past its max k; test the dispatch
hnyls2002
marked this pull request as ready for review
October 19, 2026 08:27
hnyls2002
requested review from
BBuf,
DarkSharpness,
Fridge003,
HaiShaw,
HydraQYH,
Qiaolin-Yu,
celve,
hebiao064,
ispobock,
merrymercy and
yuan-luo
as code owners
October 19, 2026 08:27
Collaborator
Author
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.
FullTopKIndexer._deep_gemm_prefill_captured) now selects each row up to its own length withtopk_transform_paged_from_metadata, the selection the decode path already runs on the same paged logits, instead of atorch.topkover the whole captured width.kfrom the output width and caps it at 1024 (kMaxTopKindeepseek_v4/topk_v1.cuh, nowTOPK_V1_MAX_K). Outputs wider than that keep the torch top-k overmin(k, width)columns, so no configuredkis truncated.TestDSV4FullTopKCapturedFallbackchecks which path each output width takes, and that the torch path keeps every column.Behavior change: with
--cuda-graph-backend-prefill breakable, DeepSeek-V4.1's ratio-1/2 indexer layers inside the prefill graph select with the per-row kernel (index_topkis 512 for DeepSeek-V4.1-Flash).Checked on GB300 with DeepSeek-V4.1-Flash, TP4 (DSPARK, chunked prefill 8192, decoder replay on), against main (617c8b6) with the same prefill graph:
test_deepseek_v4.pypasses on GB300 (27 tests).CI States
Latest PR Test (Base): ❌ Run #39192645755
Latest PR Test (Extra): ❌ Run #39192645634
Latest PR Test (AMD ROCm 10): ❌ Run #39192645601