Fix flashinfer autotune oom glm51#24195
Merged
Merged
Conversation
The autotune cache only needs attention/MoE/GEMM kernel timings, but _dummy_run currently goes all the way through LogitsProcessor, where the [batch * dp_size, vocab] tensor-parallel all-gather buffer can OOM under DP attention on tight memory budgets (e.g. GLM-5.1-FP8 TP8+DP8 with --mem-fraction-static=0.9, which has been failing every B200 nightly run since the test was added). Add a module-level autotune_dummy_run_mode() context manager (mirroring cuda_graph_runner's model_capture_mode pattern), wrap the autotune dummy run with it, and have LogitsProcessor.forward short-circuit to LogitsProcessorOutput(next_token_logits=None) when the flag is set. The return value is discarded by the autotune call site, so the stub output is safe. Mirrors vLLM's split between _dummy_run (no lm_head, used by autotune) and _dummy_sampler_run (lm_head, profile-only). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment-analyzer review flagged three near-duplicate comment blocks explaining the same OOM mechanism. Keep the canonical explanation on _in_autotune_dummy_run, shrink the call-site comment to a one-liner that notes the dispatch ordering, and drop the redundant model_runner comment (the context-manager name is self-descriptive). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
Author
|
/tag-run-ci-label |
Collaborator
Author
|
One example of OOM CI https://github.com/sgl-project/sglang/actions/runs/25192084660/job/73864201790 (before fix) |
…otune-OOM-GLM51 # Conflicts: # python/sglang/srt/model_executor/model_runner.py
Collaborator
Author
Fridge003
reviewed
May 25, 2026
Fridge003
approved these changes
May 27, 2026
stellaxcpeng
pushed a commit
to stellaxcpeng/sglang
that referenced
this pull request
Jun 4, 2026
alphabetc1
pushed a commit
to alphabetc1/sglang
that referenced
this pull request
Jun 4, 2026
jeynmann
pushed a commit
to jeynmann/sglang
that referenced
this pull request
Jun 4, 2026
edwingao28
pushed a commit
to edwingao28/sglang
that referenced
this pull request
Jun 7, 2026
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.
Brought over from PR #23796 to trigger Nightly CI
CI States
Latest PR Test (Base): 🚫 Run #26854148428
Latest PR Test (Extra): ❌ Run #26854148322