[NPU] Support DSV4 host memory cache management - #37382
Merged
Merged
Conversation
cx22757
requested review from
Ying1123,
alphabetc1,
hanming-lu,
hnyls2002,
huangtingwei9988,
hzh0425,
iforgetmyname,
ispobock,
merrymercy,
ping1jing2,
whybeyoung,
xiezhq-hermann and
yizhang2077
as code owners
September 1, 2026 08:16
Contributor
Author
|
/rerun-failed-ci |
cx22757
force-pushed
the
main-L2-refacotr
branch
8 times, most recently
from
September 4, 2026 07:39
d657efb to
9416c43
Compare
Contributor
Author
|
补充L2从L1 load back命中相比L1直接命中,性能劣化情况 |
cx22757
force-pushed
the
main-L2-refacotr
branch
from
September 8, 2026 11:27
9416c43 to
6886d17
Compare
cx22757
force-pushed
the
main-L2-refacotr
branch
from
September 8, 2026 16:52
6886d17 to
9ac9bdd
Compare
cx22757
force-pushed
the
main-L2-refacotr
branch
from
September 8, 2026 16:54
9ac9bdd to
ae0d55a
Compare
Collaborator
|
/tag-run-ci-label |
Collaborator
|
/tag-and-rerun-ci |
Contributor
Author
|
/rerun-failed-ci |
Hexq0210
approved these changes
Sep 9, 2026
cx22757
force-pushed
the
main-L2-refacotr
branch
from
September 10, 2026 08:30
7f2f372 to
d659dd1
Compare
Contributor
Author
|
/rerun-failed-ci |
1 similar comment
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
/rerun-failed-ci |
sglang-npu-bot
approved these changes
Sep 11, 2026
sglang-npu-bot
approved these changes
Sep 11, 2026
cx22757
force-pushed
the
main-L2-refacotr
branch
from
September 11, 2026 04:37
d659dd1 to
f23b8a5
Compare
Contributor
Author
|
/rerun-failed-ci |
1 similar comment
Contributor
Author
|
/rerun-failed-ci |
Contributor
Author
|
base-c-test-perf-16-npu-a3: this failure case was introduced by 32495. |
6 tasks
mqhc2020
pushed a commit
to mqhc2020/sglang
that referenced
this pull request
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
DeepSeek-V4 on NPU maintains physically independent FULL, SWA, C4, and C128 cache regions. The existing hierarchical-cache path primarily assumed GPU-style KV-derived sidecars and global page geometry, so it could not correctly manage all DSV4 NPU cache components during host backup, device eviction, and
load-back.
This PR adds DSV4 NPU host-memory cache management, including Ascend host/device transfers, independent C128 page ownership and capacity management, and correct handling of C4 indexer K/scale data.
Modifications
DSV4 NPU host pools and data transfer
C128 host-cache lifecycle
C4 indexer and cache-stack integration
Accuracy Tests
Accuracy was evaluated on the complete GPQA-Diamond dataset with hierarchical cache enabled. The validation used one Ascend node with 16 NPUs in TP16/DP16 mode. Speculative decoding and DSpark were not enabled.
Speed Tests and Profiling
Serving latency was evaluated on the same Ascend node with hierarchical cache enabled
(16 NPUs, TP16/DP16). Speculative decoding and DSpark were not enabled. Each row reports
the mean TTFT (time to first token) over 16 concurrent deterministic requests with
round-robin routing across the 16 DP ranks (output length 1).
The following non-speculative server configuration was used for DSV4 NPU L1/L2 HiCache validation. Machine-specific paths and network settings are exposed as environment variables.
Click to expand: single-node 16-NPU launch command
CI States
Latest PR Test (Base): ✅ Run #34562923858
Latest PR Test (Extra): ❌ Run #34562923714
Latest PR Test (AMD ROCm 10): ❌ Run #34562923886