Skip to content

[main2main] upgrade main 0209#6643

Closed
wxsIcey wants to merge 10 commits intovllm-project:mainfrom
wxsIcey:main_0209
Closed

[main2main] upgrade main 0209#6643
wxsIcey wants to merge 10 commits intovllm-project:mainfrom
wxsIcey:main_0209

Conversation

@wxsIcey
Copy link
Copy Markdown
Collaborator

@wxsIcey wxsIcey commented Feb 9, 2026

What this PR does / why we need it?

  1. Fixed import problem of VllmInductorPass and get_pass_context due to [torch.compile] Reorganize vllm/compilation and tests/compile (0/N for vLLM IR) vllm#33731
  2. Fixed spec decode ut raise error due to [Spec Decode] Unified Parallel Drafting vllm#32887

Does this PR introduce any user-facing change?

How was this patch tested?

Meihan-chen and others added 10 commits February 9, 2026 13:30
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: hfadzxy <starmoon_zhang@163.com>
Signed-off-by: hfadzxy <starmoon_zhang@163.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 github-actions Bot added documentation Improvements or additions to documentation ci/build module:tests module:ops labels Feb 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 9, 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 @wxsIcey, 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 includes several updates and fixes for the vLLM-Ascend project. It updates version compatibility in documentation, adjusts tolerance ranges in tests, updates dependencies, and adds version checks for conditional module imports and behavior adjustments. The changes also include refactoring and enhancements to unit tests for EagleProposer and MtpProposer.

Highlights

  • Versioning Policy: Updates the vLLM Ascend version compatibility information in the documentation.
  • Test Updates: Modifies the test_aclgraph_capture_replay.py to adjust the tolerance range for model execution and dummy run counts, and reorders imports.
  • Dependency Updates: Replaces vllm.compilation.fx_utils.OpOverload with torch._ops.OpOverload in multiple test files.
  • LoRA Test: Updates the expected output for LoRA tests based on the vLLM version.
  • Eagle Proposer Tests: Refactors and enhances unit tests for EagleProposer, including setting and clearing the current vLLM config and adding mocks.
  • MTP Proposer Tests: Enhances unit tests for MtpProposer, including mocking parallel state functions and preventing actual execution during dummy runs.
  • Compatibility: Adds version checking for vLLM to conditionally import modules and adjust behavior based on the vLLM version.
  • MLA Operation: Adds version checking for vLLM to conditionally process weights after loading.

🧠 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 vLLM Ascend version compatibility information.
  • tests/e2e/multicard/2-cards/test_aclgraph_capture_replay.py
    • Reordered imports.
    • Adjusted tolerance range for model execution count.
    • Adjusted tolerance range for dummy run count.
  • tests/e2e/singlecard/compile/backend.py
    • Replaced vllm.compilation.fx_utils.OpOverload with torch._ops.OpOverload.
  • tests/e2e/singlecard/compile/test_norm_quant_fusion.py
    • Replaced vllm.compilation.fx_utils.OpOverload with torch._ops.OpOverload.
  • tests/e2e/singlecard/test_llama32_lora.py
    • Updated expected LoRA output based on vLLM version.
    • Added vllm_version_is to check vLLM version.
  • tests/ut/spec_decode/test_eagle_proposer.py
    • Added mocks for hf_text_config.
    • Added mocks for parallel config.
    • Set and clear the current vLLM config.
    • Added mocks for parallel state functions.
  • tests/ut/spec_decode/test_mtp_proposer.py
    • Added mocks for hf_text_config.
    • Added mocks for parallel config.
    • Set and clear the current vLLM config.
    • Added mocks for parallel state functions.
    • Mocked _runnable to prevent actual execution during dummy runs.
  • vllm_ascend/compilation/graph_fusion_pass_manager.py
    • Added version checking for vLLM to conditionally import modules.
  • vllm_ascend/compilation/npu_graph_ex_pass_manager.py
    • Added version checking for vLLM to conditionally import modules.
  • vllm_ascend/compilation/npugraph_ex_passes/graphex_allreduce_rmsnorm_fusion_pass.py
    • Added version checking for vLLM to conditionally import modules.
  • vllm_ascend/compilation/passes/allreduce_rmsnorm_fusion_pass.py
    • Added version checking for vLLM to conditionally import modules.
  • vllm_ascend/compilation/passes/norm_quant_fusion_pass.py
    • Added version checking for vLLM to conditionally import modules.
  • vllm_ascend/compilation/passes/qknorm_rope_fusion_pass.py
    • Added version checking for vLLM to conditionally import modules.
  • vllm_ascend/ops/mla.py
    • Added version checking for vLLM to conditionally process weights after loading.
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
Activity
  • Documentation updated for version compatibility.
  • Test cases modified to accommodate tolerance ranges and version-specific behavior.
  • Dependency on vllm.compilation.fx_utils.OpOverload replaced with torch._ops.OpOverload.
  • Conditional logic added to handle different vLLM versions.
  • Unit tests enhanced with mocking and configuration management.
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 updates the codebase to be compatible with recent changes in the upstream vLLM repository. The changes primarily involve adapting to new or moved APIs, especially around compilation passes and global configuration contexts in tests. While most of the adaptations are correct, I've found a recurring issue with how vLLM versions are being checked. The current implementation uses an exact equality check, which is brittle and will likely break with future vLLM updates. I've provided suggestions to make these version checks more robust. The rest of the changes, including test updates and documentation, look good.

Comment on lines +22 to +31
from vllm_ascend.utils import vllm_version_is

# isort: off
if vllm_version_is("v0.15.0"):
from vllm.compilation.inductor_pass import get_pass_context # type: ignore
from vllm.compilation.vllm_inductor_pass import VllmInductorPass # type: ignore
else:
from vllm.compilation.passes.inductor_pass import get_pass_context # type: ignore
from vllm.compilation.passes.vllm_inductor_pass import VllmInductorPass # type: ignore
# isort: on
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

Using vllm_version_is for an exact equality check against 'v0.15.0' is brittle. This will cause incorrect import paths for any other vLLM version, including older versions like 0.14.0, future patch releases like 0.15.1, or development versions. This can lead to ImportError and makes maintenance harder.

A more robust approach is to use version range comparisons based on when the upstream API change occurred. For example:

from packaging.version import Version
import vllm

# isort: off
# The import paths for compilation passes changed in vLLM.
# Use version checking to maintain compatibility.
# Please verify the exact vLLM version where this change occurred.
if Version(vllm.__version__).base_version <= "0.15.0":
    from vllm.compilation.inductor_pass import get_pass_context  # type: ignore
    from vllm.compilation.vllm_inductor_pass import VllmInductorPass  # type: ignore
else:
    from vllm.compilation.passes.inductor_pass import get_pass_context  # type: ignore
    from vllm.compilation.passes.vllm_inductor_pass import VllmInductorPass  # type: ignore
# isort: on

Comment on lines +22 to +31
from vllm_ascend.utils import vllm_version_is

# isort: off
if vllm_version_is("v0.15.0"):
from vllm.compilation.inductor_pass import get_pass_context # type: ignore
from vllm.compilation.vllm_inductor_pass import VllmInductorPass # type: ignore
else:
from vllm.compilation.passes.inductor_pass import get_pass_context # type: ignore
from vllm.compilation.passes.vllm_inductor_pass import VllmInductorPass # type: ignore
# isort: on
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

Similar to my other comments, using vllm_version_is for an exact equality check is brittle. This will cause incorrect import paths for any vLLM version other than 'v0.15.0', leading to ImportError and making maintenance difficult. A more robust approach is to use version range comparisons based on when the upstream API change occurred.

from packaging.version import Version
import vllm

# isort: off
# The import paths for compilation passes changed in vLLM.
# Use version checking to maintain compatibility.
# Please verify the exact vLLM version where this change occurred.
if Version(vllm.__version__).base_version <= "0.15.0":
    from vllm.compilation.inductor_pass import get_pass_context  # type: ignore
    from vllm.compilation.vllm_inductor_pass import VllmInductorPass  # type: ignore
else:
    from vllm.compilation.passes.inductor_pass import get_pass_context  # type: ignore
    from vllm.compilation.passes.vllm_inductor_pass import VllmInductorPass  # type: ignore
# isort: on

Comment on lines +29 to +36
from vllm_ascend.utils import vllm_version_is

# isort: off
if vllm_version_is("v0.15.0"):
from vllm.compilation.inductor_pass import get_pass_context # type: ignore
else:
from vllm.compilation.passes.inductor_pass import get_pass_context # type: ignore
# isort: on
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

The use of vllm_version_is for an exact equality check is brittle and will likely cause this to fail on vLLM versions other than 'v0.15.0'. To ensure forward and backward compatibility, please use a version range comparison with packaging.version.Version based on when the get_pass_context path changed upstream.

Suggested change
from vllm_ascend.utils import vllm_version_is
# isort: off
if vllm_version_is("v0.15.0"):
from vllm.compilation.inductor_pass import get_pass_context # type: ignore
else:
from vllm.compilation.passes.inductor_pass import get_pass_context # type: ignore
# isort: on
from vllm_ascend.utils import vllm_version_is
from packaging.version import Version
import vllm
# isort: off
if Version(vllm.__version__).base_version <= "0.15.0":
from vllm.compilation.inductor_pass import get_pass_context # type: ignore
else:
from vllm.compilation.passes.inductor_pass import get_pass_context # type: ignore
# isort: on

Comment thread vllm_ascend/compilation/passes/allreduce_rmsnorm_fusion_pass.py
Comment thread vllm_ascend/compilation/passes/norm_quant_fusion_pass.py
Comment thread vllm_ascend/compilation/passes/qknorm_rope_fusion_pass.py
Comment thread vllm_ascend/ops/mla.py
@wxsIcey wxsIcey added ready read for review ready-for-test start test by label for PR labels Feb 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

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

@wxsIcey wxsIcey closed this Feb 11, 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: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