Repository navigation
[BugFix][KV Offload] Sync PCP snapshots and validate shared-buffer reuse fences - #22068
Zyang123123 wants to merge 12 commits into
Conversation
Summary of ChangesHello, 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 introduces critical fixes for KV cache offload when using Mooncake Push with combined pipeline and prefill context parallelism. It addresses discrepancies in shared-cache layout access and corrects layer-range calculations that previously failed under specific rank arithmetic. These changes ensure reliable fence registration and accurate offload keys, improving stability for complex distributed configurations. Highlights
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. Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
Suggested PR Title:
[Ops][Feature] Refactor layerwise KV cache offload and buffer reuse planningSuggested PR Summary:
### What this PR does / why we need it?
This PR refactors the layerwise KV cache offloading and buffer reuse planning mechanism. It introduces a structured `LayerwiseCachePlanner` and `LayerwiseReuseLayout` to replace the old layout building logic. This enables more robust planning of layerwise cache reuse from native cache groups, supports shared-buffer offloading, tracks execution-local snapshot keys, and ensures correct handling of pipeline parallel (PP) and context parallel (PCP) rank offsets.
### Does this PR introduce _any_ user-facing change?
No, these are internal performance optimizations and architectural refactorings for KV cache transfer and offloading on Ascend platforms.
### How was this patch tested?
New unit tests have been added in `tests/ut/kv_offload/mooncake_v2/test_push_offload_layout.py` and `tests/ut/kv_transfer/test_layerwise_offload_pp_pcp.py` to verify the push offload layout and correct PP stage indexing under PCP.I have reviewed the changes and found no issues. There are no review comments to address, so I have no further feedback to provide.
|
👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:
If CI fails, you can run linting and testing checks locally according Contributing and Testing. Tip 💡 Consider Linking a Related Issue or RFCYour PR title contains the [BugFix] tag, indicating a bug fix or new feature. Linking a related issue or RFC in the PR description is strongly encouraged — it gives reviewers helpful context and speeds up the review. You can use any of these keywords:
🙏 Thanks for helping us keep the project well-organized! |
|
Last updated: 2026-11-25 15:56 UTC+8 for commit ci-gate failed. Reason:
See the workflow run for full logs. This comment is updated in place on each new failure and marked as passed once the gate passes (it is kept for history, not deleted). Missing owner approvals. Every changed file needs one approval from its CODEOWNERS owner(s):
|
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Merge PR vllm-project#22068 at 00ff032 with upstream main f603ba5 in an isolated validation branch. Preserve the upstream unified cache allocator and remove obsolete test monkeypatches while retaining the PR reuse layout and buffer alignment. Signed-off-by: Zyang123123 <jiaoziyang0123@163.com>
Signed-off-by: Zyang123123 <jiaoziyang0123@163.com>
|
/run |
…-20261124 Signed-off-by: Zyang123123 <jiaoziyang0123@163.com>
Signed-off-by: Zyang123123 <jiaoziyang0123@163.com>
|
/run |
Coverage
More info see: Summary |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Signed-off-by: Zyang123123 <jiaoziyang0123@163.com>
|
/run |
What this PR does / why we need it?
Fixes shared-buffer Prefill offload safety for GLM-5.3-Flash with PP/PCP and MultiConnector.
Uses the existing Mooncake Push buffer-reuse fencing implementation.
Does this PR introduce any user-facing change?
Yes. Prevents missing-snapshot failures with PCP layerwise offload and reports unsafe connector combinations during initialization. No new configuration options are introduced.
How was this patch tested?
An earlier revision of the patch was validated with CPU unit tests in the existing A5 container environment; NPU operations were mocked:
1929 passed, 12 skipped.
Ruff check/format, spelling, Markdown, workflow and Python custom checks passed. The logger check also passed on Linux.
Full local format validation encountered Windows-specific limitations: ShellCheck reported CRLF shell files, and the Gitleaks hook could not resolve
/bin/bash. CI validation remains required.NPU inference and performance tests have not been rerun for the rebased patch.
vLLM main: vllm-project/vllm@c410543