Skip to content

[Main2Main] Upgrade to newest vLLM 0205#6511

Closed
Meihan-chen wants to merge 12 commits intovllm-project:mainfrom
Meihan-chen:main0130
Closed

[Main2Main] Upgrade to newest vLLM 0205#6511
Meihan-chen wants to merge 12 commits intovllm-project:mainfrom
Meihan-chen:main0130

Conversation

@Meihan-chen
Copy link
Copy Markdown
Contributor

@Meihan-chen Meihan-chen commented Feb 3, 2026

What this PR does / why we need it?

  1. Fix test_aclgraph_capture_replay_metrics_dp2 assertion to use range check for execute_model count due to [Core] Don't schedule spec tokens with prefill chunks vllm#33652
  2. Fix test_llama_lora expected outputs have minor differences in generated SQL formatting (e.g., count() → COUNT()).
  3. Fix no attribute 'data' due to not adapt v0.15.0 in [main2main] upgrade vllm main 0202 #6560 No.4 issue

Does this PR introduce any user-facing change?

How was this patch tested?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2026

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Meihan-chen, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on upgrading the vLLM Ascend project to be compatible with a newer upstream vLLM version, specifically referencing a commit from January 30th. The core changes involve adapting the codebase to API modifications in vLLM, primarily concerning the relocation of attention layer classes. This is achieved by implementing conditional imports, allowing the vLLM Ascend project to maintain functionality across different vLLM versions.

Highlights

  • Documentation Update: The vLLM version in the versioning_policy.md file has been updated to reflect a specific commit hash (f857a03f6b71101ac3f67b766f9a165c8b617f7b) alongside the v0.15.0 tag, indicating an upgrade to a newer upstream version.
  • API Compatibility for Attention Layers: The pull request introduces conditional imports for Attention and MLAAttention classes across multiple files. This change adapts the codebase to modifications in their module paths between vLLM v0.15.0 and newer versions, ensuring compatibility.
  • Codebase Adaptation: Several files within the vllm_ascend project were modified to utilize the vllm_version_is utility, allowing the project to dynamically import attention layer classes based on the detected vLLM version.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docs/source/community/versioning_policy.md
    • Updated the vLLM version entry in the compatibility table to include a specific commit hash (f857a03f6b71101ac3f67b766f9a165c8b617f7b) alongside the v0.15.0 tag.
  • tests/ut/quantization/test_modelslim_config.py
    • Replaced direct import of Attention with a conditional import based on vllm_version_is to handle different module paths.
  • vllm_ascend/compilation/npugraph_ex_passes/graphex_qknorm_rope_fusion_pass.py
    • Modified the import statement for Attention to be conditional on the vLLM version.
  • vllm_ascend/compilation/passes/qknorm_rope_fusion_pass.py
    • Updated the Attention import to be version-aware.
  • vllm_ascend/distributed/kv_transfer/kv_pool/cpu_offload/cpu_offload_connector.py
    • Changed imports for Attention and MLAAttention to be conditional on the vLLM version.
  • vllm_ascend/ops/mla.py
    • Modified the MLAAttention import to be conditional on the vLLM version.
  • vllm_ascend/patch/worker/patch_qwen3_next_mtp.py
    • Updated the Attention import to be conditional on the vLLM version.
  • vllm_ascend/quantization/modelslim_config.py
    • Changed the Attention import to be conditional on the vLLM version within the get_quant_method function.
  • vllm_ascend/worker/model_runner_v1.py
    • Modified imports for Attention and MLAAttention to be conditional on the vLLM version.
Ignored Files
  • Ignored by pattern: .github/workflows/** (6)
    • .github/workflows/_pre_commit.yml
    • .github/workflows/bot_pr_create.yaml
    • .github/workflows/dockerfiles/Dockerfile.lint
    • .github/workflows/pr_test_full.yaml
    • .github/workflows/pr_test_light.yaml
    • .github/workflows/schedule_codecov_refresh.yaml
Activity
  • No human activity (comments, reviews, etc.) has been recorded on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@vllm-ascend-ci vllm-ascend-ci added ready read for review ready-for-test start test by label for PR labels Feb 3, 2026
Copy link
Copy Markdown
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 upgrades the vLLM dependency to version 0.15.0. While the compatibility fixes are correct, the implementation introduces significant code duplication by repeating the same conditional import logic across multiple files. My review includes a high-severity comment recommending a refactoring to centralize this logic for better maintainability.

As per the repository's style guide, here are suggestions for the pull request title and summary:

Suggested PR Title:

[Main2Main][Compatibility][Upgrade] Upgrade vLLM dependency to 0.15.0

Suggested PR Summary:

### What this PR does / why we need it?

This PR upgrades the core vLLM dependency to version `v0.15.0`. To ensure compatibility, this change adapts the codebase to account for the new location of the `Attention` and `MLAAttention` classes in the updated vLLM API.

The versioning policy documentation has also been updated to reflect this change.

### Does this PR introduce _any_ user-facing change?

No, this is an internal dependency upgrade and should not introduce any user-facing changes.

### How was this patch tested?

CI tests should be run to verify compatibility with the new vLLM version and ensure there are no regressions.

Comment on lines +139 to +144
from vllm_ascend.utils import vllm_version_is

if vllm_version_is("v0.15.0"):
from vllm.attention.layer import Attention, MLAAttention # type: ignore
else:
from vllm.model_executor.layers.attention import Attention, MLAAttention
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

This conditional import logic for Attention and MLAAttention is duplicated across multiple files in this PR (e.g., tests/ut/quantization/test_modelslim_config.py, vllm_ascend/compilation/npugraph_ex_passes/graphex_qknorm_rope_fusion_pass.py, etc.). This harms maintainability, as any future compatibility changes will need to be updated in many places.

To improve this, I recommend centralizing this version-dependent import logic. You could create a new compatibility module (e.g., vllm_ascend/compatibility.py) that handles these imports and then import from that module in all the necessary files.

For example, vllm_ascend/compatibility.py could contain:

from .utils import vllm_version_is

if vllm_version_is("v0.15.0"):
    from vllm.attention.layer import Attention, MLAAttention  # type: ignore
else:
    from vllm.model_executor.layers.attention import Attention, MLAAttention

__all__ = ["Attention", "MLAAttention"]

Then, in this file and others, you could replace the conditional import block with a single line:
from vllm_ascend.compatibility import Attention, MLAAttention

This would make the code cleaner and easier to maintain.

@Meihan-chen Meihan-chen force-pushed the main0130 branch 3 times, most recently from b19fddf to 18b7654 Compare February 3, 2026 12:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 4, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: hfadzxy <starmoon_zhang@163.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@SlightwindSec
Copy link
Copy Markdown
Contributor

Thanks for your contribution! It looks like the DCO check failed. Please follow this guide to fix it: https://docs.vllm.ai/projects/ascend/en/latest/developer_guide/contribution/index.html

@wangxiyuan wangxiyuan closed this Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/build documentation Improvements or additions to documentation merge-conflicts module:ops module:quantization module:tests ready read for review ready-for-test start test by label for PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants