Skip to content

[main2main]upgrade main to 0214#6779

Closed
MrZ20 wants to merge 6 commits intovllm-project:mainfrom
MrZ20:main_0213
Closed

[main2main]upgrade main to 0214#6779
MrZ20 wants to merge 6 commits intovllm-project:mainfrom
MrZ20:main_0213

Conversation

@MrZ20
Copy link
Copy Markdown
Contributor

@MrZ20 MrZ20 commented Feb 24, 2026

What this PR does / why we need it?

This PR completes the parallel alignment of the vLLM Ascend main branch with the upstream vLLM branch:
(1)Aligned to vLLM v0.16.0 (tag)
(2)Aligned to the upstream vLLM commit of 2026/02/14: b3c14229b032a8bbf93d450a52c9a404ddaea429

Does this PR introduce any user-facing change?

How was this patch tested?

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @MrZ20, 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 adapting the codebase to align with a newer vLLM version, specifically addressing changes related to version 0.15.0. It updates documentation, manages new dependencies, and implements conditional logic to maintain compatibility and correct functionality for Mixture of Experts (MoE) operations and testing across different vLLM base versions. The changes ensure that the system can gracefully handle variations in the vLLM API and internal structures.

Highlights

  • vLLM Version Update: The versioning_policy.md documentation has been updated to reflect a new vLLM commit hash, indicating an upgrade or alignment with a more recent vLLM main branch state.
  • Dependency Management: The torchaudio library has been added to the requirements.txt file, indicating a new dependency for the project.
  • Conditional MoE Runner Implementation: Introduced version-dependent logic in vllm_ascend/ops/fused_moe/fused_moe.py to provide a custom AscendMoERunner for vLLM versions older than 0.15.0, ensuring compatibility and proper MoE operation across different vLLM base versions.
  • Test Case Adaptation: The test_aclgraph_accuracy.py file has been modified to conditionally define the CASE_DS_ACLGRAPH test case based on the vLLM version, allowing for different golden answers depending on the underlying vLLM behavior.
  • Dynamic Architecture Logging: Updated vllm_ascend/utils.py to dynamically determine the model architecture name for logging purposes, with specific handling for vLLM versions prior to 0.15.0 to access hf_text_config.

🧠 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 commit hash reference for the main branch to '1dae7b7843062f3468485653779d43ef96c7245c' in the versioning policy table.
  • requirements.txt
    • Added 'torchaudio' as a new dependency.
  • tests/e2e/singlecard/test_aclgraph_accuracy.py
    • Imported vllm_version_is from vllm_ascend.utils.
    • Modified CASE_DS_ACLGRAPH definition to be conditional based on vllm_version_is("0.15.0"), providing different golden_answers for different vLLM versions.
    • Removed CASE_QWEN_ACLGRAPH from the pytest.mark.parametrize decorator for test_piecewise_res_consistency.
  • vllm_ascend/ops/fused_moe/fused_moe.py
    • Imported vllm_version_is from vllm_ascend.utils.
    • Conditionally imported FusedMoEMethodBase, FusedMoERouter, and DefaultMoERunner for vLLM versions older than 0.15.0.
    • Introduced AscendMoERunner class, inheriting from DefaultMoERunner, with an overridden forward_impl method for vLLM versions older than 0.15.0.
    • Conditionally initialized the runner attribute in AscendFusedMoE's __init__ method for vLLM versions older than 0.15.0.
    • Conditionally added an _init_runner method to AscendFusedMoE for vLLM versions older than 0.15.0 to create an AscendMoERunner instance.
    • Conditionally added a forward method to AscendFusedMoE for vLLM versions older than 0.15.0, delegating to the runner's forward method.
    • Conditionally re-initialized the runner in AscendFusedMoE's __init__ after _gate is set, specifically for vLLM versions older than 0.15.0.
  • vllm_ascend/utils.py
    • Imported vllm_version_is within update_aclgraph_sizes.
    • Modified the determination of arch_name for logging to be conditional on vllm_version_is("0.15.0"), accessing hf_text_config for older versions to avoid recursion.
Ignored Files
  • Ignored by pattern: .github/workflows/** (6)
    • .github/workflows/_e2e_test.yaml
    • .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
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.

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 appears to be a synchronization effort to align with a newer version of vLLM (post-v0.15.0), introducing backward compatibility shims primarily for MoE functionality. While the changes are generally sound for a version upgrade, I have identified two high-severity issues. First, a local import in vllm_ascend/utils.py creates a circular dependency, which is a significant maintainability concern. Second, a test case appears to have been removed from tests/e2e/singlecard/test_aclgraph_accuracy.py without explanation, potentially reducing test coverage.

Additionally, as per the repository's style guide, the pull request title and description do not follow a specific format. I've provided suggestions below to align with the guidelines.

Suggested PR Title:

[main2main][Misc] Upgrade to support newer vLLM versions

Suggested PR Summary:

### What this PR does / why we need it?
This pull request introduces changes to ensure compatibility with a newer version of vLLM while maintaining backward compatibility with vLLM v0.15.0.

Key changes include:
- Adding `torchaudio` to `requirements.txt`.
- Updating the vLLM commit hash in the versioning policy documentation.
- Introducing version-based conditional logic (`if not vllm_version_is("0.15.0")`) in `vllm_ascend/ops/fused_moe/fused_moe.py` to support the new MoE runner architecture in recent vLLM versions.
- Updating e2e tests with version-specific golden answers to handle model output changes.
- Refactoring `vllm_ascend/utils.py` to handle different model config structures between vLLM versions.

These changes are necessary to keep the `vllm-ascend` plugin aligned with the upstream vLLM repository.

### Does this PR introduce _any_ user-facing change?
No user-facing changes are introduced. This is primarily a maintenance and compatibility update.

### How was this patch tested?
The changes are validated by existing CI tests. E2E tests have been updated to account for version-specific differences.

@Potabk Potabk added ready read for review ready-for-test start test by label for PR labels Feb 24, 2026
@github-actions
Copy link
Copy Markdown
Contributor

👋 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.

@github-actions
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Collaborator

@gcanlin gcanlin left a comment

Choose a reason for hiding this comment

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

Recover all if not vllm_version_is("v0.15.0") And replace them as the following code:

     if not vllm_version_is("v0.16.0"):

@github-actions
Copy link
Copy Markdown
Contributor

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

@gcanlin
Copy link
Copy Markdown
Collaborator

gcanlin commented Feb 25, 2026

Signed-off-by: MrZ20 <2609716663@qq.com>
Signed-off-by: gcanlin <canlinguosdu@gmail.com>
Signed-off-by: gcanlin <canlinguosdu@gmail.com>
Signed-off-by: gcanlin <canlinguosdu@gmail.com>
Signed-off-by: gcanlin <canlinguosdu@gmail.com>
@gcanlin
Copy link
Copy Markdown
Collaborator

gcanlin commented Feb 26, 2026

@MrZ20 Please set this PR to ready.
cc @wangxiyuan

@MrZ20 MrZ20 marked this pull request as ready for review February 26, 2026 01:20
@MrZ20 MrZ20 changed the title [main2main]upgrade main to 0213 [main2main]upgrade main to 0214 Feb 26, 2026
@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.

@MrZ20 MrZ20 closed this Feb 27, 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:core module:ops 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.

3 participants