Skip to content

[Misc][Main2Main] Upgrade release to v0.31.0 with verified main compatibility - #18229

Merged
ningjingbengxiaohai merged 8 commits into
vllm-project:mainfrom
zhao-stack:codex/main2main-v0.31.0
Oct 15, 2026
Merged

ningjingbengxiaohai merged 8 commits into
vllm-project:mainfrom
zhao-stack:codex/main2main-v0.31.0

Conversation

@zhao-stack

@zhao-stack zhao-stack commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it?

Upgrade the release dependency from vLLM v0.30.0 to v0.31.0 while keeping the independently supported verified-main target at c4df37d. Rebase on latest Ascend main c2382c6, preserving the CPP profiling changes from #18622. The file mapping below describes the diff for 23c8b15 against c2382c6.

The two targets have different APIs despite both being supported: retain version-dependent forwarding for profiling randomization, PP batch lengths, Mamba allocation, EPLB setup and encoder-only prefill admission. Remove obsolete 0.30 branches only where both targets now share the contract.

Contract Verified main c4df37d Release v0.31.0 db9527a
Profiling Parent calls omit randomize_inputs Forward the flag through V1/V2/310P and MC2
PP batch state No max_seq_len_np Preserve the field in AscendInputBatch
Mamba allocation Parent has no prefill_end Forward checkpoint boundary
EPLB setup Update existing state/communicator Construct state from model and mapping
Non-chunked prefill Keep encoder-only budget exception Keep release budget rejection

Changes organized by downstream file

Upstream links identify the reason or contract being adapted. For existing main behavior that becomes common to both targets, the change is removal of the old release branch, not a new port of the complete upstream implementation. File links are pinned to this PR head; the complete fixed diff shows the exact edits.

Dependency markers, images and documentation (13 files)
Downstream file Upstream change / contract Ascend adaptation
.github/vllm-release-tag.commit Release target advances to v0.31.0; verified main remains pinned independently. Advance the release marker to v0.31.0; leave the verified-main marker at c4df37d.
Dockerfile Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
Dockerfile.310p Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
Dockerfile.310p.openEuler Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
Dockerfile.a3 Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
Dockerfile.a3.openEuler Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
Dockerfile.a5 Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
Dockerfile.a5.openEuler Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
Dockerfile.openEuler Release target advances to v0.31.0; verified main remains pinned independently. Set the release VLLM_TAG default to v0.31.0; existing built images are not changed by this default.
README.md Release target advances to v0.31.0; verified main remains pinned independently. Update the release CI support version to 0.31.0.
README.zh.md Release target advances to v0.31.0; verified main remains pinned independently. Update the Chinese release CI support version to 0.31.0.
docs/source/tutorials/models/DeepSeek-V4.1-Flash.md Release target advances to v0.31.0; verified main remains pinned independently. Use separate release and verified-main marker commands for the two build targets.
vllm_ascend/ops/triton/docs/v2/spec_decode/prepare_dflash_inputs.md vLLM #57632 passes precompute_context_kv into DFlash FULL-graph capture; wrapped draft models must expose the underlying callback. Update the documented DFlash ABI version to 0.31.0; no new kernel behavior is introduced by this document change.
Model runners, graphs and platform integration (14 files)
Downstream file Upstream change / contract Ascend adaptation
vllm_ascend/_310p/model_runner_310p.py vLLM #58411 adds randomize_inputs for memory profiling to avoid all-zero MoE input concentration. Present in release; absent from the pinned-main parent calls. Forward the profiling randomization flag through the 310P V1 override to the NPU V1 runner.
vllm_ascend/_310p/worker/v2/model_runner.py vLLM #58411 adds randomize_inputs for memory profiling to avoid all-zero MoE input concentration. Present in release; absent from the pinned-main parent calls.

vLLM #58400 adds prefill_runs_as_decode_np and decode_graph_eligible for single-token prompt tails with existing context; has_prefill alone no longer determines FULL-decode eligibility.

vLLM #56456 adds trailing num_active_loras to prepare_inputs, keeping dispatch and fast-prefill graph/padding selection consistent.
Forward release-only randomization; accept num_active_loras in the common prepare signature, use the shared PCP/input-batch contract and compute complete prompt-tail/decode-graph metadata in CPU input preparation.
vllm_ascend/_310p/worker/v2/sampler.py vLLM #56497 introduces V2 LogitsContext and custom logits-processor lifecycle; Sampler.add_request no longer takes prompt_len. Adopt add_request(req_idx, sampling_params) and remove the legacy prompt-length argument; retain the 310P CPU generator/sampling implementation.
vllm_ascend/attention/attention_v1.py vLLM #58400 adds prefill_runs_as_decode_np and decode_graph_eligible for single-token prompt tails with existing context; has_prefill alone no longer determines FULL-decode eligibility. Remove the 0.30 condition around V2 speculative-padding handling while retaining actual prefill/decode metadata semantics.
vllm_ascend/patch/worker/patch_v2/patch_model_runner.py vLLM #56723 adds dcp_sharded to distinguish sharded attention KV from replicated Mamba/GDN state when target DCP and DCP=1 draft coexist.

vLLM #45635 moves routed-expert output to AuxOutputConfig/the AuxOutput connector; vLLM #57980 removes the legacy runner initialization keyword.
Read dcp_sharded from cache specs and forward it to block tables; initialize the AuxOutput connector from aux_output_config.enabled; drop the legacy attn_cg_support keyword.
vllm_ascend/platform.py vLLM #45635 moves routed-expert output to AuxOutputConfig/the AuxOutput connector; vLLM #57980 removes the legacy runner initialization keyword. Apply the existing V1 AuxOutput configuration guard to both targets, removing the old 0.30 early return.
vllm_ascend/worker/model_runner_v1.py vLLM #58411 adds randomize_inputs for memory profiling to avoid all-zero MoE input concentration. Present in release; absent from the pinned-main parent calls. Accept randomize_inputs in profiling/dummy execution and enter maybe_randomize_inputs inside forward context when requested; preserve the Ascend execution path.
vllm_ascend/worker/v2/aclgraph_utils.py vLLM #57980 replaces the legacy PCP helper with descriptor-based partition_batch, restores auxiliary hidden states with sampling outputs, and renames the DCP preparation helper.

vLLM #57632 passes precompute_context_kv into DFlash FULL-graph capture; wrapped draft models must expose the underlying callback.
Use prepare_dcp_local_seq_lens; delegate model-wrapper attribute lookup to the original model so DFlash context-KV callbacks remain accessible.
vllm_ascend/worker/v2/input_batch.py vLLM #58275/vLLM #57980 expose max_query_len/is_padding on dummy batches and an explicit query-length bound for autoregressive graph capture. Always retain prompt-tail and graph-eligibility fields and forward dummy-batch max_query_len/is_padding; remove obsolete 0.30 branches.
vllm_ascend/worker/v2/model_runner.py vLLM #58411 adds randomize_inputs for memory profiling to avoid all-zero MoE input concentration. Present in release; absent from the pinned-main parent calls.

vLLM #58542 adds max_seq_len_np for PP sampled-token broadcast handling. Present in release batch state; absent from pinned main.

vLLM #58400 adds prefill_runs_as_decode_np and decode_graph_eligible for single-token prompt tails with existing context; has_prefill alone no longer determines FULL-decode eligibility.

vLLM #57980 replaces the legacy PCP helper with descriptor-based partition_batch, restores auxiliary hidden states with sampling outputs, and renames the DCP preparation helper.

vLLM #56456 adds trailing num_active_loras to prepare_inputs, keeping dispatch and fast-prefill graph/padding selection consistent.

vLLM #54335 routes fixed-token scoring through the same unpadded logits path as prompt logprobs, which is incompatible with Ascend lmhead-TP collective row layouts.
Use release-only kwargs for profiling/execute and MC2 dummy execution; forward release-only max_seq_len_np. After PD request reclassification, recompute has_prefill, decode-graph eligibility and uniform token count. Accept num_active_loras in the common prepare signature without adding FastPrefillHelper behavior. Use descriptor-based PCP partitioning and restore auxiliary states before replicated drafting. Extend the lmhead-TP guard to fixed-token scoring, tolerating workers without token_id_scores.
vllm_ascend/worker/v2/model_states/mamba_hybrid.py vLLM #58400 requires decode-like prompt tails to use decode-row Mamba metadata for speculative rollback. Build a local mask is_prefilling_np & ~prefill_runs_as_decode_np so prompt tails are decode rows; do not mutate the batch's original prefill mask.
vllm_ascend/worker/v2/pcp_manager.py vLLM #57980 replaces the legacy PCP helper with descriptor-based partition_batch, restores auxiliary hidden states with sampling outputs, and renames the DCP preparation helper. Unify descriptor-based partitioning, including CPP profile capture after #18622, and the (batch, hidden, aux) sampling restore contract; restore and trim auxiliary states together with hidden states to the unpadded global token extent.
vllm_ascend/worker/v2/spec_decode/autoregressive/aclgraph.py vLLM #58275/vLLM #57980 expose max_query_len/is_padding on dummy batches and an explicit query-length bound for autoregressive graph capture. Always pass desc.max_query_len or desc.uniform_token_count to autoregressive capture.
vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py vLLM #57632 passes precompute_context_kv into DFlash FULL-graph capture; wrapped draft models must expose the underlying callback. Always receive and forward precompute_context_kv under the Ascend communicator/model-capture wrappers.
KV allocation and block tables (6 files)
Downstream file Upstream change / contract Ascend adaptation
vllm_ascend/_310p/worker/v2/block_table.py vLLM #56723 adds dcp_sharded to distinguish sharded attention KV from replicated Mamba/GDN state when target DCP and DCP=1 draft coexist.

vLLM #56734 uses idx_mapping=-1 for dummy draft/padding requests and masks their persistent block-table reads to avoid stale-row KV writes.
Unify the constructor with dcp_sharded; skip negative request indices and retain PAD slots in the CPU mapping path. Keep the existing CP=1 restriction and persistent CPU/device buffers.
vllm_ascend/models/glm5next/kv_cache.py vLLM #59175 adds prefill_end to Mamba checkpoint allocation, including prompt-end retention. Release has the new signature; pinned main has the old one. Accept prefill_end for call compatibility; keep one private Kpool tail block per request.
vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py vLLM #56734 uses idx_mapping=-1 for dummy draft/padding requests and masks their persistent block-table reads to avoid stale-row KV writes. Unify the slot-mapping kernel, mask block-table loads with is_real_req, and emit PAD for dummy rows; retain Ascend block/window and address-calculation behavior.
vllm_ascend/patch/platform/patch_kv_cache_utils.py The pinned _annotate_eagle_groups contract uses use_trailing_layer_fallback, replacing the DeepSeek-V4-specific fallback keyword; the introducing PR was not independently identified. Fixed contracts: release: kv_cache_utils.py. Always pass use_trailing_layer_fallback=True; retain existing Ascend cache grouping/annotation behavior.
vllm_ascend/patch/platform/patch_mamba_manager.py vLLM #59175 adds prefill_end to Mamba checkpoint allocation, including prompt-end retention. Release has the new signature; pinned main has the old one. Accept prefill_end, forwarding it only to the release parent while retaining the existing Ascend allocation logic.
vllm_ascend/worker/v2/block_table.py vLLM #56723 adds dcp_sharded to distinguish sharded attention KV from replicated Mamba/GDN state when target DCP and DCP=1 draft coexist. Use one constructor with optional per-group dcp_sharded validation/forwarding; retain Ascend int32 slot mappings.
Schedulers and profiling (5 files)
Downstream file Upstream change / contract Ascend adaptation
vllm_ascend/core/dyntra_lb_scheduler.py vLLM #59029 gives main an encoder-only exception to the non-chunked prefill budget check; release keeps the budget rejection condition.

vLLM #58947 replaces skipped_waiting with kv_holding_waiting and deferred_waiting, prioritizes KV holders, and uses _handle_blocked_waiting_request.

vLLM #58947 and vLLM #58259 define the upstream resumable-session queue/handoff lifecycle: stopping a turn can re-enqueue buffered continuation input.

Both targets admit against max_num_active_reqs and include parked streaming sessions in occupied slots; related queue/Elastic-EP changes are vLLM #58947 and vLLM #53934. Fixed contracts: release: scheduler.py, release: scheduler.py.
Use KV-holder-first queue selection/re-enqueueing, the common blocked-request helper, deferred bookkeeping and active-slot admission including parked streams. Preserve the main-only encoder exception. Remove secondary stop cleanup so upstream can retain/re-enqueue resumable continuations.
vllm_ascend/core/recompute_scheduler.py vLLM #59029 gives main an encoder-only exception to the non-chunked prefill budget check; release keeps the budget rejection condition.

vLLM #58947 replaces skipped_waiting with kv_holding_waiting and deferred_waiting, prioritizes KV holders, and uses _handle_blocked_waiting_request.

Both targets admit against max_num_active_reqs and include parked streaming sessions in occupied slots; related queue/Elastic-EP changes are vLLM #58947 and vLLM #53934. Fixed contracts: release: scheduler.py, release: scheduler.py.
Fold the legacy queues into the common KV-holder/deferred path, count parked streams for active admission, and preserve the version-dependent encoder condition. Remove the redundant remote-KV waiting debug log as a local cleanup.
vllm_ascend/core/scheduler_profiling_chunk.py vLLM #59029 gives main an encoder-only exception to the non-chunked prefill budget check; release keeps the budget rejection condition.

vLLM #58947 replaces skipped_waiting with kv_holding_waiting and deferred_waiting, prioritizes KV holders, and uses _handle_blocked_waiting_request.

Both targets admit against max_num_active_reqs and include parked streaming sessions in occupied slots; related queue/Elastic-EP changes are vLLM #58947 and vLLM #53934. Fixed contracts: release: scheduler.py, release: scheduler.py.
Use the common blocked-request/queue lifecycle, active admission including parked streams, and the version-dependent encoder budget condition.
vllm_ascend/patch/platform/patch_balance_schedule.py vLLM #59029 gives main an encoder-only exception to the non-chunked prefill budget check; release keeps the budget rejection condition.

vLLM #58947 replaces skipped_waiting with kv_holding_waiting and deferred_waiting, prioritizes KV holders, and uses _handle_blocked_waiting_request.
Fold six obsolete 0.30 queue branches and add the release/main encoder budget condition. Document the shared if not request_queue drained-queue guard. Retain baseline balancing, running-only DP snapshots/admission accounting and connector-snapshot cleanup; complete upstream schedule synchronization is outside this patch.
vllm_ascend/profiling_config.py vLLM #58947 replaces skipped_waiting with kv_holding_waiting and deferred_waiting, prioritizes KV holders, and uses _handle_blocked_waiting_request. Retarget the profiling wrapper from the old blocked-status promotion helper to _handle_blocked_waiting_request.
EPLB state and routing (2 files)
Downstream file Upstream change / contract Ascend adaptation
vllm_ascend/distributed/eplb/eplb_state.py vLLM #53934 changes main's EPLB setup to update existing state and reuse its communicator. Release still creates state from (model, model_config, mapping). After the parent's update_mapping, refresh Ascend replica routing tables; consistently resolve an unspecified NPU device index to the current device.
vllm_ascend/worker/v2/eplb.py vLLM #53934 changes main's EPLB setup to update existing state and reuse its communicator. Release still creates state from (model, model_config, mapping). Create AscendEplbState on release with the current policy/optional expert arguments; call the main parent to update the existing state and communicator.
Models and MoE operators (6 files)
Downstream file Upstream change / contract Ascend adaptation
vllm_ascend/models/kimi_k3.py vLLM #50592/vLLM #50593 use prefix_delta and the three-value AttnRes layer contract instead of the old prepared-input/deferred-MLP contract. Remove old layer/model contracts, propagate prefix_delta and return the three-value AttnRes state; preserve Ascend fused operations, DSpark aux selection and SP/PP transport/output boundaries.
vllm_ascend/ops/fused_moe/gate_linear.py vLLM #58234 unifies MoE gate layers under GateLinear with the current linear constructor and replaces Step3.5's dedicated FP32 gate class. Use the current constructor parameters (skip_bias_add, quant_config, return_bias) and retain BF16-to-FP32 gate/fallback semantics. CRLF-to-LF normalization contributes to the large line diff.
vllm_ascend/ops/fused_moe/router/grouped_topk_router.py vLLM #58880 removes routed_scaling_factor from routing-method classification, allowing MiniMax classification with non-unit scaling. Stop passing routed_scaling_factor to classification; downstream routing-weight scaling is retained.
vllm_ascend/patch/__init__.py The release target is 0.31.0; vLLM #56994 is context for the retained GLM reasoning patch comment, not a new model capability in this PR. Update only the supported-version comment for the retained GLM reasoning patch.
vllm_ascend/patch/worker/patch_step3p5.py vLLM #58234 unifies MoE gate layers under GateLinear with the current linear constructor and replaces Step3.5's dedicated FP32 gate class. Always use GateLinear with FP32 parameter/output types instead of the legacy FP32ReplicatedLinear branch.
Token scoring and Triton helpers (2 files)
Downstream file Upstream change / contract Ascend adaptation
vllm_ascend/patch/worker/patch_triton.py vLLM #58651 uses triton.next_power_of_2 in packed-QK RoPE constexpr evaluation; the Ascend replacement must also satisfy the installed Triton JIT/constexpr-function contract. Use a constexpr-aware next_power_of_2 replacement; register with triton.constexpr_function when available, otherwise unwrap tl.constexpr.value in the fallback.
vllm_ascend/worker/v2/sample/logprob.py vLLM #54335 adds fixed-token prompt scoring and broadcasts candidate IDs with expand; the token-ID row stride can be zero or non-contiguous. Pass token_ids.stride(0) into the Triton kernel and use it for row addressing; support broadcast stride zero and strided candidate IDs.

