Skip to content

[Misc][Main2Main] Upgrade vLLM to v0.20.1 and 0506#8888

Draft
wxsIcey wants to merge 12 commits intovllm-project:mainfrom
wxsIcey:wxs/0506
Draft

[Misc][Main2Main] Upgrade vLLM to v0.20.1 and 0506#8888
wxsIcey wants to merge 12 commits intovllm-project:mainfrom
wxsIcey:wxs/0506

Conversation

@wxsIcey
Copy link
Copy Markdown
Collaborator

@wxsIcey wxsIcey commented May 6, 2026

What this PR does / why we need it?

Based on #8856

Fixes NPUInputBatch not have thinking_budget_state_holder = None, caused by [Reasoning][Feature] Support for speculative decoding with thinking budget

Fixes 'AscendMultiHeadLatentAttention' not have skip_topk, caused by [Feature]: IndexCache support for DSA models

Fixes MLA prefill backends selection, caused by [Attention] Abstract the MLA prefill backends and eliminate cuDNN

Fixes ModelRunner V2 eagle refactor, caused by [Model Runner V2] Skip attention metadata rebuild before draft prefill
, [Model Runner V2] Rebuild attn metadata between draft decode steps
, [Model Runner V2] Add logprob_token_ids support

Does this PR introduce any user-facing change?

N/A

How was this patch tested?

CI passed with new added/existing test.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 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, 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 upgrades the underlying vLLM dependency and introduces several compatibility layers to accommodate changes in the upstream vLLM codebase. It refactors the MoE implementation by consolidating shared expert logic into the primary AscendFusedMoE class and adds version-aware logic to handle API changes in vLLM's core components. These changes ensure that the Ascend backend remains functional across different vLLM versions while maintaining performance optimizations.

Highlights

  • vLLM Dependency Upgrade: Upgraded the vLLM dependency to commit 132765e to align with recent upstream changes.
  • MoE Layer Refactoring: Consolidated shared expert logic by removing the dedicated AscendSharedFusedMoE class and integrating its functionality into AscendFusedMoE.
  • Version Compatibility Layer: Implemented robust version-checking mechanisms to ensure compatibility with both the pinned vLLM version and the updated main branch, including patches for CpuGpuBuffer, CompilationTimes, and KV cache block size resolution.
  • Global Patching Mechanism: Introduced _ensure_global_patch to guarantee that necessary process-wide patches are applied before engine-core initialization in subprocesses.
New Features

🧠 You can now enable Memory (public preview) 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.

Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/_e2e_test.yaml
    • .github/workflows/pr_test_full.yaml
    • .github/workflows/pr_test_light.yaml
    • .github/workflows/scripts/config.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 the 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 counterproductive. 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.

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.

@wxsIcey
Copy link
Copy Markdown
Collaborator Author

wxsIcey commented May 6, 2026

upgrade to c7aa186d67b6f051680831418e957c67f34ba7a2

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 adapts the vllm-ascend plugin for compatibility with newer vLLM versions (post-v0.19.1). Key changes include refactoring the MoE implementation to merge shared expert logic into the base classes, implementing a global patching system for engine subprocesses, and adding version-specific handling for LoRA, scheduler, and worker components. It also includes an Ascend-specific patch for KV cache block size resolution to support context parallelism with multiple groups. I have no feedback to provide.\n\nSuggested PR Title:\n\nmarkdown\n[Ops][Misc] Adapt vllm-ascend for compatibility with newer vLLM versions and refactor MoE\n\n\nSuggested PR Summary:\n\nmarkdown\n### What this PR does / why we need it?\nThis PR introduces several compatibility fixes and refactorings to support vLLM versions beyond 0.19.1. Key updates include refactoring `AscendFusedMoE` and `AscendFusedMoE310` to incorporate shared expert logic directly, implementing `_ensure_global_patch` for engine-core subprocesses, and adding version-aware logic for `CompilationTimes`, `RMSNormGated`, and LoRA registration. It also patches `resolve_kv_cache_block_sizes` to support context parallelism with multiple KV cache groups on Ascend.\n\n### Does this PR introduce _any_ user-facing change?\nNo.\n\n### How was this patch tested?\nTested with updated unit tests in `tests/ut/_310p/fused_moe/`, `tests/ut/ops/test_fused_moe.py`, and `tests/ut/spec_decode/test_eagle_proposer.py`.\n

@wxsIcey wxsIcey added ready read for review ready-for-test start test by label for PR labels May 6, 2026
Comment thread vllm_ascend/lora/utils.py
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

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

@wxsIcey wxsIcey changed the title [Misc][Main2Main] Upgrade vLLM to 0506 [Misc][Main2Main] Upgrade vLLM to v0.20.1 and 0506 May 7, 2026
wxsIcey added 11 commits May 7, 2026 11:25
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

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

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

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

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.

2 participants