Skip to content

[BugFix] Fix npu-cpu offloading interface change bug.#5290

Merged
wangxiyuan merged 4 commits intovllm-project:mainfrom
whx-sjtu:fix_npu_offload
Dec 27, 2025
Merged

[BugFix] Fix npu-cpu offloading interface change bug.#5290
wangxiyuan merged 4 commits intovllm-project:mainfrom
whx-sjtu:fix_npu_offload

Conversation

@whx-sjtu
Copy link
Copy Markdown
Collaborator

@whx-sjtu whx-sjtu commented Dec 23, 2025

What this PR does / why we need it?

Last month the interface of OffloadingSpec has changed(vllm-project/vllm#27743). This PR fixes this bug and adds e2e test for cpu offloading.

Does this PR introduce any user-facing change?

None

How was this patch tested?

CI passed with new added test.

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 NPU offloading mechanism to align with a recent interface change in OffloadingSpec, specifically by passing attn_backends through the get_handlers method. The change correctly adapts the method signature and removes the now-obsolete logic for determining attention backends. However, my review identified a significant issue where the attn_backends parameter, while correctly passed to CpuNpuOffloadingHandler, is not utilized within that handler. This indicates an incomplete implementation that could lead to incorrect behavior, as backend-specific logic for KV cache handling might be missing. This should be addressed to ensure the correctness and completeness of the feature.

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

@whx-sjtu whx-sjtu added ready read for review ready-for-test start test by label for PR labels Dec 24, 2025
@whx-sjtu whx-sjtu force-pushed the fix_npu_offload branch 4 times, most recently from e70d2f6 to e765267 Compare December 25, 2025 10:04
Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: whx-sjtu <2952154980@qq.com>
@wangxiyuan wangxiyuan merged commit 3f33ad2 into vllm-project:main Dec 27, 2025
19 checks passed
ZRJ026 pushed a commit to ZRJ026/vllm-ascend that referenced this pull request Feb 28, 2026
)

### What this PR does / why we need it?
Last month the interface of `OffloadingSpec` has
changed(vllm-project/vllm#27743). This PR fixes
this bug and adds e2e test for cpu offloading.

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

### How was this patch tested?
CI passed with new added test.

- vLLM version: release/v0.13.0
- vLLM main:
vllm-project/vllm@ad32e3e

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: zrj026 <zhangrunjiang026@gmail.com>
maoxx241 pushed a commit to maoxx241/vllm-ascend that referenced this pull request Mar 2, 2026
)

### What this PR does / why we need it?
Last month the interface of `OffloadingSpec` has
changed(vllm-project/vllm#27743). This PR fixes
this bug and adds e2e test for cpu offloading.

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

### How was this patch tested?
CI passed with new added test.


- vLLM version: release/v0.13.0
- vLLM main:
vllm-project/vllm@ad32e3e

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
ZRJ026 pushed a commit to ZRJ026/vllm-ascend that referenced this pull request Mar 4, 2026
)

### What this PR does / why we need it?
Last month the interface of `OffloadingSpec` has
changed(vllm-project/vllm#27743). This PR fixes
this bug and adds e2e test for cpu offloading.

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

### How was this patch tested?
CI passed with new added test.

- vLLM version: release/v0.13.0
- vLLM main:
vllm-project/vllm@ad32e3e

---------

Signed-off-by: whx-sjtu <2952154980@qq.com>
Signed-off-by: zrj026 <zhangrunjiang026@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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