BalanceScheduler scope: this PR folds the old queue branches and adapts encoder-only admission. Its baseline DP balancing, running-only snapshot/accounting and connector-snapshot cleanup remain; complete scheduler-body synchronization and a strict AST equivalence requirement are deferred. The baseline drift guard may skip and does not prove complete upstream equivalence.

Does this PR introduce any user-facing change?

The default release dependency becomes vLLM v0.31.0; the verified-main pin remains unchanged. Fixed-token prompt scoring handles broadcast/strided IDs correctly and reports an explicit error when used with unsupported lmhead TP. Resumable Dyntra continuations retain upstream stop/queue behavior, and PD prompt-tail graph/Mamba metadata follow the supported upstream contracts.

How was this patch tested?

Test changes organized by file

The table describes test intent and fixture changes; it does not claim that every changed test was selected or executed on NPU hardware.

Unit, PR E2E and nightly test mapping (37 files)
Downstream file Upstream change / contract Ascend adaptation
tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_compute_token_logprobs.py vLLM #54335 Add NPU numerical comparisons for broadcast stride=0 and sliced stride=8 token IDs; outside the PR CI selector.
tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_num_nans.py Release-version cleanup; no new upstream behavior. Update the default version label to 0.31.0; no algorithm change.
tests/e2e/pull_request/four_card/test_kimi_k3.py vLLM #54222 Check equality between P-worker remote_prefill_cached_tokens and the response cache count; zero hits are valid for a new prompt.
tests/e2e/pull_request/one_card/test_model_runner_v1_with_device.py vLLM #45635, vLLM #57980 Use the common AuxOutput configuration object in V1 guard fixtures.
tests/e2e/pull_request/one_card/test_thinking_budget.py vLLM #56497 Construct LogitsContext with expanded mapping, input IDs, positions and sequence bounds; call apply(logits, ctx).
tests/ut/_310p/test_model_runner_v2_310p.py vLLM #56456, vLLM #56497 Use the current sampler request signature and pass the added prepare-input LoRA argument in 310P fixtures.
tests/ut/attention/test_mla_cp.py vLLM #58149 makes ModelState.max_model_len a model-config-backed property; vLLM #57913 moves multimodal capability to ModelConfig; vLLM #56723 updates DCP state/metadata contracts. Mock get_dcp_world_size_and_rank and remove legacy DCP group fixture branching.
tests/ut/core/test_circular_buffer.py Pinned cache allocation requires replay boundaries (vLLM #58368); DeepSeek-V4.1 architecture metadata and Engram configuration (vLLM #56214) use their current configuration contracts. Individual configuration migrations are linked to fixed source where not precisely attributed. Fixed contracts: release: single_type_kv_cache_manager.py, release: model_arch.py, release: engram.py. Pass replay_boundaries=[tokens-1] to the current cache-block API.
tests/ut/core/test_dyntra_lb_recompute_scheduler.py vLLM #58947 Use the shared KV-holder/deferred queue interfaces in Dyntra/recompute fixtures.
tests/ut/core/test_dyntra_lb_scheduler.py vLLM #58259, vLLM #58947 Regress synchronous/asynchronous resumable continuation handling for running, paused and preempted requests, buffered/unbuffered input, and final cleanup; update queue seams.
tests/ut/core/test_profiling_chunk.py vLLM #53934, vLLM #58947 Update queue fixtures/blocked-request helper and active-request capacity field.
tests/ut/core/test_recompute_scheduler.py vLLM #58947 Remove legacy queue branching and use the shared blocked-request seam.
tests/ut/core/test_scheduler_connector_block_state.py vLLM #58947, vLLM #59029 Supply the baseline balance_queue fixture; connector-snapshot cleanup itself predates this change.
tests/ut/distributed/eplb/test_state.py vLLM #53934 Verify mapping updates refresh Ascend routing tables.
tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py vLLM #58947 Use the shared queue lifecycle rather than version-specific skipped-waiting fixtures.
tests/ut/kv_offload/test_preempt_offload_connector.py Pinned cache allocation requires replay boundaries (vLLM #58368); DeepSeek-V4.1 architecture metadata and Engram configuration (vLLM #56214) use their current configuration contracts. Individual configuration migrations are linked to fixed source where not precisely attributed. Fixed contracts: release: single_type_kv_cache_manager.py, release: model_arch.py, release: engram.py. Always provide prefix replay and request token-count fields in the offload fixture.
tests/ut/models/test_deepseek_v41_release_config.py Pinned cache allocation requires replay boundaries (vLLM #58368); DeepSeek-V4.1 architecture metadata and Engram configuration (vLLM #56214) use their current configuration contracts. Individual configuration migrations are linked to fixed source where not precisely attributed. Fixed contracts: release: single_type_kv_cache_manager.py, release: model_arch.py, release: engram.py. Assert obsolete flattened multimodal-prefix flags are absent after architecture conversion.
tests/ut/models/test_glm5next_kv_cache.py vLLM #59175 Pass the new allocation argument while checking the private-tail block policy.
tests/ut/models/test_kimi_k3_adapter.py vLLM #50592, vLLM #50593 Update layer signatures/three-value returns, auxiliary output expectations and AST-extracted fixtures.
tests/ut/models/test_kimi_k3_pp_sp.py vLLM #50592, vLLM #50593 Use the common Kimi AttnRes contract in PP/SP checks.
tests/ut/patch/platform/test_patch_balance_schedule.py vLLM #58947, vLLM #59029 Use common queue fixtures; add eight encoder/chunked/prompt-budget cases and empty/fully deferred queue regressions with/without KV blocks. Correct the structural guard assertion to if not request_queue. Keep the baseline AST drift check, which can skip.
tests/ut/patch/platform/test_patch_engram_config.py Pinned cache allocation requires replay boundaries (vLLM #58368); DeepSeek-V4.1 architecture metadata and Engram configuration (vLLM #56214) use their current configuration contracts. Individual configuration migrations are linked to fixed source where not precisely attributed. Fixed contracts: release: single_type_kv_cache_manager.py, release: model_arch.py, release: engram.py. Expect shared-memory default resolution for this supported fixture configuration; no universal shared-memory default is claimed.
tests/ut/patch/platform/test_prefix_cache_cp_patches.py vLLM #59175 Supply an explicit prefill_end allocation boundary.
tests/ut/spec_decode/test_eagle_proposer.py vLLM #58149 makes ModelState.max_model_len a model-config-backed property; vLLM #57913 moves multimodal capability to ModelConfig; vLLM #56723 updates DCP state/metadata contracts. Use the current model-config multimodal capability interface and remove obsolete skips/branches.
tests/ut/spec_decode/test_mla_dspark.py vLLM #57632 Assert DFlash context-KV callback forwarding and the shared capture signature.
tests/ut/test_minimax_m3_kv_block_size.py Release-version cleanup; no new upstream behavior. Remove only an unused version-helper import.
tests/ut/test_platform.py vLLM #45635, vLLM #57980 Use the current AuxOutput configuration guard for both target versions.
tests/ut/worker/test_attn_utils_v2.py vLLM #58149 makes ModelState.max_model_len a model-config-backed property; vLLM #57913 moves multimodal capability to ModelConfig; vLLM #56723 updates DCP state/metadata contracts. Initialize model_state.model_config instead of assigning the read-only length property.
tests/ut/worker/test_dcp_speculator_metadata_v2.py vLLM #58149 makes ModelState.max_model_len a model-config-backed property; vLLM #57913 moves multimodal capability to ModelConfig; vLLM #56723 updates DCP state/metadata contracts. Assert prefill metadata over the padded request extent.
tests/ut/worker/test_model_runner_v2.py vLLM #58411 adds randomize_inputs for memory profiling to avoid all-zero MoE input concentration. Present in release; absent from the pinned-main parent calls.

vLLM #58542 adds max_seq_len_np for PP sampled-token broadcast handling. Present in release batch state; absent from pinned main.

vLLM #58400 adds prefill_runs_as_decode_np and decode_graph_eligible for single-token prompt tails with existing context; has_prefill alone no longer determines FULL-decode eligibility.

vLLM #57980 replaces the legacy PCP helper with descriptor-based partition_batch, restores auxiliary hidden states with sampling outputs, and renames the DCP preparation helper.

vLLM #56456 adds trailing num_active_loras to prepare_inputs, keeping dispatch and fast-prefill graph/padding selection consistent.

vLLM #54335 routes fixed-token scoring through the same unpadded logits path as prompt logprobs, which is incompatible with Ascend lmhead-TP collective row layouts.

vLLM #58149 makes ModelState.max_model_len a model-config-backed property; vLLM #57913 moves multimodal capability to ModelConfig; vLLM #56723 updates DCP state/metadata contracts.
Cover release/main kwargs and PP fields, PD graph reclassification, PCP auxiliary restoration and lmhead scoring guards; update model-state fixtures.
tests/ut/worker/test_model_runner_v2_encoder_decoder.py vLLM #58149 makes ModelState.max_model_len a model-config-backed property; vLLM #57913 moves multimodal capability to ModelConfig; vLLM #56723 updates DCP state/metadata contracts. Update model-state length fixtures through model configuration.
tests/ut/worker/test_model_runner_v2_mamba.py vLLM #58400 Regress prompt-tail masks for FULL/NONE graph modes and zero/three draft tokens; verify the original mask is unchanged.
tests/ut/worker/test_pcp_manager_v2.py vLLM #45635, vLLM #57980 Assert descriptor-based partitioning and hidden/aux restore layout; update AuxOutput fixture configuration.
tests/ut/worker/test_v2_dummy_padding.py vLLM #58400 adds prefill_runs_as_decode_np and decode_graph_eligible for single-token prompt tails with existing context; has_prefill alone no longer determines FULL-decode eligibility.

vLLM #58275/vLLM #57980 expose max_query_len/is_padding on dummy batches and an explicit query-length bound for autoregressive graph capture.

vLLM #58149 makes ModelState.max_model_len a model-config-backed property; vLLM #57913 moves multimodal capability to ModelConfig; vLLM #56723 updates DCP state/metadata contracts.
Use the model-config-backed state/dummy descriptor contract and retain graph-eligibility metadata.
tests/ut/worker/v2/test_aclgraph.py vLLM #57980, vLLM #58275 Update capture descriptors and dummy-batch keyword expectations.
tests/ut/worker/v2/test_eplb_controller.py vLLM #53934 Cover release state construction versus main in-place state/communicator reuse.
tests/ut/worker/v2/test_eplb_load_collection_phase.py vLLM #53934 Match each target's EPLB setup signature in load-collection fixtures.

Local A3 nightly validation (2026-10-15; frozen head 444e962)

These four model runs used 444e962b239c3a8fc56b9255d601818e6e028b9a + vLLM 0.31.0 (db9527a), which is also the restored PR head; the deferred connector hardening is not included. Prefill 138 + Decode 136, 16 NPUs per node; original image, weights, datasets, launch and benchmark parameters were retained, with only the second-node address mapped from 139 to 136. All four cases exited pytest 0 on both nodes (one passed JUnit case per node). OTT is output token/s; TPOT/TTFT are ms.

Case Performance requests OTT / required minimum TPOT / TTFT AIME2025 accuracy Result
Kimi-K2.6 PD 60/60 355.1593 / 337.024075 20.5 / 3268.2 90%, within 93.33±10 Performance + accuracy passed
DeepSeek-V4 Flash PD-prefix Accuracy only N/A N/A 90%, within 90±10 Accuracy passed
GLM-5.1 W8A8C8 128K 256/256 811.7645 / 282.105876 39.8 / 32665.6 No accuracy item Performance passed
MiniMax-M2.7 PD-prefix 160/160 711.0518 / 698.497 34.8 / 17438.2 90%, within 93.33±10 Performance + accuracy passed

All performance requests above, and the valid controls below, were checked for actual 1024-token outputs, not just success flags.

Conditional controls: historical throughput differences triggered only the affected performance cases against the same PR base 6d1dd70, without this PR, + vLLM 0.30.0 (ced6857). Kimi: 355.1593 vs 359.8514 OTT (-1.30%); the earlier 7.27% loss was not reproduced in this comparison. TPOT was 20.5 vs 19.7ms (+0.8ms/+4.06%), and average request latency +3.48%; a single pair does not establish latency equivalence or a stable regression. GLM: 811.7645 vs 813.3506 OTT (-0.20%), TPOT 39.8 vs 39.4ms. Kimi's original random request pacing affects aggregate OTT. No alternating reruns or unaffected-model 0.30 controls were added.

Archived evidence: main2main-nightly-20261013/pr18229-update-444e962-20261015/ (FINAL_REPORT.md, per-node logs/JUnit, raw AISBench outputs, token-count audit, controls and diagnostic evidence). Both nodes were released after testing.

Deferred follow-up: multi-group receive-failure reporting (not included)

The request-level receive-failure hardening change has been removed from this upgrade PR; the branch is restored to the nightly-tested head 444e962. The original four nightlies already passed on this head without that fix, so it is not required for these normal-path workloads to pass.

The fault-path issue remains real: if a multi-group receive actually fails, the existing connector can report flat block IDs and trigger the vLLM 0.31 scheduler guard, terminating Decode EngineCore. This is handled separately in #18823, retaining ordinary non-HMA block-level recovery semantics. The upgrade PR does not claim fault isolation is fixed.

Development fault-injection results belong to the deferred connector implementation, not this restored head. No new NPU run was performed when restoring the exact previously tested code.

Historical validation for head 23c8b15

  • New E2E workflow and Docs link check were triggered after the rebase. Results are pending; previous-head CI does not validate this rebased head.
  • A targeted comment command requests test_deepseek_v4_mtp_full_decode_only against both supported upstream targets. The command workflow is queued; its actual test results remain pending.
  • Ruff check and format check passed for all 72 changed Python files; Python compilation and diff checks passed. Source-extracted execution of both real CPP routing regressions passed against the required partition signatures of the exact main/release refs. This validates dispatch contracts with lightweight dependency stubs and does not replace full pytest or NPU execution.
  • Existing source-extracted scheduler regressions passed on both version lanes: eight budget scenarios, two queue paths and empty/fully deferred queue regressions, including negative controls.
  • Local full pytest/Torch/NPU and bash format.sh ci remain unavailable in this Windows environment. They require CI validation.
  • Previous head 9330488 passed pre-commit, Docs and both CPU UT lanes (main 10782 passed / 114 skipped; release 10784 passed / 112 skipped). Its initial NPU matrix passed 41/42 shards; the remaining main A3 shard failed in unchanged upstream teardown with psutil.NoSuchProcess, before the MTP golden acceptance assertion. The consequent gate failure and old-head rerun are historical evidence, not a result for the current head.

Coverage limits and historical evidence

The PR CI selector scans tests/ut and tests/e2e/pull_request; the new broadcast/strided token-logprob numerical tests under tests/e2e/nightly are outside that selection. A5, standalone upstream-worker and coverage-upload jobs were skipped in the inspected run. Skips are not coverage. No dedicated packed-QK RoPE or V1 profiling-randomization standalone UT is added by this final diff.

Previous head 15f8a3d passed E2E and Docs, including 42 NPU jobs. Its PR-recorded CPU counts were 10574 passed / 113 skipped for verified main and 10576 passed / 111 skipped for release, with no failures. Those counts belong to that historical head and are not asserted as current-head counts.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 performs an incremental upgrade of the vLLM dependency to v0.31.0. It incorporates necessary adaptations to Ascend-specific scheduling, worker, and model runner logic to maintain compatibility with upstream architectural changes, particularly regarding scheduler queue management and input batching. The PR also cleans up legacy compatibility code that is no longer required with the new version pin.

Highlights

  • vLLM Version Upgrade: Upgraded vLLM main and release pins to v0.31.0, requiring updates to scheduling and worker logic.
  • Scheduler Adaptations: Updated recompute, profiling, and Dyntra LB schedulers to align with upstream changes to queue management and blocked request handling.
  • Worker and Model Runner Updates: Refactored input batching, profiling passthrough, and KV cache coordination to support v0.31.0 contracts.
  • Legacy Path Retirement: Removed obsolete compatibility paths for v0.29/v0.30, simplifying the codebase for the new version.
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 Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi! Thank you for contributing to the vLLM Ascend project. The following points will speed up your PR merge:‌‌

  • A PR should do only one thing, smaller PRs enable faster reviews.
  • Every PR should include unit tests and end-to-end tests ‌to ensure it works and is not broken by other future PRs.
  • Write the commit message by fulfilling the PR description to help reviewer and future developers understand.

If CI fails, you can run linting and testing checks locally according Contributing and Testing.

@zhao-stack zhao-stack changed the title [Main2Main] Upgrade vLLM main and release pins to v0.31.0 [Misc][Main2Main] Upgrade vLLM main and release pins to v0.31.0 Oct 10, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

Suggested PR Title:\n\nmarkdown\n[Ops][Misc] Align vllm_ascend with vLLM v0.31.0 API changes\n\n\nSuggested PR Summary:\n\nmarkdown\n### What this PR does / why we need it?\nThis pull request updates the `vllm_ascend` repository to maintain compatibility with the upstream vLLM v0.31.0 release. It adapts various modules, including attention backends, schedulers, model runners, and the Kimi K3 model, to match upstream API refactorings (such as `LogitsContext`, `AuxOutputConfig`, `EplbState` attribute renames, and `PCPManager` changes). Additionally, it refactors `AscendGateLinear` to support quantization and bias configurations, and fixes a potential out-of-bounds memory access in the Triton slot mapping kernel when handling dummy requests.\n\nFeedback: A potential issue was identified in the Triton slot mapping kernel where a negative pointer offset is calculated for dummy requests (`idx_mapping == -1`). Clamping the index to a valid row is recommended to prevent memory access faults on NPU architectures.\n\n### Does this PR introduce _any_ user-facing change?\nNo, these are internal alignment and compatibility updates for the Ascend NPU backend.\n\n### How was this patch tested?\nThe changes are covered by updating the existing unit tests and end-to-end tests to match the new vLLM v0.31.0 contracts.\n

Comment thread vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py
@zhao-stack
zhao-stack force-pushed the codex/main2main-v0.31.0 branch from a745977 to 39ce422 Compare October 10, 2026 10:14

zhao-stack commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator Author

/rerun
[Bot]: rerun completed.

Rerun (failed jobs only):

  • E2E

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

zhao-stack commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

/rerun
[Bot]: rerun completed.

Rerun (failed jobs only):

  • E2E

@github-actions github-actions Bot added documentation Improvements or additions to documentation merge-conflicts labels Oct 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@zhao-stack
zhao-stack force-pushed the codex/main2main-v0.31.0 branch from 831c83b to d3ede01 Compare October 12, 2026 10:17
@zhao-stack
zhao-stack force-pushed the codex/main2main-v0.31.0 branch from d3ede01 to 13a5909 Compare October 12, 2026 13:56

zhao-stack commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator Author

/rerun
[Bot]: rerun completed.

Rerun (failed jobs only):

  • E2E

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
Keep the existing BalanceScheduler algorithm and defer the historical full-body synchronization to separate work. Fold the six obsolete v0.30 queue branches and retain only the encoder-only admission difference between verified main and v0.31.0.

Restore the baseline drift guard and balance-count behavior. Add parameterized admission regressions for encoder-only versus normal requests, chunked prefill and prompt lengths across the per-step budget.

Validation: Ruff, compilation, focused mypy and available Python repository checks passed. Source-extracted execution passed 20 lane/queue cases and a baseline negative control. Full pytest and format.sh remain unavailable locally because pytest/Torch and Bash are absent.
Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
The v0.30 queue helper returned None, while both supported refs use the shared KV-holder queue path and an empty-queue guard. Update the stale structural expectation and module description, and cover initially empty and fully deferred queues with and without KV blocks. Keep production scheduling behavior unchanged.

Validation: Ruff check/format, Python compilation and diff checks passed. Source-extracted tests passed on both version lanes, including unsafe None-only guard negative controls. Full pytest and format.sh require CI because local Torch/pytest and Bash are unavailable.
Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
Both pinned main and v0.31 require a batch descriptor for PCP partitioning. Remove the obsolete v0.30 CPP routing branch introduced by the latest Ascend main, and keep the regression assertion for the required descriptor.

Validation: Ruff check/format on all 72 changed Python files; Python compilation; extracted CPP routing tests against both exact upstream signatures; dual-lane balance queue and budget regressions with negative controls. Full pytest/Torch/NPU and bash format.sh ci remain for CI because this Windows environment lacks their runtime dependencies.
Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
@zhao-stack
zhao-stack force-pushed the codex/main2main-v0.31.0 branch from 23c8b15 to 444e962 Compare October 14, 2026 16:47

zhao-stack commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

/rerun
[Bot]: rerun completed.

Rerun (failed jobs only):

  • E2E

@AuroraEmiya AuroraEmiya left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ningjingbengxiaohai
ningjingbengxiaohai merged commit 23d1d90 into vllm-project:main Oct 15, 2026
174 of 177 checks passed
linfeng-yuan pushed a commit that referenced this pull request Oct 15, 2026
…18823)

### What this PR does / why we need it?

Report P2P Mooncake receive failures through
`KVConnectorTransferResults.failed_recving` when the logical cache has
multiple groups or requires HMA. Flat block IDs do not identify the
affected request across independent cache groups; vLLM 0.31 rejects such
reports and can terminate Decode EngineCore after a receive failure.

Preserve the existing block-level failure reporting and valid-prefix
recovery for ordinary non-HMA caches with one logical group. Select the
reporting mode from the logical cache configuration and HMA state
**before** registration expands `_is_hma_required` for group-aware wire
transfers: splitting one shared block table into several transfer groups
must not change its recovery semantics.

Retain each failed request until all local pull/reformat tasks have
finished, then return its failure together with receive completion.
Delegate the connector's `get_transfer_results()` to the worker so
upstream receives the failure IDs; keep the legacy `get_finished()`
tuple API available. No scheduler changes are needed.

This follows the request-level HMA / block-level non-HMA split in
[upstream vLLM #56855](vllm-project/vllm#56855),
with an explicit check for multiple logical groups to satisfy the 0.31
scheduler guard. This is a separate fix from the release upgrade in
#18229 and applies on the current Ascend main base.

### Does this PR introduce _any_ user-facing change?

On the affected asynchronous receive-failure path, upstream can apply
the configured `fail` or `recompute` policy to the request instead of
rejecting an ambiguous block-level report. Successful transfers and
ordinary non-HMA single-group block-level recovery retain their existing
behavior. This does not repair transport/backend configuration problems.

### How was this patch tested?

CPU validation in an isolated A3-host container with no NPU device
mappings and no network:

```bash
python -m pytest -q --tb=short \
  tests/ut/distributed/kv_transfer/kv_p2p/test_mooncake_connector.py \
  tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py \
  tests/ut/kv_offload
bash format.sh ci
```

- Before rebase, the two connector/lifecycle target suites: **192
passed, 14 skipped on each** of verified vLLM main `c4df37d`, vLLM
0.31.0 `db9527a`, and vLLM 0.30.0 `ced6857`. The 0.30 source checkout
uses `VLLM_VERSION=0.30.0` because its generated `_version.py` is
absent.
- After rebase onto Ascend main
`8a8e1e05ecb64a30804c99c8f362909f9a0cb5bf` (including the 0.31.0
upgrade), the connector/lifecycle suites plus all of
`tests/ut/kv_offload`: **1125 passed, 14 skipped per lane**, on verified
vLLM main `c4df37d` and vLLM 0.31.0 `db9527a`.
- Fixed the four CI failures by adding the missing error-mode fields to
two existing test fixtures that use `__new__` and bypass constructors
(two initialization lines). Adapted existing failure-state and
worker-polling tests; **no new test functions or parametrized cases**.
Existing block-error and real descriptor-to-transfer CPU tests remain
enabled.
- Additional submission-time runtime checks, kept outside the PR: eight
layout/HMA combinations per version, checking deferred failure draining,
completed/failed receive propagation, preservation of non-HMA invalid
block IDs, and independence from the transfer-only HMA flag.
- Full `bash format.sh ci` and `git diff --check` passed.
- No NPU model/fault-injection rerun for this final conditional variant;
the 14 existing skips and the mocked CPU transport are not end-to-end
NPU coverage.

- vLLM main:
vllm-project/vllm@c4df37d

---------

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
ningjingbengxiaohai pushed a commit that referenced this pull request Oct 16, 2026
### What this PR does / why we need it?

Restore the Ascend V1 pipeline-parallel + async-scheduling configuration
after the vLLM 0.30 to 0.31 upgrade in #18229. The main A3 nightly
GLM-5.3 PP/PD case fails before engine startup with `Model Runner V1
does not support: pipeline parallelism with async scheduling` ([job and
logs](https://github.com/vllm-project/vllm-ascend/actions/runs/38810262248/job/116684874311)).
The service log, rather than the external-DP wrapper error, identifies
this as the first failure.

vLLM 0.31 adds a GPU V1 restriction associated with upstream issue
vllm-project/vllm#45014. Ascend has its own PP communication/scheduler
adaptations. Extend the existing Ascend V1 feature allowlist for this
configuration and preserve unrelated restrictions. Add native-helper
regression coverage for PP1/PP2, sync/async, and PCP rejection; document
the compatibility patch and its removal plan.

### Does this PR introduce _any_ user-facing change?

V1 PP+async configurations can pass configuration validation again.
Runner selection, async scheduling settings, and other
unsupported-feature checks are unchanged.

### How was this patch tested?

- **Regression tests:** `pytest -q
--confcutdir=<isolated-test-directory>
test_patch_use_v2_model_runner.py` against native vLLM 0.31 on A3.
Original module: **2 failed, 13 passed**. An isolated overlay replacing
only `patch_use_v2_model_runner.py`: **15 passed**. The tests call the
real upstream helper/validator, with a minimal configuration object;
unrelated PCP rejection remains active.
- **Version boundary:** execute the unmodified
`_get_v1_model_runner_unsupported_features` functions from vLLM
`ced6857afa0ea7b2e3f0846a62e1394e90f15607` (0.30) and
`db9527a46873454610df6dbedf79a36d6bf1a7f6` (0.31) with the same
PP2/async configuration. Results: `[]` versus `["pipeline parallelism
with async scheduling"]`. This isolates the specific validation
regression; it is not a full-model pre/post-upgrade accuracy comparison.
- **Real A3, reduced runtime validation:** Qwen3-8B BF16, TP1/PP2, V1,
multiprocessing spawn, eager, max model length 2048, max sequences 8,
seed 42. Same machine/container/weights/parameters; baseline fails with
the nightly's exact validation error. With the actual changed module
loaded in all subprocesses, **8 ordinary requests + 4 JSON-schema
requests complete**, exit 0. A sync control also completes 12 requests.
All 4 JSON results/token sequences match. Ordinary greedy token
sequences match for **5/8** requests; the sync control itself also
differs between a repeated prompt, so **numerical equivalence is not
established**. Both controls show forced EngineCore teardown at
interpreter shutdown; no request execution failure was observed.
- **Runtime provenance:** vLLM 0.31.0, Ascend `0.31.0.dev0+pr444e962`,
CANN 9.2.0 (V100R001C12SPC001B234), torch 2.10.0+cpu, torch_npu
2.10.0.post7; existing A3 image
`sha256:0128555151f021ffe68f7ca5f824d9b0995f943f2753aff63313a63841d2aeba`.
This is a reduced validation environment, not the exact nightly image or
four-node GLM topology. Tested changed-module SHA256:
`02cfd08bb8a1f67320e86d0798c4c8fcd2fa8ed4e37a7e82606ace2b14f56033`.
- **Checks:** Ruff check/format, codespell, clang-format, markdownlint,
package-init, forbidden imports, boolean-context checks, manual
logger/long-function/symbolic-meta checks, and `git diff --check` pass.
Full `bash format.sh ci` **did not pass** locally: Go bootstrap stalled;
a subsequent partial run skipped actionlint/Gitleaks and exposed Windows
typos-path, shellcheck, `/bin/bash`, and `python3` execution
limitations. Required complete CI remains pending.
- **Draft / remaining validation:** original GLM-5.3 W8A8C8 four-node
PP+PD nightly, longer/mixed structured-output loads, and accuracy
coverage remain unverified. Do not interpret this PR as a passing full
nightly result. No CI rerun or large workflow dispatch was requested by
this investigation.

---

### Checklist

- [x] Boundary and error paths: PP1/PP2, async on/off, unrelated PCP
rejection.
- [x] Regression test fails before the fix.
- [x] Reduced NPU execution recorded with its limitations.
- [ ] Original multi-node nightly and full accuracy validation.
- [ ] Complete required CI checks.

- vLLM main:
vllm-project/vllm@c4df37d

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
tangdafu pushed a commit to tangdafu/vllm-ascend that referenced this pull request Oct 16, 2026
…tibility (vllm-project#18229)

### What this PR does / why we need it?

Upgrade the release dependency from vLLM v0.30.0 to
[v0.31.0](https://github.com/vllm-project/vllm/commit/db9527a46873454610df6dbedf79a36d6bf1a7f6)
while keeping the independently supported verified-main target at
[c4df37d](https://github.com/vllm-project/vllm/commit/c4df37dfcc7f72ca41cd43801a468526ecf99a2b).
Rebase on latest Ascend main `c2382c6`, preserving the CPP profiling
changes from #18622. The file mapping below describes the diff for
`23c8b15` against `c2382c6`.

The two targets have different APIs despite both being supported: retain
version-dependent forwarding for profiling randomization, PP batch
lengths, Mamba allocation, EPLB setup and encoder-only prefill
admission. Remove obsolete 0.30 branches only where both targets now
share the contract.

| Contract | Verified main `c4df37d` | Release v0.31.0 `db9527a` |
| --- | --- | --- |
| Profiling | Parent calls omit `randomize_inputs` | Forward the flag
through V1/V2/310P and MC2 |
| PP batch state | No `max_seq_len_np` | Preserve the field in
`AscendInputBatch` |
| Mamba allocation | Parent has no `prefill_end` | Forward checkpoint
boundary |
| EPLB setup | Update existing state/communicator | Construct state from
model and mapping |
| Non-chunked prefill | Keep encoder-only budget exception | Keep
release budget rejection |

#### Changes organized by downstream file

Upstream links identify the reason or contract being adapted. For
existing main behavior that becomes common to both targets, the change
is removal of the old release branch, not a new port of the complete
upstream implementation. File links are pinned to this PR head; [the
complete fixed
diff](https://github.com/vllm-project/vllm-ascend/compare/c2382c67aa6be12f1c822733cd47d021f61b0b23...23c8b15c2709978463490b0e8531bf5f9f27b9c1)
shows the exact edits.

<details>
<summary>Dependency markers, images and documentation (13
files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`.github/vllm-release-tag.commit`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/.github/vllm-release-tag.commit)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Advance the release marker
to `v0.31.0`; leave the verified-main marker at `c4df37d`. |
|
[`Dockerfile`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.310p`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.310p)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.310p.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.310p.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a3`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a3)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a3.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a3.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a5`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a5)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a5.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a5.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`README.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/README.md)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Update the release CI
support version to 0.31.0. |
|
[`README.zh.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/README.zh.md)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Update the Chinese release
CI support version to 0.31.0. |
|
[`docs/source/tutorials/models/DeepSeek-V4.1-Flash.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/docs/source/tutorials/models/DeepSeek-V4.1-Flash.md)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Use separate release and
verified-main marker commands for the two build targets. |
|
[`vllm_ascend/ops/triton/docs/v2/spec_decode/prepare_dflash_inputs.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/triton/docs/v2/spec_decode/prepare_dflash_inputs.md)
| [vLLM #57632](https://github.com/vllm-project/vllm/pull/57632) passes
`precompute_context_kv` into DFlash FULL-graph capture; wrapped draft
models must expose the underlying callback. | Update the documented
DFlash ABI version to 0.31.0; no new kernel behavior is introduced by
this document change. |

</details>

<details>
<summary>Model runners, graphs and platform integration (14
files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/_310p/model_runner_310p.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/model_runner_310p.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls. | Forward the profiling randomization flag through the 310P V1
override to the NPU V1 runner. |
|
[`vllm_ascend/_310p/worker/v2/model_runner.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/worker/v2/model_runner.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls.<br><br>[vLLM
#58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#56456](https://github.com/vllm-project/vllm/pull/56456) adds trailing
`num_active_loras` to `prepare_inputs`, keeping dispatch and
fast-prefill graph/padding selection consistent. | Forward release-only
randomization; accept `num_active_loras` in the common prepare
signature, use the shared PCP/input-batch contract and compute complete
prompt-tail/decode-graph metadata in CPU input preparation. |
|
[`vllm_ascend/_310p/worker/v2/sampler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/worker/v2/sampler.py)
| [vLLM #56497](https://github.com/vllm-project/vllm/pull/56497)
introduces V2 `LogitsContext` and custom logits-processor lifecycle;
`Sampler.add_request` no longer takes `prompt_len`. | Adopt
`add_request(req_idx, sampling_params)` and remove the legacy
prompt-length argument; retain the 310P CPU generator/sampling
implementation. |
|
[`vllm_ascend/attention/attention_v1.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/attention/attention_v1.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility. | Remove the 0.30 condition around
V2 speculative-padding handling while retaining actual prefill/decode
metadata semantics. |
|
[`vllm_ascend/patch/worker/patch_v2/patch_model_runner.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/worker/patch_v2/patch_model_runner.py)
| [vLLM #56723](https://github.com/vllm-project/vllm/pull/56723) adds
`dcp_sharded` to distinguish sharded attention KV from replicated
Mamba/GDN state when target DCP and DCP=1 draft coexist.<br><br>[vLLM
#45635](https://github.com/vllm-project/vllm/pull/45635) moves
routed-expert output to `AuxOutputConfig`/the AuxOutput connector; [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) removes the
legacy runner initialization keyword. | Read `dcp_sharded` from cache
specs and forward it to block tables; initialize the AuxOutput connector
from `aux_output_config.enabled`; drop the legacy `attn_cg_support`
keyword. |
|
[`vllm_ascend/platform.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/platform.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635) moves
routed-expert output to `AuxOutputConfig`/the AuxOutput connector; [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) removes the
legacy runner initialization keyword. | Apply the existing V1 AuxOutput
configuration guard to both targets, removing the old 0.30 early return.
|
|
[`vllm_ascend/worker/model_runner_v1.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/model_runner_v1.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls. | Accept `randomize_inputs` in profiling/dummy execution and
enter `maybe_randomize_inputs` inside forward context when requested;
preserve the Ascend execution path. |
|
[`vllm_ascend/worker/v2/aclgraph_utils.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/aclgraph_utils.py)
| [vLLM #57980](https://github.com/vllm-project/vllm/pull/57980)
replaces the legacy PCP helper with descriptor-based `partition_batch`,
restores auxiliary hidden states with sampling outputs, and renames the
DCP preparation helper.<br><br>[vLLM
#57632](https://github.com/vllm-project/vllm/pull/57632) passes
`precompute_context_kv` into DFlash FULL-graph capture; wrapped draft
models must expose the underlying callback. | Use
`prepare_dcp_local_seq_lens`; delegate model-wrapper attribute lookup to
the original model so DFlash context-KV callbacks remain accessible. |
|
[`vllm_ascend/worker/v2/input_batch.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/input_batch.py)
| [vLLM #58275](https://github.com/vllm-project/vllm/pull/58275)/[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) expose
`max_query_len`/`is_padding` on dummy batches and an explicit
query-length bound for autoregressive graph capture. | Always retain
prompt-tail and graph-eligibility fields and forward dummy-batch
`max_query_len`/`is_padding`; remove obsolete 0.30 branches. |
|
[`vllm_ascend/worker/v2/model_runner.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/model_runner.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls.<br><br>[vLLM
#58542](https://github.com/vllm-project/vllm/pull/58542) adds
`max_seq_len_np` for PP sampled-token broadcast handling. Present in
release batch state; absent from pinned main.<br><br>[vLLM
#58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) replaces the
legacy PCP helper with descriptor-based `partition_batch`, restores
auxiliary hidden states with sampling outputs, and renames the DCP
preparation helper.<br><br>[vLLM
#56456](https://github.com/vllm-project/vllm/pull/56456) adds trailing
`num_active_loras` to `prepare_inputs`, keeping dispatch and
fast-prefill graph/padding selection consistent.<br><br>[vLLM
#54335](https://github.com/vllm-project/vllm/pull/54335) routes
fixed-token scoring through the same unpadded logits path as prompt
logprobs, which is incompatible with Ascend lmhead-TP collective row
layouts. | Use release-only kwargs for profiling/execute and MC2 dummy
execution; forward release-only `max_seq_len_np`. After PD request
reclassification, recompute `has_prefill`, decode-graph eligibility and
uniform token count. Accept `num_active_loras` in the common prepare
signature without adding FastPrefillHelper behavior. Use
descriptor-based PCP partitioning and restore auxiliary states before
replicated drafting. Extend the lmhead-TP guard to fixed-token scoring,
tolerating workers without `token_id_scores`. |
|
[`vllm_ascend/worker/v2/model_states/mamba_hybrid.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/model_states/mamba_hybrid.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400)
requires decode-like prompt tails to use decode-row Mamba metadata for
speculative rollback. | Build a local mask `is_prefilling_np &
~prefill_runs_as_decode_np` so prompt tails are decode rows; do not
mutate the batch's original prefill mask. |
|
[`vllm_ascend/worker/v2/pcp_manager.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/pcp_manager.py)
| [vLLM #57980](https://github.com/vllm-project/vllm/pull/57980)
replaces the legacy PCP helper with descriptor-based `partition_batch`,
restores auxiliary hidden states with sampling outputs, and renames the
DCP preparation helper. | Unify descriptor-based partitioning, including
CPP profile capture after #18622, and the `(batch, hidden, aux)`
sampling restore contract; restore and trim auxiliary states together
with hidden states to the unpadded global token extent. |
|
[`vllm_ascend/worker/v2/spec_decode/autoregressive/aclgraph.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/spec_decode/autoregressive/aclgraph.py)
| [vLLM #58275](https://github.com/vllm-project/vllm/pull/58275)/[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) expose
`max_query_len`/`is_padding` on dummy batches and an explicit
query-length bound for autoregressive graph capture. | Always pass
`desc.max_query_len or desc.uniform_token_count` to autoregressive
capture. |
|
[`vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py)
| [vLLM #57632](https://github.com/vllm-project/vllm/pull/57632) passes
`precompute_context_kv` into DFlash FULL-graph capture; wrapped draft
models must expose the underlying callback. | Always receive and forward
`precompute_context_kv` under the Ascend communicator/model-capture
wrappers. |

</details>

<details>
<summary>KV allocation and block tables (6 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/_310p/worker/v2/block_table.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/worker/v2/block_table.py)
| [vLLM #56723](https://github.com/vllm-project/vllm/pull/56723) adds
`dcp_sharded` to distinguish sharded attention KV from replicated
Mamba/GDN state when target DCP and DCP=1 draft coexist.<br><br>[vLLM
#56734](https://github.com/vllm-project/vllm/pull/56734) uses
`idx_mapping=-1` for dummy draft/padding requests and masks their
persistent block-table reads to avoid stale-row KV writes. | Unify the
constructor with `dcp_sharded`; skip negative request indices and retain
PAD slots in the CPU mapping path. Keep the existing CP=1 restriction
and persistent CPU/device buffers. |
|
[`vllm_ascend/models/glm5next/kv_cache.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/models/glm5next/kv_cache.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) adds
`prefill_end` to Mamba checkpoint allocation, including prompt-end
retention. Release has the new signature; pinned main has the old one. |
Accept `prefill_end` for call compatibility; keep one private Kpool tail
block per request. |
|
[`vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py)
| [vLLM #56734](https://github.com/vllm-project/vllm/pull/56734) uses
`idx_mapping=-1` for dummy draft/padding requests and masks their
persistent block-table reads to avoid stale-row KV writes. | Unify the
slot-mapping kernel, mask block-table loads with `is_real_req`, and emit
PAD for dummy rows; retain Ascend block/window and address-calculation
behavior. |
|
[`vllm_ascend/patch/platform/patch_kv_cache_utils.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/platform/patch_kv_cache_utils.py)
| The pinned `_annotate_eagle_groups` contract uses
`use_trailing_layer_fallback`, replacing the DeepSeek-V4-specific
fallback keyword; the introducing PR was not independently identified.
Fixed contracts: [release:
kv_cache_utils.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/kv_cache_utils.py#L2170).
| Always pass `use_trailing_layer_fallback=True`; retain existing Ascend
cache grouping/annotation behavior. |
|
[`vllm_ascend/patch/platform/patch_mamba_manager.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/platform/patch_mamba_manager.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) adds
`prefill_end` to Mamba checkpoint allocation, including prompt-end
retention. Release has the new signature; pinned main has the old one. |
Accept `prefill_end`, forwarding it only to the release parent while
retaining the existing Ascend allocation logic. |
|
[`vllm_ascend/worker/v2/block_table.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/block_table.py)
| [vLLM #56723](https://github.com/vllm-project/vllm/pull/56723) adds
`dcp_sharded` to distinguish sharded attention KV from replicated
Mamba/GDN state when target DCP and DCP=1 draft coexist. | Use one
constructor with optional per-group `dcp_sharded` validation/forwarding;
retain Ascend int32 slot mappings. |

</details>

<details>
<summary>Schedulers and profiling (5 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/core/dyntra_lb_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/core/dyntra_lb_scheduler.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses
`_handle_blocked_waiting_request`.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#58259](https://github.com/vllm-project/vllm/pull/58259) define the
upstream resumable-session queue/handoff lifecycle: stopping a turn can
re-enqueue buffered continuation input.<br><br>Both targets admit
against `max_num_active_reqs` and include parked streaming sessions in
occupied slots; related queue/Elastic-EP changes are [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#53934](https://github.com/vllm-project/vllm/pull/53934). Fixed
contracts: [release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L127),
[release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L892).
| Use KV-holder-first queue selection/re-enqueueing, the common
blocked-request helper, deferred bookkeeping and active-slot admission
including parked streams. Preserve the main-only encoder exception.
Remove secondary stop cleanup so upstream can retain/re-enqueue
resumable continuations. |
|
[`vllm_ascend/core/recompute_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/core/recompute_scheduler.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses
`_handle_blocked_waiting_request`.<br><br>Both targets admit against
`max_num_active_reqs` and include parked streaming sessions in occupied
slots; related queue/Elastic-EP changes are [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#53934](https://github.com/vllm-project/vllm/pull/53934). Fixed
contracts: [release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L127),
[release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L892).
| Fold the legacy queues into the common KV-holder/deferred path, count
parked streams for active admission, and preserve the version-dependent
encoder condition. Remove the redundant remote-KV waiting debug log as a
local cleanup. |
|
[`vllm_ascend/core/scheduler_profiling_chunk.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/core/scheduler_profiling_chunk.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses
`_handle_blocked_waiting_request`.<br><br>Both targets admit against
`max_num_active_reqs` and include parked streaming sessions in occupied
slots; related queue/Elastic-EP changes are [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#53934](https://github.com/vllm-project/vllm/pull/53934). Fixed
contracts: [release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L127),
[release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L892).
| Use the common blocked-request/queue lifecycle, active admission
including parked streams, and the version-dependent encoder budget
condition. |
|
[`vllm_ascend/patch/platform/patch_balance_schedule.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/platform/patch_balance_schedule.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses `_handle_blocked_waiting_request`. |
Fold six obsolete 0.30 queue branches and add the release/main encoder
budget condition. Document the shared `if not request_queue`
drained-queue guard. Retain baseline balancing, running-only DP
snapshots/admission accounting and connector-snapshot cleanup; complete
upstream schedule synchronization is outside this patch. |
|
[`vllm_ascend/profiling_config.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/profiling_config.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947)
replaces `skipped_waiting` with `kv_holding_waiting` and
`deferred_waiting`, prioritizes KV holders, and uses
`_handle_blocked_waiting_request`. | Retarget the profiling wrapper from
the old blocked-status promotion helper to
`_handle_blocked_waiting_request`. |

</details>

<details>
<summary>EPLB state and routing (2 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/distributed/eplb/eplb_state.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/distributed/eplb/eplb_state.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) changes
main's EPLB setup to update existing state and reuse its communicator.
Release still creates state from `(model, model_config, mapping)`. |
After the parent's `update_mapping`, refresh Ascend replica routing
tables; consistently resolve an unspecified NPU device index to the
current device. |
|
[`vllm_ascend/worker/v2/eplb.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/eplb.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) changes
main's EPLB setup to update existing state and reuse its communicator.
Release still creates state from `(model, model_config, mapping)`. |
Create `AscendEplbState` on release with the current policy/optional
expert arguments; call the main parent to update the existing state and
communicator. |

</details>

<details>
<summary>Models and MoE operators (6 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/models/kimi_k3.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/models/kimi_k3.py)
| [vLLM #50592](https://github.com/vllm-project/vllm/pull/50592)/[vLLM
#50593](https://github.com/vllm-project/vllm/pull/50593) use
`prefix_delta` and the three-value AttnRes layer contract instead of the
old prepared-input/deferred-MLP contract. | Remove old layer/model
contracts, propagate `prefix_delta` and return the three-value AttnRes
state; preserve Ascend fused operations, DSpark aux selection and SP/PP
transport/output boundaries. |
|
[`vllm_ascend/ops/fused_moe/gate_linear.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/fused_moe/gate_linear.py)
| [vLLM #58234](https://github.com/vllm-project/vllm/pull/58234) unifies
MoE gate layers under `GateLinear` with the current linear constructor
and replaces Step3.5's dedicated FP32 gate class. | Use the current
constructor parameters (`skip_bias_add`, `quant_config`, `return_bias`)
and retain BF16-to-FP32 gate/fallback semantics. CRLF-to-LF
normalization contributes to the large line diff. |
|
[`vllm_ascend/ops/fused_moe/router/grouped_topk_router.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/fused_moe/router/grouped_topk_router.py)
| [vLLM #58880](https://github.com/vllm-project/vllm/pull/58880) removes
`routed_scaling_factor` from routing-method classification, allowing
MiniMax classification with non-unit scaling. | Stop passing
`routed_scaling_factor` to classification; downstream routing-weight
scaling is retained. |
|
[`vllm_ascend/patch/__init__.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/__init__.py)
| The release target is 0.31.0; [vLLM
#56994](https://github.com/vllm-project/vllm/pull/56994) is context for
the retained GLM reasoning patch comment, not a new model capability in
this PR. | Update only the supported-version comment for the retained
GLM reasoning patch. |
|
[`vllm_ascend/patch/worker/patch_step3p5.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/worker/patch_step3p5.py)
| [vLLM #58234](https://github.com/vllm-project/vllm/pull/58234) unifies
MoE gate layers under `GateLinear` with the current linear constructor
and replaces Step3.5's dedicated FP32 gate class. | Always use
`GateLinear` with FP32 parameter/output types instead of the legacy
FP32ReplicatedLinear branch. |

</details>

<details>
<summary>Token scoring and Triton helpers (2 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/patch/worker/patch_triton.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/worker/patch_triton.py)
| [vLLM #58651](https://github.com/vllm-project/vllm/pull/58651) uses
`triton.next_power_of_2` in packed-QK RoPE constexpr evaluation; the
Ascend replacement must also satisfy the installed Triton
JIT/constexpr-function contract. | Use a constexpr-aware
`next_power_of_2` replacement; register with `triton.constexpr_function`
when available, otherwise unwrap `tl.constexpr.value` in the fallback. |
|
[`vllm_ascend/worker/v2/sample/logprob.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/sample/logprob.py)
| [vLLM #54335](https://github.com/vllm-project/vllm/pull/54335) adds
fixed-token prompt scoring and broadcasts candidate IDs with `expand`;
the token-ID row stride can be zero or non-contiguous. | Pass
`token_ids.stride(0)` into the Triton kernel and use it for row
addressing; support broadcast stride zero and strided candidate IDs. |

</details>

BalanceScheduler scope: this PR folds the old queue branches and adapts
encoder-only admission. Its baseline DP balancing, running-only
snapshot/accounting and connector-snapshot cleanup remain; complete
scheduler-body synchronization and a strict AST equivalence requirement
are deferred. The baseline drift guard may skip and does not prove
complete upstream equivalence.

### Does this PR introduce _any_ user-facing change?

The default release dependency becomes vLLM v0.31.0; the verified-main
pin remains unchanged. Fixed-token prompt scoring handles
broadcast/strided IDs correctly and reports an explicit error when used
with unsupported lmhead TP. Resumable Dyntra continuations retain
upstream stop/queue behavior, and PD prompt-tail graph/Mamba metadata
follow the supported upstream contracts.

### How was this patch tested?

#### Test changes organized by file

The table describes test intent and fixture changes; it does not claim
that every changed test was selected or executed on NPU hardware.

<details>
<summary>Unit, PR E2E and nightly test mapping (37 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_compute_token_logprobs.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_compute_token_logprobs.py)
| [vLLM #54335](https://github.com/vllm-project/vllm/pull/54335) | Add
NPU numerical comparisons for broadcast stride=0 and sliced stride=8
token IDs; outside the PR CI selector. |
|
[`tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_num_nans.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_num_nans.py)
| Release-version cleanup; no new upstream behavior. | Update the
default version label to 0.31.0; no algorithm change. |
|
[`tests/e2e/pull_request/four_card/test_kimi_k3.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/pull_request/four_card/test_kimi_k3.py)
| [vLLM #54222](https://github.com/vllm-project/vllm/pull/54222) | Check
equality between P-worker `remote_prefill_cached_tokens` and the
response cache count; zero hits are valid for a new prompt. |
|
[`tests/e2e/pull_request/one_card/test_model_runner_v1_with_device.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/pull_request/one_card/test_model_runner_v1_with_device.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635), [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) | Use the
common AuxOutput configuration object in V1 guard fixtures. |
|
[`tests/e2e/pull_request/one_card/test_thinking_budget.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/pull_request/one_card/test_thinking_budget.py)
| [vLLM #56497](https://github.com/vllm-project/vllm/pull/56497) |
Construct `LogitsContext` with expanded mapping, input IDs, positions
and sequence bounds; call `apply(logits, ctx)`. |
|
[`tests/ut/_310p/test_model_runner_v2_310p.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/_310p/test_model_runner_v2_310p.py)
| [vLLM #56456](https://github.com/vllm-project/vllm/pull/56456), [vLLM
#56497](https://github.com/vllm-project/vllm/pull/56497) | Use the
current sampler request signature and pass the added prepare-input LoRA
argument in 310P fixtures. |
|
[`tests/ut/attention/test_mla_cp.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/attention/test_mla_cp.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Mock `get_dcp_world_size_and_rank` and
remove legacy DCP group fixture branching. |
|
[`tests/ut/core/test_circular_buffer.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_circular_buffer.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Pass `replay_boundaries=[tokens-1]` to the current cache-block API. |
|
[`tests/ut/core/test_dyntra_lb_recompute_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_dyntra_lb_recompute_scheduler.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947) | Use
the shared KV-holder/deferred queue interfaces in Dyntra/recompute
fixtures. |
|
[`tests/ut/core/test_dyntra_lb_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_dyntra_lb_scheduler.py)
| [vLLM #58259](https://github.com/vllm-project/vllm/pull/58259), [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) | Regress
synchronous/asynchronous resumable continuation handling for running,
paused and preempted requests, buffered/unbuffered input, and final
cleanup; update queue seams. |
|
[`tests/ut/core/test_profiling_chunk.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_profiling_chunk.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934), [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) | Update queue
fixtures/blocked-request helper and active-request capacity field. |
|
[`tests/ut/core/test_recompute_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_recompute_scheduler.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947) |
Remove legacy queue branching and use the shared blocked-request seam. |
|
[`tests/ut/core/test_scheduler_connector_block_state.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_scheduler_connector_block_state.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947), [vLLM
#59029](https://github.com/vllm-project/vllm/pull/59029) | Supply the
baseline `balance_queue` fixture; connector-snapshot cleanup itself
predates this change. |
|
[`tests/ut/distributed/eplb/test_state.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/distributed/eplb/test_state.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) |
Verify mapping updates refresh Ascend routing tables. |
|
[`tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947) | Use
the shared queue lifecycle rather than version-specific skipped-waiting
fixtures. |
|
[`tests/ut/kv_offload/test_preempt_offload_connector.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/kv_offload/test_preempt_offload_connector.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Always provide prefix replay and request token-count fields in the
offload fixture. |
|
[`tests/ut/models/test_deepseek_v41_release_config.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_deepseek_v41_release_config.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Assert obsolete flattened multimodal-prefix flags are absent after
architecture conversion. |
|
[`tests/ut/models/test_glm5next_kv_cache.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_glm5next_kv_cache.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) | Pass
the new allocation argument while checking the private-tail block
policy. |
|
[`tests/ut/models/test_kimi_k3_adapter.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_kimi_k3_adapter.py)
| [vLLM #50592](https://github.com/vllm-project/vllm/pull/50592), [vLLM
#50593](https://github.com/vllm-project/vllm/pull/50593) | Update layer
signatures/three-value returns, auxiliary output expectations and
AST-extracted fixtures. |
|
[`tests/ut/models/test_kimi_k3_pp_sp.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_kimi_k3_pp_sp.py)
| [vLLM #50592](https://github.com/vllm-project/vllm/pull/50592), [vLLM
#50593](https://github.com/vllm-project/vllm/pull/50593) | Use the
common Kimi AttnRes contract in PP/SP checks. |
|
[`tests/ut/patch/platform/test_patch_balance_schedule.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/patch/platform/test_patch_balance_schedule.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947), [vLLM
#59029](https://github.com/vllm-project/vllm/pull/59029) | Use common
queue fixtures; add eight encoder/chunked/prompt-budget cases and
empty/fully deferred queue regressions with/without KV blocks. Correct
the structural guard assertion to `if not request_queue`. Keep the
baseline AST drift check, which can skip. |
|
[`tests/ut/patch/platform/test_patch_engram_config.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/patch/platform/test_patch_engram_config.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Expect shared-memory default resolution for this supported fixture
configuration; no universal shared-memory default is claimed. |
|
[`tests/ut/patch/platform/test_prefix_cache_cp_patches.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/patch/platform/test_prefix_cache_cp_patches.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) |
Supply an explicit `prefill_end` allocation boundary. |
|
[`tests/ut/spec_decode/test_eagle_proposer.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/spec_decode/test_eagle_proposer.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Use the current model-config multimodal
capability interface and remove obsolete skips/branches. |
|
[`tests/ut/spec_decode/test_mla_dspark.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/spec_decode/test_mla_dspark.py)
| [vLLM #57632](https://github.com/vllm-project/vllm/pull/57632) |
Assert DFlash context-KV callback forwarding and the shared capture
signature. |
|
[`tests/ut/test_minimax_m3_kv_block_size.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/test_minimax_m3_kv_block_size.py)
| Release-version cleanup; no new upstream behavior. | Remove only an
unused version-helper import. |
|
[`tests/ut/test_platform.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/test_platform.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635), [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) | Use the
current AuxOutput configuration guard for both target versions. |
|
[`tests/ut/worker/test_attn_utils_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_attn_utils_v2.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Initialize `model_state.model_config`
instead of assigning the read-only length property. |
|
[`tests/ut/worker/test_dcp_speculator_metadata_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_dcp_speculator_metadata_v2.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Assert prefill metadata over the padded
request extent. |
|
[`tests/ut/worker/test_model_runner_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_model_runner_v2.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls.<br><br>[vLLM
#58542](https://github.com/vllm-project/vllm/pull/58542) adds
`max_seq_len_np` for PP sampled-token broadcast handling. Present in
release batch state; absent from pinned main.<br><br>[vLLM
#58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) replaces the
legacy PCP helper with descriptor-based `partition_batch`, restores
auxiliary hidden states with sampling outputs, and renames the DCP
preparation helper.<br><br>[vLLM
#56456](https://github.com/vllm-project/vllm/pull/56456) adds trailing
`num_active_loras` to `prepare_inputs`, keeping dispatch and
fast-prefill graph/padding selection consistent.<br><br>[vLLM
#54335](https://github.com/vllm-project/vllm/pull/54335) routes
fixed-token scoring through the same unpadded logits path as prompt
logprobs, which is incompatible with Ascend lmhead-TP collective row
layouts.<br><br>[vLLM
#58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Cover release/main kwargs and PP fields, PD
graph reclassification, PCP auxiliary restoration and lmhead scoring
guards; update model-state fixtures. |
|
[`tests/ut/worker/test_model_runner_v2_encoder_decoder.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_model_runner_v2_encoder_decoder.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Update model-state length fixtures through
model configuration. |
|
[`tests/ut/worker/test_model_runner_v2_mamba.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_model_runner_v2_mamba.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400) |
Regress prompt-tail masks for FULL/NONE graph modes and zero/three draft
tokens; verify the original mask is unchanged. |
|
[`tests/ut/worker/test_pcp_manager_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_pcp_manager_v2.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635), [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) | Assert
descriptor-based partitioning and hidden/aux restore layout; update
AuxOutput fixture configuration. |
|
[`tests/ut/worker/test_v2_dummy_padding.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_v2_dummy_padding.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#58275](https://github.com/vllm-project/vllm/pull/58275)/[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) expose
`max_query_len`/`is_padding` on dummy batches and an explicit
query-length bound for autoregressive graph capture.<br><br>[vLLM
#58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Use the model-config-backed state/dummy
descriptor contract and retain graph-eligibility metadata. |
|
[`tests/ut/worker/v2/test_aclgraph.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/v2/test_aclgraph.py)
| [vLLM #57980](https://github.com/vllm-project/vllm/pull/57980), [vLLM
#58275](https://github.com/vllm-project/vllm/pull/58275) | Update
capture descriptors and dummy-batch keyword expectations. |
|
[`tests/ut/worker/v2/test_eplb_controller.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/v2/test_eplb_controller.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) | Cover
release state construction versus main in-place state/communicator
reuse. |
|
[`tests/ut/worker/v2/test_eplb_load_collection_phase.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/v2/test_eplb_load_collection_phase.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) | Match
each target's EPLB setup signature in load-collection fixtures. |

</details>

#### Local A3 nightly validation (2026-10-15; frozen head `444e962`)

These four model runs used **`444e962b239c3a8fc56b9255d601818e6e028b9a`
+ vLLM 0.31.0 (`db9527a`)**, which is also the restored PR head; the
deferred connector hardening is not included. Prefill 138 + Decode 136,
16 NPUs per node; original image, weights, datasets, launch and
benchmark parameters were retained, with only the second-node address
mapped from 139 to 136. All four cases exited pytest 0 on both nodes
(one passed JUnit case per node). OTT is output token/s; TPOT/TTFT are
ms.

| Case | Performance requests | OTT / required minimum | TPOT / TTFT |
AIME2025 accuracy | Result |
| --- | --- | --- | --- | --- | --- |
| Kimi-K2.6 PD | 60/60 | 355.1593 / 337.024075 | 20.5 / 3268.2 | 90%,
within 93.33±10 | Performance + accuracy passed |
| DeepSeek-V4 Flash PD-prefix | Accuracy only | N/A | N/A | 90%, within
90±10 | Accuracy passed |
| GLM-5.1 W8A8C8 128K | 256/256 | 811.7645 / 282.105876 | 39.8 / 32665.6
| No accuracy item | Performance passed |
| MiniMax-M2.7 PD-prefix | 160/160 | 711.0518 / 698.497 | 34.8 / 17438.2
| 90%, within 93.33±10 | Performance + accuracy passed |

All performance requests above, and the valid controls below, were
checked for actual 1024-token outputs, not just success flags.

**Conditional controls:** historical throughput differences triggered
only the affected performance cases against the same PR base `6d1dd70`,
without this PR, + vLLM 0.30.0 (`ced6857`). Kimi: 355.1593 vs 359.8514
OTT (**-1.30%**); the earlier 7.27% loss was not reproduced in this
comparison. TPOT was 20.5 vs 19.7ms (+0.8ms/+4.06%), and average request
latency +3.48%; a single pair does not establish latency equivalence or
a stable regression. GLM: 811.7645 vs 813.3506 OTT (**-0.20%**), TPOT
39.8 vs 39.4ms. Kimi's original random request pacing affects aggregate
OTT. No alternating reruns or unaffected-model 0.30 controls were added.

Archived evidence:
`main2main-nightly-20261013/pr18229-update-444e962-20261015/`
(`FINAL_REPORT.md`, per-node logs/JUnit, raw AISBench outputs,
token-count audit, controls and diagnostic evidence). Both nodes were
released after testing.

#### Deferred follow-up: multi-group receive-failure reporting (not
included)

The request-level receive-failure hardening change has been removed from
this upgrade PR; the branch is restored to the nightly-tested head
`444e962`. The original four nightlies already passed on this head
**without** that fix, so it is not required for these normal-path
workloads to pass.

The fault-path issue remains real: if a multi-group receive actually
fails, the existing connector can report flat block IDs and trigger the
vLLM 0.31 scheduler guard, terminating Decode EngineCore. This is
handled separately in
[#18823](https://github.com/vllm-project/vllm-ascend/pull/18823),
retaining ordinary non-HMA block-level recovery semantics. The upgrade
PR does not claim fault isolation is fixed.

Development fault-injection results belong to the deferred connector
implementation, not this restored head. No new NPU run was performed
when restoring the exact previously tested code.

#### Historical validation for head `23c8b15`

- New [E2E
workflow](https://github.com/vllm-project/vllm-ascend/actions/runs/38562748688)
and [Docs link
check](https://github.com/vllm-project/vllm-ascend/actions/runs/38562748395)
were triggered after the rebase. Results are pending; previous-head CI
does not validate this rebased head.
- A targeted [comment
command](https://github.com/vllm-project/vllm-ascend/pull/18229#issuecomment-6168149194)
requests `test_deepseek_v4_mtp_full_decode_only` against both supported
upstream targets. The [command
workflow](https://github.com/vllm-project/vllm-ascend/actions/runs/38562831465)
is queued; its actual test results remain pending.
- Ruff check and format check passed for all 72 changed Python files;
Python compilation and diff checks passed. Source-extracted execution of
both real CPP routing regressions passed against the required partition
signatures of the exact main/release refs. This validates dispatch
contracts with lightweight dependency stubs and does not replace full
pytest or NPU execution.
- Existing source-extracted scheduler regressions passed on both version
lanes: eight budget scenarios, two queue paths and empty/fully deferred
queue regressions, including negative controls.
- Local full pytest/Torch/NPU and `bash format.sh ci` remain unavailable
in this Windows environment. They require CI validation.
- Previous head `9330488` passed pre-commit, Docs and both CPU UT lanes
(main 10782 passed / 114 skipped; release 10784 passed / 112 skipped).
Its initial NPU matrix passed 41/42 shards; the remaining main A3 shard
failed in unchanged upstream teardown with `psutil.NoSuchProcess`,
before the MTP golden acceptance assertion. The consequent gate failure
and old-head rerun are historical evidence, not a result for the current
head.

#### Coverage limits and historical evidence

The PR CI selector scans `tests/ut` and `tests/e2e/pull_request`; the
new broadcast/strided token-logprob numerical tests under
`tests/e2e/nightly` are outside that selection. A5, standalone
upstream-worker and coverage-upload jobs were skipped in the inspected
run. Skips are not coverage. No dedicated packed-QK RoPE or V1
profiling-randomization standalone UT is added by this final diff.

Previous head `15f8a3d` passed
[E2E](https://github.com/vllm-project/vllm-ascend/actions/runs/38511018361)
and
[Docs](https://github.com/vllm-project/vllm-ascend/actions/runs/38511018193),
including 42 NPU jobs. Its PR-recorded CPU counts were 10574 passed /
113 skipped for verified main and 10576 passed / 111 skipped for
release, with no failures. Those counts belong to that historical head
and are not asserted as current-head counts.

- vLLM main:
https://github.com/vllm-project/vllm/commit/c4df37dfcc7f72ca41cd43801a468526ecf99a2b

---------

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
Co-authored-by: shenzhao <shenzhao9@huawei.com>
tangdafu pushed a commit to tangdafu/vllm-ascend that referenced this pull request Oct 16, 2026
…llm-project#18823)

### What this PR does / why we need it?

Report P2P Mooncake receive failures through
`KVConnectorTransferResults.failed_recving` when the logical cache has
multiple groups or requires HMA. Flat block IDs do not identify the
affected request across independent cache groups; vLLM 0.31 rejects such
reports and can terminate Decode EngineCore after a receive failure.

Preserve the existing block-level failure reporting and valid-prefix
recovery for ordinary non-HMA caches with one logical group. Select the
reporting mode from the logical cache configuration and HMA state
**before** registration expands `_is_hma_required` for group-aware wire
transfers: splitting one shared block table into several transfer groups
must not change its recovery semantics.

Retain each failed request until all local pull/reformat tasks have
finished, then return its failure together with receive completion.
Delegate the connector's `get_transfer_results()` to the worker so
upstream receives the failure IDs; keep the legacy `get_finished()`
tuple API available. No scheduler changes are needed.

This follows the request-level HMA / block-level non-HMA split in
[upstream vLLM #56855](vllm-project/vllm#56855),
with an explicit check for multiple logical groups to satisfy the 0.31
scheduler guard. This is a separate fix from the release upgrade in
vllm-project#18229 and applies on the current Ascend main base.

### Does this PR introduce _any_ user-facing change?

On the affected asynchronous receive-failure path, upstream can apply
the configured `fail` or `recompute` policy to the request instead of
rejecting an ambiguous block-level report. Successful transfers and
ordinary non-HMA single-group block-level recovery retain their existing
behavior. This does not repair transport/backend configuration problems.

### How was this patch tested?

CPU validation in an isolated A3-host container with no NPU device
mappings and no network:

```bash
python -m pytest -q --tb=short \
  tests/ut/distributed/kv_transfer/kv_p2p/test_mooncake_connector.py \
  tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py \
  tests/ut/kv_offload
bash format.sh ci
```

- Before rebase, the two connector/lifecycle target suites: **192
passed, 14 skipped on each** of verified vLLM main `c4df37d`, vLLM
0.31.0 `db9527a`, and vLLM 0.30.0 `ced6857`. The 0.30 source checkout
uses `VLLM_VERSION=0.30.0` because its generated `_version.py` is
absent.
- After rebase onto Ascend main
`8a8e1e05ecb64a30804c99c8f362909f9a0cb5bf` (including the 0.31.0
upgrade), the connector/lifecycle suites plus all of
`tests/ut/kv_offload`: **1125 passed, 14 skipped per lane**, on verified
vLLM main `c4df37d` and vLLM 0.31.0 `db9527a`.
- Fixed the four CI failures by adding the missing error-mode fields to
two existing test fixtures that use `__new__` and bypass constructors
(two initialization lines). Adapted existing failure-state and
worker-polling tests; **no new test functions or parametrized cases**.
Existing block-error and real descriptor-to-transfer CPU tests remain
enabled.
- Additional submission-time runtime checks, kept outside the PR: eight
layout/HMA combinations per version, checking deferred failure draining,
completed/failed receive propagation, preservation of non-HMA invalid
block IDs, and independence from the transfer-only HMA flag.
- Full `bash format.sh ci` and `git diff --check` passed.
- No NPU model/fault-injection rerun for this final conditional variant;
the 14 existing skips and the mocked CPU transport are not end-to-end
NPU coverage.

- vLLM main:
vllm-project/vllm@c4df37d

---------

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
tangdafu pushed a commit to tangdafu/vllm-ascend that referenced this pull request Oct 16, 2026
…ject#18919)

### What this PR does / why we need it?

Restore the Ascend V1 pipeline-parallel + async-scheduling configuration
after the vLLM 0.30 to 0.31 upgrade in vllm-project#18229. The main A3 nightly
GLM-5.3 PP/PD case fails before engine startup with `Model Runner V1
does not support: pipeline parallelism with async scheduling` ([job and
logs](https://github.com/vllm-project/vllm-ascend/actions/runs/38810262248/job/116684874311)).
The service log, rather than the external-DP wrapper error, identifies
this as the first failure.

vLLM 0.31 adds a GPU V1 restriction associated with upstream issue
vllm-project/vllm#45014. Ascend has its own PP communication/scheduler
adaptations. Extend the existing Ascend V1 feature allowlist for this
configuration and preserve unrelated restrictions. Add native-helper
regression coverage for PP1/PP2, sync/async, and PCP rejection; document
the compatibility patch and its removal plan.

### Does this PR introduce _any_ user-facing change?

V1 PP+async configurations can pass configuration validation again.
Runner selection, async scheduling settings, and other
unsupported-feature checks are unchanged.

### How was this patch tested?

- **Regression tests:** `pytest -q
--confcutdir=<isolated-test-directory>
test_patch_use_v2_model_runner.py` against native vLLM 0.31 on A3.
Original module: **2 failed, 13 passed**. An isolated overlay replacing
only `patch_use_v2_model_runner.py`: **15 passed**. The tests call the
real upstream helper/validator, with a minimal configuration object;
unrelated PCP rejection remains active.
- **Version boundary:** execute the unmodified
`_get_v1_model_runner_unsupported_features` functions from vLLM
`ced6857afa0ea7b2e3f0846a62e1394e90f15607` (0.30) and
`db9527a46873454610df6dbedf79a36d6bf1a7f6` (0.31) with the same
PP2/async configuration. Results: `[]` versus `["pipeline parallelism
with async scheduling"]`. This isolates the specific validation
regression; it is not a full-model pre/post-upgrade accuracy comparison.
- **Real A3, reduced runtime validation:** Qwen3-8B BF16, TP1/PP2, V1,
multiprocessing spawn, eager, max model length 2048, max sequences 8,
seed 42. Same machine/container/weights/parameters; baseline fails with
the nightly's exact validation error. With the actual changed module
loaded in all subprocesses, **8 ordinary requests + 4 JSON-schema
requests complete**, exit 0. A sync control also completes 12 requests.
All 4 JSON results/token sequences match. Ordinary greedy token
sequences match for **5/8** requests; the sync control itself also
differs between a repeated prompt, so **numerical equivalence is not
established**. Both controls show forced EngineCore teardown at
interpreter shutdown; no request execution failure was observed.
- **Runtime provenance:** vLLM 0.31.0, Ascend `0.31.0.dev0+pr444e962`,
CANN 9.2.0 (V100R001C12SPC001B234), torch 2.10.0+cpu, torch_npu
2.10.0.post7; existing A3 image
`sha256:0128555151f021ffe68f7ca5f824d9b0995f943f2753aff63313a63841d2aeba`.
This is a reduced validation environment, not the exact nightly image or
four-node GLM topology. Tested changed-module SHA256:
`02cfd08bb8a1f67320e86d0798c4c8fcd2fa8ed4e37a7e82606ace2b14f56033`.
- **Checks:** Ruff check/format, codespell, clang-format, markdownlint,
package-init, forbidden imports, boolean-context checks, manual
logger/long-function/symbolic-meta checks, and `git diff --check` pass.
Full `bash format.sh ci` **did not pass** locally: Go bootstrap stalled;
a subsequent partial run skipped actionlint/Gitleaks and exposed Windows
typos-path, shellcheck, `/bin/bash`, and `python3` execution
limitations. Required complete CI remains pending.
- **Draft / remaining validation:** original GLM-5.3 W8A8C8 four-node
PP+PD nightly, longer/mixed structured-output loads, and accuracy
coverage remain unverified. Do not interpret this PR as a passing full
nightly result. No CI rerun or large workflow dispatch was requested by
this investigation.

---

### Checklist

- [x] Boundary and error paths: PP1/PP2, async on/off, unrelated PCP
rejection.
- [x] Regression test fails before the fix.
- [x] Reduced NPU execution recorded with its limitations.
- [ ] Original multi-node nightly and full accuracy validation.
- [ ] Complete required CI checks.

- vLLM main:
vllm-project/vllm@c4df37d

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
tangdafu pushed a commit to tangdafu/vllm-ascend that referenced this pull request Oct 20, 2026
…tibility (vllm-project#18229)

### What this PR does / why we need it?

Upgrade the release dependency from vLLM v0.30.0 to
[v0.31.0](https://github.com/vllm-project/vllm/commit/db9527a46873454610df6dbedf79a36d6bf1a7f6)
while keeping the independently supported verified-main target at
[c4df37d](https://github.com/vllm-project/vllm/commit/c4df37dfcc7f72ca41cd43801a468526ecf99a2b).
Rebase on latest Ascend main `c2382c6`, preserving the CPP profiling
changes from #18622. The file mapping below describes the diff for
`23c8b15` against `c2382c6`.

The two targets have different APIs despite both being supported: retain
version-dependent forwarding for profiling randomization, PP batch
lengths, Mamba allocation, EPLB setup and encoder-only prefill
admission. Remove obsolete 0.30 branches only where both targets now
share the contract.

| Contract | Verified main `c4df37d` | Release v0.31.0 `db9527a` |
| --- | --- | --- |
| Profiling | Parent calls omit `randomize_inputs` | Forward the flag
through V1/V2/310P and MC2 |
| PP batch state | No `max_seq_len_np` | Preserve the field in
`AscendInputBatch` |
| Mamba allocation | Parent has no `prefill_end` | Forward checkpoint
boundary |
| EPLB setup | Update existing state/communicator | Construct state from
model and mapping |
| Non-chunked prefill | Keep encoder-only budget exception | Keep
release budget rejection |

#### Changes organized by downstream file

Upstream links identify the reason or contract being adapted. For
existing main behavior that becomes common to both targets, the change
is removal of the old release branch, not a new port of the complete
upstream implementation. File links are pinned to this PR head; [the
complete fixed
diff](https://github.com/vllm-project/vllm-ascend/compare/c2382c67aa6be12f1c822733cd47d021f61b0b23...23c8b15c2709978463490b0e8531bf5f9f27b9c1)
shows the exact edits.

<details>
<summary>Dependency markers, images and documentation (13
files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`.github/vllm-release-tag.commit`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/.github/vllm-release-tag.commit)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Advance the release marker
to `v0.31.0`; leave the verified-main marker at `c4df37d`. |
|
[`Dockerfile`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.310p`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.310p)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.310p.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.310p.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a3`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a3)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a3.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a3.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a5`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a5)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.a5.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.a5.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`Dockerfile.openEuler`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/Dockerfile.openEuler)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Set the release `VLLM_TAG`
default to `v0.31.0`; existing built images are not changed by this
default. |
|
[`README.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/README.md)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Update the release CI
support version to 0.31.0. |
|
[`README.zh.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/README.zh.md)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Update the Chinese release
CI support version to 0.31.0. |
|
[`docs/source/tutorials/models/DeepSeek-V4.1-Flash.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/docs/source/tutorials/models/DeepSeek-V4.1-Flash.md)
| Release target advances to
[v0.31.0](https://github.com/vllm-project/vllm/releases/tag/v0.31.0);
verified main remains pinned independently. | Use separate release and
verified-main marker commands for the two build targets. |
|
[`vllm_ascend/ops/triton/docs/v2/spec_decode/prepare_dflash_inputs.md`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/triton/docs/v2/spec_decode/prepare_dflash_inputs.md)
| [vLLM #57632](https://github.com/vllm-project/vllm/pull/57632) passes
`precompute_context_kv` into DFlash FULL-graph capture; wrapped draft
models must expose the underlying callback. | Update the documented
DFlash ABI version to 0.31.0; no new kernel behavior is introduced by
this document change. |

</details>

<details>
<summary>Model runners, graphs and platform integration (14
files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/_310p/model_runner_310p.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/model_runner_310p.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls. | Forward the profiling randomization flag through the 310P V1
override to the NPU V1 runner. |
|
[`vllm_ascend/_310p/worker/v2/model_runner.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/worker/v2/model_runner.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls.<br><br>[vLLM
#58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#56456](https://github.com/vllm-project/vllm/pull/56456) adds trailing
`num_active_loras` to `prepare_inputs`, keeping dispatch and
fast-prefill graph/padding selection consistent. | Forward release-only
randomization; accept `num_active_loras` in the common prepare
signature, use the shared PCP/input-batch contract and compute complete
prompt-tail/decode-graph metadata in CPU input preparation. |
|
[`vllm_ascend/_310p/worker/v2/sampler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/worker/v2/sampler.py)
| [vLLM #56497](https://github.com/vllm-project/vllm/pull/56497)
introduces V2 `LogitsContext` and custom logits-processor lifecycle;
`Sampler.add_request` no longer takes `prompt_len`. | Adopt
`add_request(req_idx, sampling_params)` and remove the legacy
prompt-length argument; retain the 310P CPU generator/sampling
implementation. |
|
[`vllm_ascend/attention/attention_v1.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/attention/attention_v1.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility. | Remove the 0.30 condition around
V2 speculative-padding handling while retaining actual prefill/decode
metadata semantics. |
|
[`vllm_ascend/patch/worker/patch_v2/patch_model_runner.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/worker/patch_v2/patch_model_runner.py)
| [vLLM #56723](https://github.com/vllm-project/vllm/pull/56723) adds
`dcp_sharded` to distinguish sharded attention KV from replicated
Mamba/GDN state when target DCP and DCP=1 draft coexist.<br><br>[vLLM
#45635](https://github.com/vllm-project/vllm/pull/45635) moves
routed-expert output to `AuxOutputConfig`/the AuxOutput connector; [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) removes the
legacy runner initialization keyword. | Read `dcp_sharded` from cache
specs and forward it to block tables; initialize the AuxOutput connector
from `aux_output_config.enabled`; drop the legacy `attn_cg_support`
keyword. |
|
[`vllm_ascend/platform.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/platform.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635) moves
routed-expert output to `AuxOutputConfig`/the AuxOutput connector; [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) removes the
legacy runner initialization keyword. | Apply the existing V1 AuxOutput
configuration guard to both targets, removing the old 0.30 early return.
|
|
[`vllm_ascend/worker/model_runner_v1.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/model_runner_v1.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls. | Accept `randomize_inputs` in profiling/dummy execution and
enter `maybe_randomize_inputs` inside forward context when requested;
preserve the Ascend execution path. |
|
[`vllm_ascend/worker/v2/aclgraph_utils.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/aclgraph_utils.py)
| [vLLM #57980](https://github.com/vllm-project/vllm/pull/57980)
replaces the legacy PCP helper with descriptor-based `partition_batch`,
restores auxiliary hidden states with sampling outputs, and renames the
DCP preparation helper.<br><br>[vLLM
#57632](https://github.com/vllm-project/vllm/pull/57632) passes
`precompute_context_kv` into DFlash FULL-graph capture; wrapped draft
models must expose the underlying callback. | Use
`prepare_dcp_local_seq_lens`; delegate model-wrapper attribute lookup to
the original model so DFlash context-KV callbacks remain accessible. |
|
[`vllm_ascend/worker/v2/input_batch.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/input_batch.py)
| [vLLM #58275](https://github.com/vllm-project/vllm/pull/58275)/[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) expose
`max_query_len`/`is_padding` on dummy batches and an explicit
query-length bound for autoregressive graph capture. | Always retain
prompt-tail and graph-eligibility fields and forward dummy-batch
`max_query_len`/`is_padding`; remove obsolete 0.30 branches. |
|
[`vllm_ascend/worker/v2/model_runner.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/model_runner.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls.<br><br>[vLLM
#58542](https://github.com/vllm-project/vllm/pull/58542) adds
`max_seq_len_np` for PP sampled-token broadcast handling. Present in
release batch state; absent from pinned main.<br><br>[vLLM
#58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) replaces the
legacy PCP helper with descriptor-based `partition_batch`, restores
auxiliary hidden states with sampling outputs, and renames the DCP
preparation helper.<br><br>[vLLM
#56456](https://github.com/vllm-project/vllm/pull/56456) adds trailing
`num_active_loras` to `prepare_inputs`, keeping dispatch and
fast-prefill graph/padding selection consistent.<br><br>[vLLM
#54335](https://github.com/vllm-project/vllm/pull/54335) routes
fixed-token scoring through the same unpadded logits path as prompt
logprobs, which is incompatible with Ascend lmhead-TP collective row
layouts. | Use release-only kwargs for profiling/execute and MC2 dummy
execution; forward release-only `max_seq_len_np`. After PD request
reclassification, recompute `has_prefill`, decode-graph eligibility and
uniform token count. Accept `num_active_loras` in the common prepare
signature without adding FastPrefillHelper behavior. Use
descriptor-based PCP partitioning and restore auxiliary states before
replicated drafting. Extend the lmhead-TP guard to fixed-token scoring,
tolerating workers without `token_id_scores`. |
|
[`vllm_ascend/worker/v2/model_states/mamba_hybrid.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/model_states/mamba_hybrid.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400)
requires decode-like prompt tails to use decode-row Mamba metadata for
speculative rollback. | Build a local mask `is_prefilling_np &
~prefill_runs_as_decode_np` so prompt tails are decode rows; do not
mutate the batch's original prefill mask. |
|
[`vllm_ascend/worker/v2/pcp_manager.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/pcp_manager.py)
| [vLLM #57980](https://github.com/vllm-project/vllm/pull/57980)
replaces the legacy PCP helper with descriptor-based `partition_batch`,
restores auxiliary hidden states with sampling outputs, and renames the
DCP preparation helper. | Unify descriptor-based partitioning, including
CPP profile capture after #18622, and the `(batch, hidden, aux)`
sampling restore contract; restore and trim auxiliary states together
with hidden states to the unpadded global token extent. |
|
[`vllm_ascend/worker/v2/spec_decode/autoregressive/aclgraph.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/spec_decode/autoregressive/aclgraph.py)
| [vLLM #58275](https://github.com/vllm-project/vllm/pull/58275)/[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) expose
`max_query_len`/`is_padding` on dummy batches and an explicit
query-length bound for autoregressive graph capture. | Always pass
`desc.max_query_len or desc.uniform_token_count` to autoregressive
capture. |
|
[`vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py)
| [vLLM #57632](https://github.com/vllm-project/vllm/pull/57632) passes
`precompute_context_kv` into DFlash FULL-graph capture; wrapped draft
models must expose the underlying callback. | Always receive and forward
`precompute_context_kv` under the Ascend communicator/model-capture
wrappers. |

</details>

<details>
<summary>KV allocation and block tables (6 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/_310p/worker/v2/block_table.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/_310p/worker/v2/block_table.py)
| [vLLM #56723](https://github.com/vllm-project/vllm/pull/56723) adds
`dcp_sharded` to distinguish sharded attention KV from replicated
Mamba/GDN state when target DCP and DCP=1 draft coexist.<br><br>[vLLM
#56734](https://github.com/vllm-project/vllm/pull/56734) uses
`idx_mapping=-1` for dummy draft/padding requests and masks their
persistent block-table reads to avoid stale-row KV writes. | Unify the
constructor with `dcp_sharded`; skip negative request indices and retain
PAD slots in the CPU mapping path. Keep the existing CP=1 restriction
and persistent CPU/device buffers. |
|
[`vllm_ascend/models/glm5next/kv_cache.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/models/glm5next/kv_cache.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) adds
`prefill_end` to Mamba checkpoint allocation, including prompt-end
retention. Release has the new signature; pinned main has the old one. |
Accept `prefill_end` for call compatibility; keep one private Kpool tail
block per request. |
|
[`vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py)
| [vLLM #56734](https://github.com/vllm-project/vllm/pull/56734) uses
`idx_mapping=-1` for dummy draft/padding requests and masks their
persistent block-table reads to avoid stale-row KV writes. | Unify the
slot-mapping kernel, mask block-table loads with `is_real_req`, and emit
PAD for dummy rows; retain Ascend block/window and address-calculation
behavior. |
|
[`vllm_ascend/patch/platform/patch_kv_cache_utils.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/platform/patch_kv_cache_utils.py)
| The pinned `_annotate_eagle_groups` contract uses
`use_trailing_layer_fallback`, replacing the DeepSeek-V4-specific
fallback keyword; the introducing PR was not independently identified.
Fixed contracts: [release:
kv_cache_utils.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/kv_cache_utils.py#L2170).
| Always pass `use_trailing_layer_fallback=True`; retain existing Ascend
cache grouping/annotation behavior. |
|
[`vllm_ascend/patch/platform/patch_mamba_manager.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/platform/patch_mamba_manager.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) adds
`prefill_end` to Mamba checkpoint allocation, including prompt-end
retention. Release has the new signature; pinned main has the old one. |
Accept `prefill_end`, forwarding it only to the release parent while
retaining the existing Ascend allocation logic. |
|
[`vllm_ascend/worker/v2/block_table.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/block_table.py)
| [vLLM #56723](https://github.com/vllm-project/vllm/pull/56723) adds
`dcp_sharded` to distinguish sharded attention KV from replicated
Mamba/GDN state when target DCP and DCP=1 draft coexist. | Use one
constructor with optional per-group `dcp_sharded` validation/forwarding;
retain Ascend int32 slot mappings. |

</details>

<details>
<summary>Schedulers and profiling (5 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/core/dyntra_lb_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/core/dyntra_lb_scheduler.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses
`_handle_blocked_waiting_request`.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#58259](https://github.com/vllm-project/vllm/pull/58259) define the
upstream resumable-session queue/handoff lifecycle: stopping a turn can
re-enqueue buffered continuation input.<br><br>Both targets admit
against `max_num_active_reqs` and include parked streaming sessions in
occupied slots; related queue/Elastic-EP changes are [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#53934](https://github.com/vllm-project/vllm/pull/53934). Fixed
contracts: [release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L127),
[release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L892).
| Use KV-holder-first queue selection/re-enqueueing, the common
blocked-request helper, deferred bookkeeping and active-slot admission
including parked streams. Preserve the main-only encoder exception.
Remove secondary stop cleanup so upstream can retain/re-enqueue
resumable continuations. |
|
[`vllm_ascend/core/recompute_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/core/recompute_scheduler.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses
`_handle_blocked_waiting_request`.<br><br>Both targets admit against
`max_num_active_reqs` and include parked streaming sessions in occupied
slots; related queue/Elastic-EP changes are [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#53934](https://github.com/vllm-project/vllm/pull/53934). Fixed
contracts: [release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L127),
[release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L892).
| Fold the legacy queues into the common KV-holder/deferred path, count
parked streams for active admission, and preserve the version-dependent
encoder condition. Remove the redundant remote-KV waiting debug log as a
local cleanup. |
|
[`vllm_ascend/core/scheduler_profiling_chunk.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/core/scheduler_profiling_chunk.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses
`_handle_blocked_waiting_request`.<br><br>Both targets admit against
`max_num_active_reqs` and include parked streaming sessions in occupied
slots; related queue/Elastic-EP changes are [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) and [vLLM
#53934](https://github.com/vllm-project/vllm/pull/53934). Fixed
contracts: [release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L127),
[release:
scheduler.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/sched/scheduler.py#L892).
| Use the common blocked-request/queue lifecycle, active admission
including parked streams, and the version-dependent encoder budget
condition. |
|
[`vllm_ascend/patch/platform/patch_balance_schedule.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/platform/patch_balance_schedule.py)
| [vLLM #59029](https://github.com/vllm-project/vllm/pull/59029) gives
main an encoder-only exception to the non-chunked prefill budget check;
release keeps the budget rejection condition.<br><br>[vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) replaces
`skipped_waiting` with `kv_holding_waiting` and `deferred_waiting`,
prioritizes KV holders, and uses `_handle_blocked_waiting_request`. |
Fold six obsolete 0.30 queue branches and add the release/main encoder
budget condition. Document the shared `if not request_queue`
drained-queue guard. Retain baseline balancing, running-only DP
snapshots/admission accounting and connector-snapshot cleanup; complete
upstream schedule synchronization is outside this patch. |
|
[`vllm_ascend/profiling_config.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/profiling_config.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947)
replaces `skipped_waiting` with `kv_holding_waiting` and
`deferred_waiting`, prioritizes KV holders, and uses
`_handle_blocked_waiting_request`. | Retarget the profiling wrapper from
the old blocked-status promotion helper to
`_handle_blocked_waiting_request`. |

</details>

<details>
<summary>EPLB state and routing (2 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/distributed/eplb/eplb_state.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/distributed/eplb/eplb_state.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) changes
main's EPLB setup to update existing state and reuse its communicator.
Release still creates state from `(model, model_config, mapping)`. |
After the parent's `update_mapping`, refresh Ascend replica routing
tables; consistently resolve an unspecified NPU device index to the
current device. |
|
[`vllm_ascend/worker/v2/eplb.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/eplb.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) changes
main's EPLB setup to update existing state and reuse its communicator.
Release still creates state from `(model, model_config, mapping)`. |
Create `AscendEplbState` on release with the current policy/optional
expert arguments; call the main parent to update the existing state and
communicator. |

</details>

<details>
<summary>Models and MoE operators (6 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/models/kimi_k3.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/models/kimi_k3.py)
| [vLLM #50592](https://github.com/vllm-project/vllm/pull/50592)/[vLLM
#50593](https://github.com/vllm-project/vllm/pull/50593) use
`prefix_delta` and the three-value AttnRes layer contract instead of the
old prepared-input/deferred-MLP contract. | Remove old layer/model
contracts, propagate `prefix_delta` and return the three-value AttnRes
state; preserve Ascend fused operations, DSpark aux selection and SP/PP
transport/output boundaries. |
|
[`vllm_ascend/ops/fused_moe/gate_linear.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/fused_moe/gate_linear.py)
| [vLLM #58234](https://github.com/vllm-project/vllm/pull/58234) unifies
MoE gate layers under `GateLinear` with the current linear constructor
and replaces Step3.5's dedicated FP32 gate class. | Use the current
constructor parameters (`skip_bias_add`, `quant_config`, `return_bias`)
and retain BF16-to-FP32 gate/fallback semantics. CRLF-to-LF
normalization contributes to the large line diff. |
|
[`vllm_ascend/ops/fused_moe/router/grouped_topk_router.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/ops/fused_moe/router/grouped_topk_router.py)
| [vLLM #58880](https://github.com/vllm-project/vllm/pull/58880) removes
`routed_scaling_factor` from routing-method classification, allowing
MiniMax classification with non-unit scaling. | Stop passing
`routed_scaling_factor` to classification; downstream routing-weight
scaling is retained. |
|
[`vllm_ascend/patch/__init__.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/__init__.py)
| The release target is 0.31.0; [vLLM
#56994](https://github.com/vllm-project/vllm/pull/56994) is context for
the retained GLM reasoning patch comment, not a new model capability in
this PR. | Update only the supported-version comment for the retained
GLM reasoning patch. |
|
[`vllm_ascend/patch/worker/patch_step3p5.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/worker/patch_step3p5.py)
| [vLLM #58234](https://github.com/vllm-project/vllm/pull/58234) unifies
MoE gate layers under `GateLinear` with the current linear constructor
and replaces Step3.5's dedicated FP32 gate class. | Always use
`GateLinear` with FP32 parameter/output types instead of the legacy
FP32ReplicatedLinear branch. |

</details>

<details>
<summary>Token scoring and Triton helpers (2 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`vllm_ascend/patch/worker/patch_triton.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/patch/worker/patch_triton.py)
| [vLLM #58651](https://github.com/vllm-project/vllm/pull/58651) uses
`triton.next_power_of_2` in packed-QK RoPE constexpr evaluation; the
Ascend replacement must also satisfy the installed Triton
JIT/constexpr-function contract. | Use a constexpr-aware
`next_power_of_2` replacement; register with `triton.constexpr_function`
when available, otherwise unwrap `tl.constexpr.value` in the fallback. |
|
[`vllm_ascend/worker/v2/sample/logprob.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/vllm_ascend/worker/v2/sample/logprob.py)
| [vLLM #54335](https://github.com/vllm-project/vllm/pull/54335) adds
fixed-token prompt scoring and broadcasts candidate IDs with `expand`;
the token-ID row stride can be zero or non-contiguous. | Pass
`token_ids.stride(0)` into the Triton kernel and use it for row
addressing; support broadcast stride zero and strided candidate IDs. |

</details>

BalanceScheduler scope: this PR folds the old queue branches and adapts
encoder-only admission. Its baseline DP balancing, running-only
snapshot/accounting and connector-snapshot cleanup remain; complete
scheduler-body synchronization and a strict AST equivalence requirement
are deferred. The baseline drift guard may skip and does not prove
complete upstream equivalence.

### Does this PR introduce _any_ user-facing change?

The default release dependency becomes vLLM v0.31.0; the verified-main
pin remains unchanged. Fixed-token prompt scoring handles
broadcast/strided IDs correctly and reports an explicit error when used
with unsupported lmhead TP. Resumable Dyntra continuations retain
upstream stop/queue behavior, and PD prompt-tail graph/Mamba metadata
follow the supported upstream contracts.

### How was this patch tested?

#### Test changes organized by file

The table describes test intent and fixture changes; it does not claim
that every changed test was selected or executed on NPU hardware.

<details>
<summary>Unit, PR E2E and nightly test mapping (37 files)</summary>

| Downstream file | Upstream change / contract | Ascend adaptation |
| --- | --- | --- |
|
[`tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_compute_token_logprobs.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_compute_token_logprobs.py)
| [vLLM #54335](https://github.com/vllm-project/vllm/pull/54335) | Add
NPU numerical comparisons for broadcast stride=0 and sliced stride=8
token IDs; outside the PR CI selector. |
|
[`tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_num_nans.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/nightly/single_node/ops/singlecard_ops/triton/test_num_nans.py)
| Release-version cleanup; no new upstream behavior. | Update the
default version label to 0.31.0; no algorithm change. |
|
[`tests/e2e/pull_request/four_card/test_kimi_k3.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/pull_request/four_card/test_kimi_k3.py)
| [vLLM #54222](https://github.com/vllm-project/vllm/pull/54222) | Check
equality between P-worker `remote_prefill_cached_tokens` and the
response cache count; zero hits are valid for a new prompt. |
|
[`tests/e2e/pull_request/one_card/test_model_runner_v1_with_device.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/pull_request/one_card/test_model_runner_v1_with_device.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635), [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) | Use the
common AuxOutput configuration object in V1 guard fixtures. |
|
[`tests/e2e/pull_request/one_card/test_thinking_budget.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/e2e/pull_request/one_card/test_thinking_budget.py)
| [vLLM #56497](https://github.com/vllm-project/vllm/pull/56497) |
Construct `LogitsContext` with expanded mapping, input IDs, positions
and sequence bounds; call `apply(logits, ctx)`. |
|
[`tests/ut/_310p/test_model_runner_v2_310p.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/_310p/test_model_runner_v2_310p.py)
| [vLLM #56456](https://github.com/vllm-project/vllm/pull/56456), [vLLM
#56497](https://github.com/vllm-project/vllm/pull/56497) | Use the
current sampler request signature and pass the added prepare-input LoRA
argument in 310P fixtures. |
|
[`tests/ut/attention/test_mla_cp.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/attention/test_mla_cp.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Mock `get_dcp_world_size_and_rank` and
remove legacy DCP group fixture branching. |
|
[`tests/ut/core/test_circular_buffer.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_circular_buffer.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Pass `replay_boundaries=[tokens-1]` to the current cache-block API. |
|
[`tests/ut/core/test_dyntra_lb_recompute_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_dyntra_lb_recompute_scheduler.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947) | Use
the shared KV-holder/deferred queue interfaces in Dyntra/recompute
fixtures. |
|
[`tests/ut/core/test_dyntra_lb_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_dyntra_lb_scheduler.py)
| [vLLM #58259](https://github.com/vllm-project/vllm/pull/58259), [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) | Regress
synchronous/asynchronous resumable continuation handling for running,
paused and preempted requests, buffered/unbuffered input, and final
cleanup; update queue seams. |
|
[`tests/ut/core/test_profiling_chunk.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_profiling_chunk.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934), [vLLM
#58947](https://github.com/vllm-project/vllm/pull/58947) | Update queue
fixtures/blocked-request helper and active-request capacity field. |
|
[`tests/ut/core/test_recompute_scheduler.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_recompute_scheduler.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947) |
Remove legacy queue branching and use the shared blocked-request seam. |
|
[`tests/ut/core/test_scheduler_connector_block_state.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/core/test_scheduler_connector_block_state.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947), [vLLM
#59029](https://github.com/vllm-project/vllm/pull/59029) | Supply the
baseline `balance_queue` fixture; connector-snapshot cleanup itself
predates this change. |
|
[`tests/ut/distributed/eplb/test_state.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/distributed/eplb/test_state.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) |
Verify mapping updates refresh Ascend routing tables. |
|
[`tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947) | Use
the shared queue lifecycle rather than version-specific skipped-waiting
fixtures. |
|
[`tests/ut/kv_offload/test_preempt_offload_connector.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/kv_offload/test_preempt_offload_connector.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Always provide prefix replay and request token-count fields in the
offload fixture. |
|
[`tests/ut/models/test_deepseek_v41_release_config.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_deepseek_v41_release_config.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Assert obsolete flattened multimodal-prefix flags are absent after
architecture conversion. |
|
[`tests/ut/models/test_glm5next_kv_cache.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_glm5next_kv_cache.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) | Pass
the new allocation argument while checking the private-tail block
policy. |
|
[`tests/ut/models/test_kimi_k3_adapter.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_kimi_k3_adapter.py)
| [vLLM #50592](https://github.com/vllm-project/vllm/pull/50592), [vLLM
#50593](https://github.com/vllm-project/vllm/pull/50593) | Update layer
signatures/three-value returns, auxiliary output expectations and
AST-extracted fixtures. |
|
[`tests/ut/models/test_kimi_k3_pp_sp.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/models/test_kimi_k3_pp_sp.py)
| [vLLM #50592](https://github.com/vllm-project/vllm/pull/50592), [vLLM
#50593](https://github.com/vllm-project/vllm/pull/50593) | Use the
common Kimi AttnRes contract in PP/SP checks. |
|
[`tests/ut/patch/platform/test_patch_balance_schedule.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/patch/platform/test_patch_balance_schedule.py)
| [vLLM #58947](https://github.com/vllm-project/vllm/pull/58947), [vLLM
#59029](https://github.com/vllm-project/vllm/pull/59029) | Use common
queue fixtures; add eight encoder/chunked/prompt-budget cases and
empty/fully deferred queue regressions with/without KV blocks. Correct
the structural guard assertion to `if not request_queue`. Keep the
baseline AST drift check, which can skip. |
|
[`tests/ut/patch/platform/test_patch_engram_config.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/patch/platform/test_patch_engram_config.py)
| Pinned cache allocation requires replay boundaries ([vLLM
#58368](https://github.com/vllm-project/vllm/pull/58368)); DeepSeek-V4.1
architecture metadata and Engram configuration ([vLLM
#56214](https://github.com/vllm-project/vllm/pull/56214)) use their
current configuration contracts. Individual configuration migrations are
linked to fixed source where not precisely attributed. Fixed contracts:
[release:
single_type_kv_cache_manager.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/v1/core/single_type_kv_cache_manager.py#L482),
[release:
model_arch.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/model_arch.py#L59),
[release:
engram.py](https://github.com/vllm-project/vllm/blob/db9527a46873454610df6dbedf79a36d6bf1a7f6/vllm/config/engram.py#L89).
| Expect shared-memory default resolution for this supported fixture
configuration; no universal shared-memory default is claimed. |
|
[`tests/ut/patch/platform/test_prefix_cache_cp_patches.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/patch/platform/test_prefix_cache_cp_patches.py)
| [vLLM #59175](https://github.com/vllm-project/vllm/pull/59175) |
Supply an explicit `prefill_end` allocation boundary. |
|
[`tests/ut/spec_decode/test_eagle_proposer.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/spec_decode/test_eagle_proposer.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Use the current model-config multimodal
capability interface and remove obsolete skips/branches. |
|
[`tests/ut/spec_decode/test_mla_dspark.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/spec_decode/test_mla_dspark.py)
| [vLLM #57632](https://github.com/vllm-project/vllm/pull/57632) |
Assert DFlash context-KV callback forwarding and the shared capture
signature. |
|
[`tests/ut/test_minimax_m3_kv_block_size.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/test_minimax_m3_kv_block_size.py)
| Release-version cleanup; no new upstream behavior. | Remove only an
unused version-helper import. |
|
[`tests/ut/test_platform.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/test_platform.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635), [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) | Use the
current AuxOutput configuration guard for both target versions. |
|
[`tests/ut/worker/test_attn_utils_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_attn_utils_v2.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Initialize `model_state.model_config`
instead of assigning the read-only length property. |
|
[`tests/ut/worker/test_dcp_speculator_metadata_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_dcp_speculator_metadata_v2.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Assert prefill metadata over the padded
request extent. |
|
[`tests/ut/worker/test_model_runner_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_model_runner_v2.py)
| [vLLM #58411](https://github.com/vllm-project/vllm/pull/58411) adds
`randomize_inputs` for memory profiling to avoid all-zero MoE input
concentration. Present in release; absent from the pinned-main parent
calls.<br><br>[vLLM
#58542](https://github.com/vllm-project/vllm/pull/58542) adds
`max_seq_len_np` for PP sampled-token broadcast handling. Present in
release batch state; absent from pinned main.<br><br>[vLLM
#58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) replaces the
legacy PCP helper with descriptor-based `partition_batch`, restores
auxiliary hidden states with sampling outputs, and renames the DCP
preparation helper.<br><br>[vLLM
#56456](https://github.com/vllm-project/vllm/pull/56456) adds trailing
`num_active_loras` to `prepare_inputs`, keeping dispatch and
fast-prefill graph/padding selection consistent.<br><br>[vLLM
#54335](https://github.com/vllm-project/vllm/pull/54335) routes
fixed-token scoring through the same unpadded logits path as prompt
logprobs, which is incompatible with Ascend lmhead-TP collective row
layouts.<br><br>[vLLM
#58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Cover release/main kwargs and PP fields, PD
graph reclassification, PCP auxiliary restoration and lmhead scoring
guards; update model-state fixtures. |
|
[`tests/ut/worker/test_model_runner_v2_encoder_decoder.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_model_runner_v2_encoder_decoder.py)
| [vLLM #58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Update model-state length fixtures through
model configuration. |
|
[`tests/ut/worker/test_model_runner_v2_mamba.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_model_runner_v2_mamba.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400) |
Regress prompt-tail masks for FULL/NONE graph modes and zero/three draft
tokens; verify the original mask is unchanged. |
|
[`tests/ut/worker/test_pcp_manager_v2.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_pcp_manager_v2.py)
| [vLLM #45635](https://github.com/vllm-project/vllm/pull/45635), [vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) | Assert
descriptor-based partitioning and hidden/aux restore layout; update
AuxOutput fixture configuration. |
|
[`tests/ut/worker/test_v2_dummy_padding.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/test_v2_dummy_padding.py)
| [vLLM #58400](https://github.com/vllm-project/vllm/pull/58400) adds
`prefill_runs_as_decode_np` and `decode_graph_eligible` for single-token
prompt tails with existing context; `has_prefill` alone no longer
determines FULL-decode eligibility.<br><br>[vLLM
#58275](https://github.com/vllm-project/vllm/pull/58275)/[vLLM
#57980](https://github.com/vllm-project/vllm/pull/57980) expose
`max_query_len`/`is_padding` on dummy batches and an explicit
query-length bound for autoregressive graph capture.<br><br>[vLLM
#58149](https://github.com/vllm-project/vllm/pull/58149) makes
`ModelState.max_model_len` a model-config-backed property; [vLLM
#57913](https://github.com/vllm-project/vllm/pull/57913) moves
multimodal capability to `ModelConfig`; [vLLM
#56723](https://github.com/vllm-project/vllm/pull/56723) updates DCP
state/metadata contracts. | Use the model-config-backed state/dummy
descriptor contract and retain graph-eligibility metadata. |
|
[`tests/ut/worker/v2/test_aclgraph.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/v2/test_aclgraph.py)
| [vLLM #57980](https://github.com/vllm-project/vllm/pull/57980), [vLLM
#58275](https://github.com/vllm-project/vllm/pull/58275) | Update
capture descriptors and dummy-batch keyword expectations. |
|
[`tests/ut/worker/v2/test_eplb_controller.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/v2/test_eplb_controller.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) | Cover
release state construction versus main in-place state/communicator
reuse. |
|
[`tests/ut/worker/v2/test_eplb_load_collection_phase.py`](https://github.com/vllm-project/vllm-ascend/blob/23c8b15c2709978463490b0e8531bf5f9f27b9c1/tests/ut/worker/v2/test_eplb_load_collection_phase.py)
| [vLLM #53934](https://github.com/vllm-project/vllm/pull/53934) | Match
each target's EPLB setup signature in load-collection fixtures. |

</details>

#### Local A3 nightly validation (2026-10-15; frozen head `444e962`)

These four model runs used **`444e962b239c3a8fc56b9255d601818e6e028b9a`
+ vLLM 0.31.0 (`db9527a`)**, which is also the restored PR head; the
deferred connector hardening is not included. Prefill 138 + Decode 136,
16 NPUs per node; original image, weights, datasets, launch and
benchmark parameters were retained, with only the second-node address
mapped from 139 to 136. All four cases exited pytest 0 on both nodes
(one passed JUnit case per node). OTT is output token/s; TPOT/TTFT are
ms.

| Case | Performance requests | OTT / required minimum | TPOT / TTFT |
AIME2025 accuracy | Result |
| --- | --- | --- | --- | --- | --- |
| Kimi-K2.6 PD | 60/60 | 355.1593 / 337.024075 | 20.5 / 3268.2 | 90%,
within 93.33±10 | Performance + accuracy passed |
| DeepSeek-V4 Flash PD-prefix | Accuracy only | N/A | N/A | 90%, within
90±10 | Accuracy passed |
| GLM-5.1 W8A8C8 128K | 256/256 | 811.7645 / 282.105876 | 39.8 / 32665.6
| No accuracy item | Performance passed |
| MiniMax-M2.7 PD-prefix | 160/160 | 711.0518 / 698.497 | 34.8 / 17438.2
| 90%, within 93.33±10 | Performance + accuracy passed |

All performance requests above, and the valid controls below, were
checked for actual 1024-token outputs, not just success flags.

**Conditional controls:** historical throughput differences triggered
only the affected performance cases against the same PR base `6d1dd70`,
without this PR, + vLLM 0.30.0 (`ced6857`). Kimi: 355.1593 vs 359.8514
OTT (**-1.30%**); the earlier 7.27% loss was not reproduced in this
comparison. TPOT was 20.5 vs 19.7ms (+0.8ms/+4.06%), and average request
latency +3.48%; a single pair does not establish latency equivalence or
a stable regression. GLM: 811.7645 vs 813.3506 OTT (**-0.20%**), TPOT
39.8 vs 39.4ms. Kimi's original random request pacing affects aggregate
OTT. No alternating reruns or unaffected-model 0.30 controls were added.

Archived evidence:
`main2main-nightly-20261013/pr18229-update-444e962-20261015/`
(`FINAL_REPORT.md`, per-node logs/JUnit, raw AISBench outputs,
token-count audit, controls and diagnostic evidence). Both nodes were
released after testing.

#### Deferred follow-up: multi-group receive-failure reporting (not
included)

The request-level receive-failure hardening change has been removed from
this upgrade PR; the branch is restored to the nightly-tested head
`444e962`. The original four nightlies already passed on this head
**without** that fix, so it is not required for these normal-path
workloads to pass.

The fault-path issue remains real: if a multi-group receive actually
fails, the existing connector can report flat block IDs and trigger the
vLLM 0.31 scheduler guard, terminating Decode EngineCore. This is
handled separately in
[#18823](https://github.com/vllm-project/vllm-ascend/pull/18823),
retaining ordinary non-HMA block-level recovery semantics. The upgrade
PR does not claim fault isolation is fixed.

Development fault-injection results belong to the deferred connector
implementation, not this restored head. No new NPU run was performed
when restoring the exact previously tested code.

#### Historical validation for head `23c8b15`

- New [E2E
workflow](https://github.com/vllm-project/vllm-ascend/actions/runs/38562748688)
and [Docs link
check](https://github.com/vllm-project/vllm-ascend/actions/runs/38562748395)
were triggered after the rebase. Results are pending; previous-head CI
does not validate this rebased head.
- A targeted [comment
command](https://github.com/vllm-project/vllm-ascend/pull/18229#issuecomment-6168149194)
requests `test_deepseek_v4_mtp_full_decode_only` against both supported
upstream targets. The [command
workflow](https://github.com/vllm-project/vllm-ascend/actions/runs/38562831465)
is queued; its actual test results remain pending.
- Ruff check and format check passed for all 72 changed Python files;
Python compilation and diff checks passed. Source-extracted execution of
both real CPP routing regressions passed against the required partition
signatures of the exact main/release refs. This validates dispatch
contracts with lightweight dependency stubs and does not replace full
pytest or NPU execution.
- Existing source-extracted scheduler regressions passed on both version
lanes: eight budget scenarios, two queue paths and empty/fully deferred
queue regressions, including negative controls.
- Local full pytest/Torch/NPU and `bash format.sh ci` remain unavailable
in this Windows environment. They require CI validation.
- Previous head `9330488` passed pre-commit, Docs and both CPU UT lanes
(main 10782 passed / 114 skipped; release 10784 passed / 112 skipped).
Its initial NPU matrix passed 41/42 shards; the remaining main A3 shard
failed in unchanged upstream teardown with `psutil.NoSuchProcess`,
before the MTP golden acceptance assertion. The consequent gate failure
and old-head rerun are historical evidence, not a result for the current
head.

#### Coverage limits and historical evidence

The PR CI selector scans `tests/ut` and `tests/e2e/pull_request`; the
new broadcast/strided token-logprob numerical tests under
`tests/e2e/nightly` are outside that selection. A5, standalone
upstream-worker and coverage-upload jobs were skipped in the inspected
run. Skips are not coverage. No dedicated packed-QK RoPE or V1
profiling-randomization standalone UT is added by this final diff.

Previous head `15f8a3d` passed
[E2E](https://github.com/vllm-project/vllm-ascend/actions/runs/38511018361)
and
[Docs](https://github.com/vllm-project/vllm-ascend/actions/runs/38511018193),
including 42 NPU jobs. Its PR-recorded CPU counts were 10574 passed /
113 skipped for verified main and 10576 passed / 111 skipped for
release, with no failures. Those counts belong to that historical head
and are not asserted as current-head counts.

- vLLM main:
https://github.com/vllm-project/vllm/commit/c4df37dfcc7f72ca41cd43801a468526ecf99a2b

---------

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
Co-authored-by: shenzhao <shenzhao9@huawei.com>
tangdafu pushed a commit to tangdafu/vllm-ascend that referenced this pull request Oct 20, 2026
…llm-project#18823)

### What this PR does / why we need it?

Report P2P Mooncake receive failures through
`KVConnectorTransferResults.failed_recving` when the logical cache has
multiple groups or requires HMA. Flat block IDs do not identify the
affected request across independent cache groups; vLLM 0.31 rejects such
reports and can terminate Decode EngineCore after a receive failure.

Preserve the existing block-level failure reporting and valid-prefix
recovery for ordinary non-HMA caches with one logical group. Select the
reporting mode from the logical cache configuration and HMA state
**before** registration expands `_is_hma_required` for group-aware wire
transfers: splitting one shared block table into several transfer groups
must not change its recovery semantics.

Retain each failed request until all local pull/reformat tasks have
finished, then return its failure together with receive completion.
Delegate the connector's `get_transfer_results()` to the worker so
upstream receives the failure IDs; keep the legacy `get_finished()`
tuple API available. No scheduler changes are needed.

This follows the request-level HMA / block-level non-HMA split in
[upstream vLLM #56855](vllm-project/vllm#56855),
with an explicit check for multiple logical groups to satisfy the 0.31
scheduler guard. This is a separate fix from the release upgrade in
vllm-project#18229 and applies on the current Ascend main base.

### Does this PR introduce _any_ user-facing change?

On the affected asynchronous receive-failure path, upstream can apply
the configured `fail` or `recompute` policy to the request instead of
rejecting an ambiguous block-level report. Successful transfers and
ordinary non-HMA single-group block-level recovery retain their existing
behavior. This does not repair transport/backend configuration problems.

### How was this patch tested?

CPU validation in an isolated A3-host container with no NPU device
mappings and no network:

```bash
python -m pytest -q --tb=short \
  tests/ut/distributed/kv_transfer/kv_p2p/test_mooncake_connector.py \
  tests/ut/distributed/kv_transfer/kv_p2p/test_remote_prefill_lifecycle.py \
  tests/ut/kv_offload
bash format.sh ci
```

- Before rebase, the two connector/lifecycle target suites: **192
passed, 14 skipped on each** of verified vLLM main `c4df37d`, vLLM
0.31.0 `db9527a`, and vLLM 0.30.0 `ced6857`. The 0.30 source checkout
uses `VLLM_VERSION=0.30.0` because its generated `_version.py` is
absent.
- After rebase onto Ascend main
`8a8e1e05ecb64a30804c99c8f362909f9a0cb5bf` (including the 0.31.0
upgrade), the connector/lifecycle suites plus all of
`tests/ut/kv_offload`: **1125 passed, 14 skipped per lane**, on verified
vLLM main `c4df37d` and vLLM 0.31.0 `db9527a`.
- Fixed the four CI failures by adding the missing error-mode fields to
two existing test fixtures that use `__new__` and bypass constructors
(two initialization lines). Adapted existing failure-state and
worker-polling tests; **no new test functions or parametrized cases**.
Existing block-error and real descriptor-to-transfer CPU tests remain
enabled.
- Additional submission-time runtime checks, kept outside the PR: eight
layout/HMA combinations per version, checking deferred failure draining,
completed/failed receive propagation, preservation of non-HMA invalid
block IDs, and independence from the transfer-only HMA flag.
- Full `bash format.sh ci` and `git diff --check` passed.
- No NPU model/fault-injection rerun for this final conditional variant;
the 14 existing skips and the mocked CPU transport are not end-to-end
NPU coverage.

- vLLM main:
vllm-project/vllm@c4df37d

---------

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
tangdafu pushed a commit to tangdafu/vllm-ascend that referenced this pull request Oct 20, 2026
…ject#18919)

### What this PR does / why we need it?

Restore the Ascend V1 pipeline-parallel + async-scheduling configuration
after the vLLM 0.30 to 0.31 upgrade in vllm-project#18229. The main A3 nightly
GLM-5.3 PP/PD case fails before engine startup with `Model Runner V1
does not support: pipeline parallelism with async scheduling` ([job and
logs](https://github.com/vllm-project/vllm-ascend/actions/runs/38810262248/job/116684874311)).
The service log, rather than the external-DP wrapper error, identifies
this as the first failure.

vLLM 0.31 adds a GPU V1 restriction associated with upstream issue
vllm-project/vllm#45014. Ascend has its own PP communication/scheduler
adaptations. Extend the existing Ascend V1 feature allowlist for this
configuration and preserve unrelated restrictions. Add native-helper
regression coverage for PP1/PP2, sync/async, and PCP rejection; document
the compatibility patch and its removal plan.

### Does this PR introduce _any_ user-facing change?

V1 PP+async configurations can pass configuration validation again.
Runner selection, async scheduling settings, and other
unsupported-feature checks are unchanged.

### How was this patch tested?

- **Regression tests:** `pytest -q
--confcutdir=<isolated-test-directory>
test_patch_use_v2_model_runner.py` against native vLLM 0.31 on A3.
Original module: **2 failed, 13 passed**. An isolated overlay replacing
only `patch_use_v2_model_runner.py`: **15 passed**. The tests call the
real upstream helper/validator, with a minimal configuration object;
unrelated PCP rejection remains active.
- **Version boundary:** execute the unmodified
`_get_v1_model_runner_unsupported_features` functions from vLLM
`ced6857afa0ea7b2e3f0846a62e1394e90f15607` (0.30) and
`db9527a46873454610df6dbedf79a36d6bf1a7f6` (0.31) with the same
PP2/async configuration. Results: `[]` versus `["pipeline parallelism
with async scheduling"]`. This isolates the specific validation
regression; it is not a full-model pre/post-upgrade accuracy comparison.
- **Real A3, reduced runtime validation:** Qwen3-8B BF16, TP1/PP2, V1,
multiprocessing spawn, eager, max model length 2048, max sequences 8,
seed 42. Same machine/container/weights/parameters; baseline fails with
the nightly's exact validation error. With the actual changed module
loaded in all subprocesses, **8 ordinary requests + 4 JSON-schema
requests complete**, exit 0. A sync control also completes 12 requests.
All 4 JSON results/token sequences match. Ordinary greedy token
sequences match for **5/8** requests; the sync control itself also
differs between a repeated prompt, so **numerical equivalence is not
established**. Both controls show forced EngineCore teardown at
interpreter shutdown; no request execution failure was observed.
- **Runtime provenance:** vLLM 0.31.0, Ascend `0.31.0.dev0+pr444e962`,
CANN 9.2.0 (V100R001C12SPC001B234), torch 2.10.0+cpu, torch_npu
2.10.0.post7; existing A3 image
`sha256:0128555151f021ffe68f7ca5f824d9b0995f943f2753aff63313a63841d2aeba`.
This is a reduced validation environment, not the exact nightly image or
four-node GLM topology. Tested changed-module SHA256:
`02cfd08bb8a1f67320e86d0798c4c8fcd2fa8ed4e37a7e82606ace2b14f56033`.
- **Checks:** Ruff check/format, codespell, clang-format, markdownlint,
package-init, forbidden imports, boolean-context checks, manual
logger/long-function/symbolic-meta checks, and `git diff --check` pass.
Full `bash format.sh ci` **did not pass** locally: Go bootstrap stalled;
a subsequent partial run skipped actionlint/Gitleaks and exposed Windows
typos-path, shellcheck, `/bin/bash`, and `python3` execution
limitations. Required complete CI remains pending.
- **Draft / remaining validation:** original GLM-5.3 W8A8C8 four-node
PP+PD nightly, longer/mixed structured-output loads, and accuracy
coverage remain unverified. Do not interpret this PR as a passing full
nightly result. No CI rerun or large workflow dispatch was requested by
this investigation.

---

### Checklist

- [x] Boundary and error paths: PP1/PP2, async on/off, unrelated PCP
rejection.
- [x] Regression test fails before the fix.
- [x] Reduced NPU execution recorded with its limitations.
- [ ] Original multi-node nightly and full accuracy validation.
- [ ] Complete required CI checks.

- vLLM main:
vllm-project/vllm@c4df37d

Signed-off-by: zhao-stack <80399320+zhao-stack@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants