Skip to content

Conversation

bigPYJ1151
Copy link
Member

@bigPYJ1151 bigPYJ1151 commented Sep 11, 2025

Purpose

  • Add missing VIT backend dispatch on CPU to fix failed tests

Test Plan

CI tests

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.

Signed-off-by: jiang1.li <[email protected]>
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 fixes a bug in ViT attention on CPU by adding the TORCH_SDPA_VLLM_V1 backend to the dispatch logic. The change is straightforward and resolves the issue. I have one suggestion to improve the code's readability and maintainability.

Comment on lines +402 to +403
elif (self.attn_backend == _Backend.TORCH_SDPA
or self.attn_backend == _Backend.TORCH_SDPA_VLLM_V1):
Copy link
Contributor

Choose a reason for hiding this comment

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

high

For better readability and consistency, consider using the in operator to check for membership in a collection. This is also how a similar check is performed in the __init__ method of this class. Using in makes the code more concise and easier to maintain, especially if more backends are added to this condition in the future.

        elif self.attn_backend in (_Backend.TORCH_SDPA, _Backend.TORCH_SDPA_VLLM_V1):

@ywang96 ywang96 enabled auto-merge (squash) September 11, 2025 04:18
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Sep 11, 2025
@vllm-bot vllm-bot merged commit 29799dd into vllm-project:main Sep 11, 2025
48 of 51 checks passed
@DarkLight1337 DarkLight1337 added this to the v0.10.2 milestone Sep 11, 2025
skyloevil pushed a commit to skyloevil/vllm that referenced this pull request Sep 13, 2025
dsxsteven pushed a commit to dsxsteven/vllm_splitPR that referenced this pull request Sep 15, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants