[BugFix] Preserve max_seq_len in ubatch metadata during CUDA graph capture - #40961
Merged
LucasWilkinson merged 8 commits intoMay 5, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the _make_metadata_with_slice function in vllm/v1/worker/ubatch_utils.py to ensure that max_seq_len incorporates the override value from attn_metadata. This adjustment is intended to maintain the correct kernel selection for Sliding Window Attention (SWA) layers during CUDA-graph capture. I have no feedback to provide.
czhu-cohere
force-pushed
the
fix/dbo-swa-kernel-selection
branch
from
April 27, 2026 04:47
af0b6d6 to
8402599
Compare
czhu-cohere
marked this pull request as ready for review
April 27, 2026 04:47
Contributor
|
Hi @czhu-cohere, the pre-commit checks have failed. Please run: uv pip install pre-commit>=4.5.1
pre-commit install
pre-commit run --all-filesThen, commit the changes and push to your branch. For future commits, Tip Is
|
LucasWilkinson
approved these changes
Apr 27, 2026
Collaborator
|
Make sense; thanks for the fix! |
LucasWilkinson
enabled auto-merge (squash)
April 27, 2026 18:22
chaojun-zhang
pushed a commit
to chaojun-zhang/vllm
that referenced
this pull request
May 6, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com>
Copilot AI
pushed a commit
to hongbolv/vllm
that referenced
this pull request
May 7, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com> Co-authored-by: hongbolv <33214277+hongbolv@users.noreply.github.com>
ikaadil
pushed a commit
to ikaadil/vllm
that referenced
this pull request
May 7, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com> Signed-off-by: Ifta Khairul Alam Adil <ikaadil007@gmail.com>
libinta
pushed a commit
to libinta/vllm
that referenced
this pull request
May 8, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com> Signed-off-by: Libin Tang <libin.tang@intel.com>
weifang231
pushed a commit
to weifang231/eb-vllm
that referenced
this pull request
May 13, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com>
mfylcek
pushed a commit
to mfylcek/vllm
that referenced
this pull request
May 19, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com>
jhu960213
pushed a commit
to jhu960213/vllm
that referenced
this pull request
May 20, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com>
mvanhorn
pushed a commit
to mvanhorn/vllm
that referenced
this pull request
Jun 4, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com> Signed-off-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
MingqiWang-coder
added a commit
to vLLM-HUST/vllm-hust
that referenced
this pull request
Jun 30, 2026
Cherry-pick 62 bugfix/security PRs from upstream vllm-project/vllm main (2026-05-03 to 2026-06-17), covering scheduler, engine core, model runner, worker, attention, KV cache, compilation, and structured output fixes. Security (4): vllm-project#43286 vllm-project#44744 vllm-project#45118 vllm-project#45252 Bugfix (56): vllm-project#35536 vllm-project#36616 vllm-project#38895 vllm-project#39155 vllm-project#39324 vllm-project#39562 vllm-project#39805 vllm-project#40398 vllm-project#40726 vllm-project#40727 vllm-project#40737 vllm-project#40749 vllm-project#40961 vllm-project#41119 vllm-project#41133 vllm-project#41233 vllm-project#41237 vllm-project#41411 vllm-project#41496 vllm-project#41549 vllm-project#41674 vllm-project#41873 vllm-project#41895 vllm-project#42040 vllm-project#42112 vllm-project#42289 vllm-project#42479 vllm-project#42585 vllm-project#42692 vllm-project#42706 vllm-project#42709 vllm-project#42739 vllm-project#42967 vllm-project#43001 vllm-project#43079 vllm-project#43125 vllm-project#43160 vllm-project#43616 vllm-project#43669 vllm-project#43719 vllm-project#43768 vllm-project#43808 vllm-project#43961 vllm-project#43982 vllm-project#43988 vllm-project#43998 vllm-project#44057 vllm-project#44560 vllm-project#44574 vllm-project#44568 vllm-project#44603 vllm-project#44744 vllm-project#45195 vllm-project#45345 vllm-project#45383 vllm-project#45487 vllm-project#45564 vllm-project#45673 Runner fix (2): vllm-project#44568 vllm-project#44603 Skipped: vllm-project#43781 (ROCm-specific, not applicable to Ascend NPU) Conflict resolutions: - Manual merge: vllm-project#43286 vllm-project#45118 vllm-project#42112 vllm-project#43160 vllm-project#43719 vllm-project#44560 - Upstream-preferred (-X theirs): vllm-project#43808 vllm-project#43988 vllm-project#42967 vllm-project#35536 vllm-project#45195 - Test files (--theirs): vllm-project#44744 vllm-project#41895 vllm-project#42040 vllm-project#41233 vllm-project#45345 vllm-project#43982 Co-authored-by: GitHub Copilot Signed-off-by: MingqiWang-coder <mingqiwang@hust.edu.cn>
MingqiWang-coder
added a commit
to vLLM-HUST/vllm-hust
that referenced
this pull request
Jun 30, 2026
Cherry-pick 62 bugfix/security PRs from upstream vllm-project/vllm main (2026-05-03 to 2026-06-17), covering scheduler, engine core, model runner, worker, attention, KV cache, compilation, and structured output fixes. Security (4): vllm-project#43286 vllm-project#44744 vllm-project#45118 vllm-project#45252 Bugfix (56): vllm-project#35536 vllm-project#36616 vllm-project#38895 vllm-project#39155 vllm-project#39324 vllm-project#39562 vllm-project#39805 vllm-project#40398 vllm-project#40726 vllm-project#40727 vllm-project#40737 vllm-project#40749 vllm-project#40961 vllm-project#41119 vllm-project#41133 vllm-project#41233 vllm-project#41237 vllm-project#41411 vllm-project#41496 vllm-project#41549 vllm-project#41674 vllm-project#41873 vllm-project#41895 vllm-project#42040 vllm-project#42112 vllm-project#42289 vllm-project#42479 vllm-project#42585 vllm-project#42692 vllm-project#42706 vllm-project#42709 vllm-project#42739 vllm-project#42967 vllm-project#43001 vllm-project#43079 vllm-project#43125 vllm-project#43160 vllm-project#43616 vllm-project#43669 vllm-project#43719 vllm-project#43768 vllm-project#43808 vllm-project#43961 vllm-project#43982 vllm-project#43988 vllm-project#43998 vllm-project#44057 vllm-project#44560 vllm-project#44574 vllm-project#44568 vllm-project#44603 vllm-project#44744 vllm-project#45195 vllm-project#45345 vllm-project#45383 vllm-project#45487 vllm-project#45564 vllm-project#45673 Runner fix (2): vllm-project#44568 vllm-project#44603 Skipped: vllm-project#43781 (ROCm-specific, not applicable to Ascend NPU) Conflict resolutions: - Manual merge: vllm-project#43286 vllm-project#45118 vllm-project#42112 vllm-project#43160 vllm-project#43719 vllm-project#44560 - Upstream-preferred (-X theirs): vllm-project#43808 vllm-project#43988 vllm-project#42967 vllm-project#35536 vllm-project#45195 - Test files (--theirs): vllm-project#44744 vllm-project#41895 vllm-project#42040 vllm-project#41233 vllm-project#45345 vllm-project#43982 Co-authored-by: GitHub Copilot Signed-off-by: MingqiWang-coder <mingqiwang@hust.edu.cn>
plasticchris
pushed a commit
to plasticchris/vllm
that referenced
this pull request
Jul 20, 2026
…pture (vllm-project#40961) Signed-off-by: root <conway.zhu@cohere.com> Signed-off-by: <conway.zhu@cohere.com>
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.
Purpose
for SWA models the current code would incorrectly select full attention kernels for SWA layers since the seqlen seen at cudagraph capture was 1. Explicitly pass in the metadata max_model_len to fix it
Test Plan
Test Result
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.