Repository navigation
[NPU] Enable native target and DSpark draft Attention graphs - #545
Merged
Merged
Conversation
Signed-off-by: jiaran-king <jiaranran2@gmail.com>
Signed-off-by: jiaran-king <jiaranran2@gmail.com>
Signed-off-by: jiaran-king <jiaranran2@gmail.com>
jiaran-king
requested review from
hsliuustc0106 and
jiangkuaixue123
as code owners
November 5, 2026 06:53
Collaborator
|
Could you clarify the support plan for combining the new target/draft Attention graphs with PD, SP/FlashComm1, and DBO? For each of these, is the current exclusion due to a known implementation limitation, or is it mainly outside this PR's validation scope? What additional work would be needed to enable support, and are there follow-up issues or PRs tracking it? |
Signed-off-by: jiaran-king <jiaranran2@gmail.com>
Collaborator
Author
Updated the PR:
|
Signed-off-by: jiaran-king <jiaranran2@gmail.com>
Signed-off-by: jiaran-king <jiaranran2@gmail.com>
Collaborator
|
LGTM |
Pingzii
added a commit
to Pingzii/afd-plugin
that referenced
this pull request
Nov 14, 2026
…llows vllm-project#545 lets Async CAM Attention run the FULL graph mode and has the native backend resolve it to FULL_DECODE_ONLY, so the case that asserted a rejection was stale in the same way as the sync-gate one. The config stays in the table as a valid input; it is the expectation that changes. Signed-off-by: 宋元盟 <songyuanmeng2@huawei.com>
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.
Purpose
Enable native decode graphs for Async CAM DeepSeek-V4 target Attention and
DSpark draft Attention. Reuse the vLLM/vLLM-Ascend graph managers and install
AFD metadata at capture/replay boundaries for remote expert calls.
Issue
Related to #499; complements the F-side FULL support merged in #532.
Scope
target/draft TP and independent F execution settings.
complete draft model and existing KV transfer; no new PD protocol is added.
FULL/FULL_DECODE_ONLYresolution. Remove graph-specificrestrictions on compilation mode and model-free speculation; existing
model-based draft/MTP checks remain. Device qualification uses mode 0.
capture owns draft capture. Unequal target/draft TP, native kernels,
quantization changes and lifecycle work remain outside this PR.
Implementation Notes
replay, preserving real and padded token counts. Send synchronous DP control
only when a connector has a control plane; Async CAM has none.
physical KV block-size adapter and restore temporary methods/context on
normal and exceptional exits.
updates, sampling and fallback. No new ModelRunner, F executor or
communication protocol is introduced. Preserve main's fix(npu): keep profile routing decisions inside an opaque op #500 routing fix.
e58fdec5876782b9c6a03683416611deea42af92, retaining itsMegaMoE path and FFN two-stream removal. No F-runner, connector or
native-operator changes are included in the PR diff.
Test Plan / Test Result
The conflict resolution at
fb4095dmerges main26d8151and preservesboth Async CAM Attention graph validation and the synchronous CAMP2p
Attention-side routing constraints from #503. Focused CPU checks passed
123 cases, with 35 dependency-gated skips. Changed-file pre-commit
hooks and
git diff --checkpassed. NPU results below are prior evidence;no new device run was performed for this merge.
After the earlier main synchronization at
7fca98e, focused Async CAM connector/sessionCPU checks pass 40 cases; 3 graph test modules are skipped because the
host lacks native dependencies. Documentation hooks, local links and diff
hygiene pass. Conflict resolutions retain the Graph capability descriptions
and main's documentation reorganization. Attention graph implementation files
are unchanged.
The earlier 112 passed, 33 dependency-gated skips and Ruff results at
822779fare reused. The merge retains the graph control-plane test fields andmain's
attention_stepconnector context.Six pinned-runtime feature-validation checks and the earlier metadata,
restoration, signature and device results below are reused pre-merge evidence.
No new NPU experiment was run for conflict resolution. Configuration tests
continue to admit PD/SP/native options and retain the model-based draft
boundary and DBO rejection.
Retained NPU comparisons used the pre-merge main-integrated execution code
(
5afe9dd89314a36850cbb19e9a4e40d9706c3b83, with the admission gates removed):Actual SP flags were checked on both target and draft. PD used
MooncakeHybridConnectorwith native full-draft P TP4. Cases cover one-token,127/128/129-token and chunked 513-token prompts, concurrency and request reuse.
PD eager/graph both recorded 405 drafted and 263 accepted tokens. In the SP
comparison, the totals were 475/347 and 465/345 respectively; outputs still
matched exactly, and concurrent scheduling was not fixed between arms.
The pinned native configuration resolver was also executed directly:
requested
FULLresolves toFULL_DECODE_ONLYfor DSV4'sUNIFORM_BATCHbackend. This was a configuration check, not another model experiment.
Compilation mode 3 and model-free speculation admission were checked at the
configuration seam only; their device execution is not qualified here.
One formal measurement per arm used W4A8, A DP1/TP4, F EP4/TP1 FULL, five
speculative tokens, 32 requests, 128 input and 128 output tokens, concurrency 4
and four client warmups. Each arm completed 32/32 requests and 4,096 output
tokens. Functional replay probes were removed before timing; their counters
remained unchanged afterward. No profiling ran during measurement.
Retained earlier non-PD, SP-off evidence: nine finite requests matched the
reference token-for-token, with 51 target and 60 draft replays per A rank.
Its single performance comparison measured TPOT 32.20 → 14.63 ms, throughput
102.62 → 226.70 token/s and TTFT 393.14 → 234.11 ms. That earlier measurement
used
140369b873c34779d0d53a8af82aced3c47484ebon an older main baseline;it was reused rather than rerun. Do not compare absolute numbers across the
separate deployment experiments or attribute the combined gain to one graph.
Pinned stack: vLLM
5df63a7203cdb9328d824a27b682e77c7b9928be, vLLM-Ascendbd42eea01d8312c4df469fabaed45f77a12df4d3, CANN 9.2 and torch-npu2.10.0.post7 on Ascend 910C/A3. Existing native binaries were reused unchanged.
MegaMoE with A graphs, W8A8 A graphs, other KV connectors/topologies, GPU
execution, DBO and task-level model accuracy are not newly qualified. Successful cleanup of owned processes
is not a new graceful-shutdown qualification.
Docs Impact
Update the existing Attention, model/platform, Async CAM/FFN and DSpark recipe
contracts. Distinguish actual implementation dependencies from device validation
coverage. Experiment scripts, probes, raw logs and private evidence stay outside
the patch.
Essential PR Checklist