You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AFD currently supports Ascend NPU execution through vLLM-Ascend ModelRunner V1. The synchronous NPU path also carries substantial plugin-owned uBatch/DBO logic for batch splitting, Attention metadata, forward contexts, streams, threads, ACL graph capture/replay, DP coordination, and output merging. This works, but it creates a large upgrade and maintenance surface.
The upstream direction has changed since the earlier investigation in #171:
vLLM PR #50945 proposes eager DBO support for ModelRunner V2 through a dedicated UBatchRunner, persistent per-uBatch buffers, pre-sliced InputBatch objects, per-uBatch Attention metadata builders, and num_ubatches as part of BatchExecutionDescriptor.
vLLM PR #51700 follows with FULL CUDA graph capture/replay for microbatched steps.
These changes make it possible to pursue an MRV2-native Ascend design without porting the V1 execution loop or continuing to grow AFD-owned copies of vLLM-Ascend internals.
This RFC proposes staged Ascend NPU ModelRunner V2 support. The synchronous CAMP2pAFDConnector path comes first, followed by CAMAsyncAFDConnector. Each phase must preserve native vLLM/vLLM-Ascend state ownership and pass its own architecture, correctness, E2E, and accuracy gates before the next phase starts.
Support CAMP2pAFDConnector first with DeepSeek-V2-Lite eager and FULL_DECODE_ONLY execution.
Add an Ascend-native AscendUBatchRunner following the architecture introduced by vLLM #50945 instead of copying the V1 NPU runner.
Add CAMAsyncAFDConnector support after the synchronous path is stable.
Keep native DBO and CAMAsync's plugin-managed MoE-only ubatching as separate execution policies.
Retain ModelRunner V1 until the selected MRV2 feature matrix is fully qualified.
Non-goals
This RFC does not immediately remove ModelRunner V1.
It does not claim support for every MRV2 model, graph mode, speculative method, parallelism mode, or connector.
It does not modify vLLM or vLLM-Ascend source trees from the AFD repository.
It does not accept a permanent implementation that copies MRV2 execute_model, input preparation, Attention metadata construction, sampling, or graph-manager lifecycle.
It does not treat successful import, model construction, or server startup as feature validation.
It does not merge CAMAsync MoE-only ubatching with native DBO or enable it through native DBO flags.
Proposed architecture
vLLM ModelRunner V2 uBatch contract
BatchExecutionDescriptor / InputBatch / ModelState / UBatchRunner
|
v
vLLM-Ascend AscendUBatchRunner
NPU streams/events, Ascend forward context, ACL graph, NPU resource control
|
v
AFD composition/hooks
connector lifecycle, AFD metadata, control payloads, stage identity and cleanup
The intended ownership is:
vLLM-owned
persistent request state and top-level scheduler updates;
InputBatch and model inputs;
BatchExecutionDescriptor.num_ubatches;
generic split decisions and DP agreement where the upstream contract applies;
Attention/FFN role coordination and connector transfer ordering;
connector-specific DP metadata when native DP topology does not describe the disaggregated roles;
CAMAsync's separate MoE-only asynchronous stage policy;
AFD-specific validation, profiling, failure cleanup, recipes, and E2E coverage.
A small upstream/vLLM-Ascend extension should be preferred over an AFD copy. In particular, an overridable uBatch-runner factory and hooks for stream/context/resource-control construction would keep the Ascend implementation narrow.
Staged delivery
Each phase is a separate reviewable change. A later phase must not begin until the previous phase passes its required native control and AFD validation.
Phase 0 — Freeze runtime contracts and feature matrix
Before production changes:
resolve the exact target vLLM and vLLM-Ascend refs to immutable SHAs;
verify that they are a supported runtime pair;
record Python, PyTorch, torch_npu, CANN, Triton Ascend, and operator-package requirements;
validate native vLLM-Ascend MRV2 with the selected DeepSeek-V2-Lite checkpoint;
map current NPU V1 overrides to MRV2 owners or missing hooks;
define the initial topology, quantization, eager/graph modes, and unsupported combinations;
keep V1 and V2 selection explicit and fail closed.
Phase 1 — CAMP2P + DeepSeek-V2-Lite eager
Add the first no-DBO MRV2 path:
DeepSeek-V2-Lite;
CAMP2pAFDConnector;
eager execution;
Attention and FFN role construction through the native Ascend MRV2 model lifecycle;
prefill and decode round trips;
AFD control metadata derived from MRV2's actual and padded execution shapes;
repeated requests, profiling/dummy execution, failure cleanup, and shutdown;
no DBO and no CAMAsync in this phase.
Acceptance criteria:
native non-AFD MRV2 control passes on the same runtime/model/topology;
AFD performs a real Attention-to-FFN-to-Attention round trip;
output and accuracy match the approved native/V1 reference;
no full copy of MRV2 execution or Attention preparation is introduced;
control-plane communication outside graph capture and replay bodies;
Attention and FFN graph-key compatibility;
warmup, capture, replay, repeated requests, and cleanup after failure.
Acceptance criteria:
eager/graph output and accuracy parity;
graph capture and replay are observed on both required roles;
no stale graph, forward-context, transaction, or connector state;
unsupported graph combinations fail before communication resources are created.
Phase 3 — AscendUBatchRunner and native DBO
Implement native MRV2 DBO for the synchronous CAMP2P path, following the design direction of vLLM #50945:
make num_ubatches part of the execution descriptor/graph key;
split the MRV2 InputBatch before building Attention metadata;
use persistent per-uBatch buffers;
allocate/select one Attention metadata builder per live uBatch;
build one Ascend/AFD forward context per uBatch;
keep DP split decisions rank-consistent;
run and merge uBatch outputs through AscendUBatchRunner;
use NPU streams/events and ACL graph ownership rather than CUDA-specific helpers;
initially support exactly two uBatches;
start with eager DBO, then qualify FULL_DECODE_ONLY DBO after eager correctness is stable.
The preferred home for AscendUBatchRunner is vLLM-Ascend. AFD should extend it through composition or narrow hooks rather than carrying a fork of the GPU UBatchRunner.
Acceptance criteria:
eager two-uBatch execution is correct for decode, prefill, and mixed batches where supported;
uneven DP token counts, padding-only tails, and collective ordering are validated;
connector groups and payloads use the correct uBatch/stage identity;
graph DBO passes capture/replay and shape-change coverage before being claimed;
exceptions do not leave sibling threads, streams, forward contexts, or connector transactions alive;
the complete non-accuracy NPU E2E gate passes before full accuracy.
Phase 4 — CAMAsync + DeepSeek-V2-Lite
Add MRV2 support for CAMAsyncAFDConnector with DeepSeek-V2-Lite:
eager execution first;
preserve the existing asynchronous Attention/MoE/FFN work-item lifecycle;
keep CAMAsync MoE-only ubatching separate from native DBO;
do not use --enable-dbo or native DBO thresholds for this path;
validate stage-local Attention metadata, routing/gate inputs, PCP/SP state when required, stream/context isolation, uneven token counts, and cleanup.
Acceptance criteria:
native DBO and CAMAsync capability flags remain mutually clear and independently validated;
real multi-stage asynchronous execution is observed;
correctness and full accuracy pass on the approved topology;
existing synchronous CAMP2P MRV2 and V1 coverage remain green.
Phase 5 — CAMAsync + DeepSeek-V4-Flash
Extend the Phase 4 architecture to DeepSeek-V4-Flash:
reuse the native vLLM/vLLM-Ascend DeepSeek-V4-Flash model, MoE, Attention, cache, routing, and quantization lifecycle;
add only model-specific AFD boundary logic that cannot be expressed through the DeepSeek-V2-Lite path;
Motivation
AFD currently supports Ascend NPU execution through vLLM-Ascend ModelRunner V1. The synchronous NPU path also carries substantial plugin-owned uBatch/DBO logic for batch splitting, Attention metadata, forward contexts, streams, threads, ACL graph capture/replay, DP coordination, and output merging. This works, but it creates a large upgrade and maintenance surface.
The upstream direction has changed since the earlier investigation in #171:
UBatchRunner, persistent per-uBatch buffers, pre-slicedInputBatchobjects, per-uBatch Attention metadata builders, andnum_ubatchesas part ofBatchExecutionDescriptor.These changes make it possible to pursue an MRV2-native Ascend design without porting the V1 execution loop or continuing to grow AFD-owned copies of vLLM-Ascend internals.
This RFC proposes staged Ascend NPU ModelRunner V2 support. The synchronous
CAMP2pAFDConnectorpath comes first, followed byCAMAsyncAFDConnector. Each phase must preserve native vLLM/vLLM-Ascend state ownership and pass its own architecture, correctness, E2E, and accuracy gates before the next phase starts.Related work:
CAMAsyncAFDConnectorCAMP2pAFDConnectorGoals
InputBatch, Attention preparation, sampling, and graph ownership.CAMP2pAFDConnectorfirst with DeepSeek-V2-Lite eager andFULL_DECODE_ONLYexecution.AscendUBatchRunnerfollowing the architecture introduced by vLLM #50945 instead of copying the V1 NPU runner.CAMAsyncAFDConnectorsupport after the synchronous path is stable.Non-goals
execute_model, input preparation, Attention metadata construction, sampling, or graph-manager lifecycle.Proposed architecture
The intended ownership is:
vLLM-owned
InputBatchand model inputs;BatchExecutionDescriptor.num_ubatches;ModelState.prepare_attn(..., ubatch_idx=...);vLLM-Ascend-owned
AscendUBatchRunner;AFD-owned
CAMP2pAFDConnectorandCAMAsyncAFDConnectorlifecycle;A small upstream/vLLM-Ascend extension should be preferred over an AFD copy. In particular, an overridable uBatch-runner factory and hooks for stream/context/resource-control construction would keep the Ascend implementation narrow.
Staged delivery
Each phase is a separate reviewable change. A later phase must not begin until the previous phase passes its required native control and AFD validation.
Phase 0 — Freeze runtime contracts and feature matrix
Before production changes:
Phase 1 — CAMP2P + DeepSeek-V2-Lite eager
Add the first no-DBO MRV2 path:
CAMP2pAFDConnector;Acceptance criteria:
Phase 2 — CAMP2P + DeepSeek-V2-Lite FULL_DECODE_ONLY
Extend the Phase 1 path with ACL graph execution:
FULL_DECODE_ONLYcapture and replay;Acceptance criteria:
Phase 3 — AscendUBatchRunner and native DBO
Implement native MRV2 DBO for the synchronous CAMP2P path, following the design direction of vLLM #50945:
num_ubatchespart of the execution descriptor/graph key;InputBatchbefore building Attention metadata;AscendUBatchRunner;FULL_DECODE_ONLYDBO after eager correctness is stable.The preferred home for
AscendUBatchRunneris vLLM-Ascend. AFD should extend it through composition or narrow hooks rather than carrying a fork of the GPUUBatchRunner.Acceptance criteria:
Phase 4 — CAMAsync + DeepSeek-V2-Lite
Add MRV2 support for
CAMAsyncAFDConnectorwith DeepSeek-V2-Lite:--enable-dboor native DBO thresholds for this path;Acceptance criteria:
Phase 5 — CAMAsync + DeepSeek-V4-Flash
Extend the Phase 4 architecture to DeepSeek-V4-Flash:
Acceptance criteria:
Validation gates
For every phase, record:
A phase is not complete if it depends on bypassing an upstream validator without an approved upstream/removal plan.
Risks and alternatives
Risks
UBatchRunnercannot be copied directly to NPU.Alternatives considered
UBatchRunnerinto AFD: faster initially but creates another backend fork and is not acceptable as the long-term design.Decisions requested
AscendUBatchRunnerbe implemented in vLLM-Ascend, with only AFD hooks kept in this repository?FULL_DECODE_ONLYDBO parity before CAMAsync work begins, or may graph DBO follow as a separately gated sub-phase?Feedback period
Proposed feedback period: one week, through 2026-08-20.
CC
@specture724 @jiaran-king