Repository navigation
Conversation
|
👋 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. 🤖 How to trigger CI
Note Until the CI gate has run on a commit, the required 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! |
There was a problem hiding this comment.
Code Review
This pull request introduces support for Memcache with matching PCP and DCP sizes when using layerwise transfer and a tensor parallel size of 1, utilizing separate pool objects for each DCP rank. It includes documentation updates, CPU-runnable unit tests, and key builder modifications. The review feedback correctly identifies a Python 3.9 compatibility issue where the PEP 604 union operator | is used in type annotations without from __future__ import annotations, which would cause a TypeError at import time.
|
Last updated: 2026-12-01 02:14 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):
|
|
Head branch was pushed to by a user without write access
|
/run |
Coverage
More info see: Summary |
|
/run |
|
/run |
Give token-sharded KV separate DCP objects for TP1 with matching PCP and DCP sizes. Preserve PCP head partitions for recurrent state, require every shard during lookup, and use a new namespace to exclude overwritten legacy entries. Carry shard coordinates through partial saves. Validate with CPU byte-copy regressions and legacy key checks. NPU model and performance validation remain pending. Signed-off-by: MAyang38 <mafajun0328@gmail.com>
Signed-off-by: MAyang38 <mafajun0328@gmail.com>
DCP hybrid prefix hits can restore the wrong recurrent checkpoint because the pool scales state pages as token shards. Resolve each group's span with Core's rule and invalidate objects written at the old boundaries. Version Memcache CP identities by normalized model/cache configuration and partition, and reject invalid reachability masks before transfer. Validation: 91 selected CPU tests and 30 subtests passed; the previous span rule fails the DCP2/4/8 byte regression. NPU/SDK replay remains pending. Signed-off-by: MAyang38 <mafajun0328@gmail.com>
The source-isolated CPU regression fails CI mypy on all supported target versions. Declare AST statement lists, the shared production namespace and NumPy buffers, and parse the wrapper class to support AST differences between Python 3.10, 3.11 and 3.12. Validation: targeted mypy passes for all three versions; 15 CPU tests and 20 subtests pass. Applicable lint hooks pass. Full format.sh ci was blocked while installing the local actionlint environment; CI verification remains. Signed-off-by: MAyang38 <mafajun0328@gmail.com>
The namespace tests exercise the non-HiSparse fallback with a minimal VllmConfig fake. The new group-span check reads cache_config.block_size, which the fake omitted. Supply that field to match the real config. Validation: all nine CI failures reproduce before the fixture change and pass afterward using the existing tests with source-isolated production namespace builders. Applicable lint hooks pass; full CPU UT awaits CI. Signed-off-by: MAyang38 <mafajun0328@gmail.com>
d3a1ab9 to
31f1f85
Compare
|
/run |
What this PR does / why we need it?
Fix incorrect external prefix restoration with context parallelism. In
TP1/PP4/PCP8/DCP8, different token shards can address the same Memcache
object. Hybrid pooling also treated recurrent state as token-sharded:
a 12,288-token prefix could select state-table column 0 instead of Core's
column 7 when the Mamba block size is 1,536.
partitions for recurrent state, including partial objects and all-shard
readability checks.
and worker. Mamba and other unsharded groups retain their original spans.
be transferred; do not fall back to an unrestricted mask after an invariant fails.
speculative and loader configurations, PP partitions, CP interleave,
parallel sizes and resolved spans. Worker-local layer membership does
not enter the hash. Also invalidate bulk objects affected by the old
state-span rule.
The layout/configuration hashes are computed when binding keys, outside
the per-layer transfer loop. No device kernel, sampling, environment
variable or user configuration is added.
Related fixes #16498, #23565 and #22830 do not cover the TP1 collision or
this Core/Store state-span mismatch. The independent Indexer writer change
in #23774 is not included. The observed repeated-output cases still need
post-fix model validation; this PR does not claim that every anomaly has
been attributed or eliminated.
Does this PR introduce any user-facing change?
Yes. Prevent shard overwrites and incorrectly positioned recurrent-state
restoration in affected CP layouts. Invalid reachability masks now abort
the forward step instead of allowing unchecked cache state.
Upgrade all participating readers and writers together. The new
memcache-cp-v2layout excludes the earliermemcache-pcp-dcp-v1objects. Affected bulk state objects also use a newnamespace. Existing affected prefixes become cold automatically; no
pool-wide deletion or additional setting is required. Attention-only
TP-backed DCP retains its existing key format.
Updated the AscendStore migration guide and
release_notes/fragments/23873.yaml.How was this patch tested?
Based on Ascend main
cedeae55d2d92c8ed6086da65bcc0c435354e2fb.All work for this follow-up was performed on Windows; no serving container
or running service was changed.
python -m pytest --noconftest -q -p no:cacheprovider tests/ut/distributed/ascend_store/test_memcache_pcp_dcp_cpu.py.Together with the selected metadata tests below: 91 passed, 30 subtests
passed, 1 deselected.
tests/ut/distributed/ascend_store/test_metadata.py -k "not sharded_mamba_groups_exclude_tp_replicas".The excluded existing no-vLLM mock test calls
dataclasses.replaceon a non-dataclass fake Mamba spec. The new CPU tests independently
cover Mamba state coordinates and plain/uniform spec representations.
and Core's effective-span method, substituting external types. Byte
checks use distinct CPU buffers and production transfer descriptors.
Coverage includes CP sizes 1/2/4/8, PP1/PP4, missing-shard rejection,
partial/state objects, old-object exclusion, layout changes, normalized
scheduler/worker config equivalence, bulk namespace migration and mask
failures. These are not installed-vLLM, SDK or NPU results.
the state-byte regression fails for DCP2/4/8 with columns 0 instead of
1/3/7; the DCP1 control remains correct. The previous token-shard
overwrite negative control is retained from the initial patch.
repository's CPU dependency mocks. Broader backend/worker collection
needs the installed-vLLM dependency environment.
logger, forbidden-import, boolean-context-manager, long-function,
symbolic-meta and whitespace checks passed for changed files.
Focused hooks used Windows-compatible launchers.
bash format.sh ciwas attempted but did not finish installingactionlint's Go environment and was interrupted. Gitleaks could not run
because the local binary and
wgetare unavailable. These checks remainfor CI; no workflow files or secrets are added.
Pending before merge: NPU/SDK save-and-restore with distinct shard and
checkpoint contents, forced external-cache model replay with local HBM
prefix misses, repeated-output regression cases at 30/60 concurrency, and
matched performance/storage measurements. No model accuracy or
performance improvement is claimed from CPU checks.
Checklist
Testing
Boundary / edge-case coverage
Regression test and previous-code negative control
Error / failure path coverage
CPU byte restoration and Core/Store span consistency
NPU/SDK and model inference validation
Performance impact: matched hardware validation pending
vLLM main: vllm-project/vllm@c410543