Skip to content

Conversation

@fhl2000
Copy link
Contributor

@fhl2000 fhl2000 commented Oct 23, 2025

Purpose

Previously, resolving cudagraph_mode happened after attn_metadata_builder initialisation, which means attn_metadata_builder is not aware of the potential changed cudagraph_mode. (could lead to querying invalid cudagraph_capturing_sizes list if the resolved mode is NONE).

This should also fix the CI for #26016

Test Plan

To see if the CI is fixed in #26016 after merging this.

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

@mergify mergify bot added the v1 label Oct 23, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a bug where cudagraph_mode was resolved after the initialization of attn_metadata_builder, which could lead to incorrect behavior. The fix refactors the initialization logic in GPUModelRunner to ensure that cudagraph_mode is determined based on attention backend capabilities before the metadata builders are instantiated. This is achieved by first collecting all attention backend classes, determining the minimum supported CUDA graph level, and only then initializing the attention groups. The changes are logical, well-implemented, and effectively resolve the issue. The associated refactoring improves the code's clarity and correctness. The changes look solid.

Signed-off-by: fhl2000 <[email protected]>
@mergify
Copy link

mergify bot commented Oct 23, 2025

Documentation preview: https://vllm--27427.org.readthedocs.build/en/27427/

@mergify mergify bot added the documentation Improvements or additions to documentation label Oct 23, 2025
@ProExpertProg ProExpertProg enabled auto-merge (squash) October 23, 2025 18:27
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 23, 2025
@vllm-bot vllm-bot merged commit 85fee74 into vllm-project:main Oct 24, 2025
45 of 48 checks passed
@fhl2000 fhl2000 deleted the fix_cudagraph_mode_CI branch October 24, 2025 06:52
atalhens pushed a commit to atalhens/vllm that referenced this pull request Oct 24, 2025
kingsmad pushed a commit to kingsmad/vllm that referenced this pull request Oct 25, 2025
rohin-garg pushed a commit to rohin-garg/vllm that referenced this pull request Oct 25, 2025
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
0xrushi pushed a commit to 0xrushi/vllm that referenced this pull request Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ready ONLY add when PR is ready to merge/full CI is needed v1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants