Skip to content

[Misc][main2main] 0420 -> 0429#8771

Open
shen-shanshan wants to merge 16 commits intovllm-project:mainfrom
shen-shanshan:pr/8428
Open

[Misc][main2main] 0420 -> 0429#8771
shen-shanshan wants to merge 16 commits intovllm-project:mainfrom
shen-shanshan:pr/8428

Conversation

@shen-shanshan
Copy link
Copy Markdown
Collaborator

@shen-shanshan shen-shanshan commented Apr 28, 2026

What this PR does / why we need it?

Based on #8428.

Sync to 856b15c62c8a574a1a0a289444d5b9a8120433e3.

Fix:

  • TypeError: rejection_sample() got an unexpected keyword argument 'synthetic_mode' -> Add synthetic_mode and synthetic_conditional_rates param to ascend rejection_sample().

Does this PR introduce any user-facing change?

How was this patch tested?

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

@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 synchronizes the repository with the latest vLLM main branch changes. It primarily focuses on ensuring backward compatibility with vLLM 0.19.1 while adapting to structural changes in upstream model components, specifically regarding weight projections and compilation time reporting. The changes ensure that the Ascend-specific implementation remains functional across different vLLM versions.

Highlights

  • vLLM Version Synchronization: Updated the main vLLM commit hash to d622e27d2be9cd4321d75073e4b7ef522204853d and updated the catlass subproject commit.
  • Version-Aware Compatibility: Introduced conditional logic using vllm_version_is to maintain compatibility between vLLM 0.19.1 and newer versions across various modules, including attention mechanisms and worker configurations.
  • Refactored Model Initialization: Updated IndexerWrapper and related attention components to handle changes in weight projection structures (fused wk+weights_proj) introduced in upstream vLLM.

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

Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/_e2e_test.yaml
    • .github/workflows/dockerfiles/Dockerfile.lint
    • .github/workflows/pr_test_full.yaml
    • .github/workflows/pr_test_light.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.

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.

@shen-shanshan shen-shanshan changed the title [Main2Main] 0420 -> 0422 [Misc][Main2Main] 0420 -> 0422 Apr 28, 2026
@shen-shanshan shen-shanshan changed the title [Misc][Main2Main] 0420 -> 0422 [Misc][main2main] 0420 -> 0422 Apr 28, 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 synchronizes the vllm-ascend repository with vLLM version 0.19.1, updating the catlass subproject and implementing version-specific logic for MLA/SFA indexers and metadata handling. Feedback includes correcting an AttributeError typo in vllm_ascend/worker/worker.py and updating the PR title and summary to comply with the repository style guide.\n\nSuggested PR Title:\n\nmarkdown\n[Ops][Misc] Sync to vLLM v0.19.1 (commit d622e27)\n\n\nSuggested PR Summary:\n\nmarkdown\n### What this PR does / why we need it?\n\nThis PR syncs the vllm-ascend repository with vLLM version v0.19.1. Key changes include compatibility updates for fused wk and weights_proj in MLA/SFA indexers and updated dp_metadata access.\n\n### Does this PR introduce any user-facing change?\n\nNo.\n\n### How was this patch tested?\n\nUpdated unit tests in tests/ut/ops/test_mla.py.\n


return CompilationTimes(
language_model=self.vllm_config.compilation_config.compilation_time,
encoder=self.compilation_config.encoder_compilation_time,
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 attribute compilation_config is not defined on the NPUWorker instance. It should be accessed via self.vllm_config.compilation_config, which is consistent with the access pattern used on the previous line (561) and elsewhere in the class. This typo will lead to an AttributeError at runtime.

Suggested change
encoder=self.compilation_config.encoder_compilation_time,
encoder=self.vllm_config.compilation_config.encoder_compilation_time,

Comment thread docs/source/conf.py Outdated
"cann_image_tag": "8.5.1-910b-ubuntu22.04-py3.11",
# vLLM commit hash for main branch
"main_vllm_commit": "6f786f2c506cb07f4566771fdc62e640e2c4a176",
"main_vllm_commit": "d622e27d2be9cd4321d75073e4b7ef522204853d",
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 current Pull Request title and summary do not adhere to the repository's style guide. Please update them to follow the required format.

Suggested PR Title:

[Main2Main][Ops][Misc] Sync to vLLM v0.19.1 (commit d622e27)

Suggested PR Summary:

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

This PR syncs the `vllm-ascend` repository with vLLM version `v0.19.1` (commit `d622e27d2be9cd4321d75073e4b7ef522204853d`). Key changes include:
- Compatibility updates for fused `wk` and `weights_proj` in MLA/SFA indexers.
- Updated `dp_metadata` attribute access for token counts to handle tensor-based values.
- Support for the new `CompilationTimes` return type in `NPUWorker.compile_or_warm_up_model`.

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

No.

### How was this patch tested?

- Updated unit tests in `tests/ut/ops/test_mla.py` to cover version-specific logic.
References
  1. PR Title and Summary must follow the specific format defined in the repository style guide, including [Branch][Module][Action] prefixes. (link)

@shen-shanshan shen-shanshan added ready read for review ready-for-test start test by label for PR labels Apr 28, 2026
@shen-shanshan shen-shanshan changed the title [Misc][main2main] 0420 -> 0422 [Misc][main2main] 0420 -> 0429 Apr 29, 2026
Meihan-chen and others added 9 commits April 29, 2026 14:48
**Commit range:** `6f786f2`..`d886c26`

| Priority | Change | vLLM File | vllm-ascend File | Description |
|:---|:---|:---|:---|:---|
| P0 | Zero-expert logical expert boundary | `vllm/model_executor/layers/fused_moe/layer.py` | `vllm_ascend/ops/fused_moe/fused_moe.py`, `vllm_ascend/_310p/fused_moe/fused_moe.py`, `vllm_ascend/quantization/methods/w8a8_dynamic.py`, `vllm_ascend/_310p/quantization/methods/w8a8_dynamic.py` | Use `logical_num_experts` when available so Ascend zero-expert handling stays compatible with the upstream FusedMoE router changes on main. |
| P1 | Main2main commit reference bump | `docs/source/conf.py`, `.github/workflows/pr_test_full.yaml`, `.github/workflows/pr_test_light.yaml`, `.github/workflows/dockerfiles/Dockerfile.lint` | same | Update main-branch vLLM commit references from `6f786f2c506cb07f4566771fdc62e640e2c4a176` to `d886c26d4d4fef7d079696beb4ece1cfb4b008a8`. |

- `.github/workflows/dockerfiles/Dockerfile.lint`
- `.github/workflows/pr_test_full.yaml`
- `.github/workflows/pr_test_light.yaml`
- `docs/source/conf.py`
- `vllm_ascend/ops/fused_moe/fused_moe.py`
- `vllm_ascend/_310p/fused_moe/fused_moe.py`
- `vllm_ascend/quantization/methods/w8a8_dynamic.py`
- `vllm_ascend/_310p/quantization/methods/w8a8_dynamic.py`

Signed-off-by: Meihan-chen <jcccx.cmh@gmail.com>
CI Fix Summary (run ID: 24638481321)
Commit range: 6f786f2..f150107

Issues Fixed
Error	Upstream Cause Commit	Affected Files	Fix Description
AttributeError: 'float' object has no attribute 'language_model'	c08f3b2a — Measure encoder compile time seperate from llm backbone	vllm_ascend/worker/worker.py, tests/ut/worker/test_worker_v1.py	Return CompilationTimes on vLLM main, keep scalar return for v0.19.0 via vllm_version_is("0.19.0").

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 <zr010426ztt@outlook.com>
Signed-off-by: Meihan-chen <zr010426ztt@outlook.com>
Signed-off-by: shen-shanshan <467638484@qq.com>
Signed-off-by: shen-shanshan <467638484@qq.com>
Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com>
Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com>
Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com>
Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com>
Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com>
Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com>
Signed-off-by: Shanshan Shen <87969357+shen-shanshan@users.noreply.github.com>
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 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