Repository navigation
[BCG][6/N] Allow prefill breakable CUDA graph for the Kimi archs - #34245
Merged
Oasis-Git merged 3 commits intoAug 16, 2026
Merged
Conversation
Kimi configs always construct a vision_config (KimiK3Config defaults it to KimiK3VisionConfig() when absent), so ModelConfig.is_multimodal is True via the has_multimodal_subconfig sniff even when serving text only -- neither the arch name nor multimodal_model_archs is involved. The generic "multimodal model" rule in _disable_breakable_cudagraph_if_incompatible then forced prefill.backend to DISABLED on the default path. This only ever showed up on the default path: _apply_cuda_graph_compatibility returns early when the prefill backend is explicitly locked, so validation runs using --cuda-graph-backend-prefill breakable bypassed the rule and looked fine. With sgl-project#33661 making MLA fully supported under BCG (and dropping the per-arch MLA opt-in list), this multimodal rule was the last thing keeping Kimi off BCG. Opt both Kimi archs into the breakable allowlist, and give the tc_piecewise upgrade an explicit precedence rule. That upgrade runs before the disable rules and consulted only the piecewise allowlist, so for any arch on both lists it silently won and breakable membership was dead -- K2.5 is on both. Preferring breakable there keeps K2.5 on the piecewise allowlist (it is still piecewise-validated, and is_piecewise_cuda_graph_disabled_model stays False) while actually resolving to breakable. Capturing is safe for the same reason it is for the other allowlisted archs: can_replay_locally rejects any batch carrying input_embeds/replace_embeds, so image-carrying batches fall back to eager and only text-only prefill replays. The tc_piecewise upgrade test builds its model_config as a SimpleNamespace; add the field the new condition reads. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Collaborator
Author
|
/rerun-failed-ci |
# Conflicts: # python/sglang/srt/configs/model_config.py
Collaborator
Author
saturn-acc
pushed a commit
to saturn-acc/sglang
that referenced
this pull request
Aug 16, 2026
…-project#34245) Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
danielchristiancazares
pushed a commit
to danielchristiancazares/sglang
that referenced
this pull request
Aug 17, 2026
…-project#34245) Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
5 tasks done
|
Does DeepSeek have the same issue? |
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.
Kimi configs always construct a vision_config (KimiK3Config defaults it to KimiK3VisionConfig() when absent), so ModelConfig.is_multimodal is True via the has_multimodal_subconfig sniff even when serving text only -- neither the arch name nor multimodal_model_archs is involved. The generic "multimodal model" rule in _disable_breakable_cudagraph_if_incompatible then forced prefill.backend to DISABLED on the default path.
This only ever showed up on the default path: _apply_cuda_graph_compatibility returns early when the prefill backend is explicitly locked, so validation runs using --cuda-graph-backend-prefill breakable bypassed the rule and looked fine. With #33661 making MLA fully supported under BCG (and dropping the per-arch MLA opt-in list), this multimodal rule was the last thing keeping Kimi off BCG.
Opt both Kimi archs into the breakable allowlist, and give the tc_piecewise upgrade an explicit precedence rule. That upgrade runs before the disable rules and consulted only the piecewise allowlist, so for any arch on both lists it silently won and breakable membership was dead -- K2.5 is on both. Preferring breakable there keeps K2.5 on the piecewise allowlist (it is still piecewise-validated, and is_piecewise_cuda_graph_disabled_model stays False) while actually resolving to breakable.
Capturing is safe for the same reason it is for the other allowlisted archs: can_replay_locally rejects any batch carrying input_embeds/replace_embeds, so image-carrying batches fall back to eager and only text-only prefill replays.
The tc_piecewise upgrade test builds its model_config as a SimpleNamespace; add the field the new condition reads.
Motivation
Modifications
Accuracy Tests
Speed Tests and Profiling
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ciCI States
Latest PR Test (Base): ✅ Run #31928447120
Latest PR Test (Extra): ❌ Run #31928447030