Repository navigation
[Bugfix][MRV2] Match fast-prefill padding to active LoRA batches - #56456
Merged
njhill merged 10 commits intoSep 18, 2026
Merged
Conversation
waizuichougou
force-pushed
the
fix/fast-prefill-lora-dispatch
branch
from
September 11, 2026 12:46
8cf5cf2 to
d669f83
Compare
Signed-off-by: waizuichougou <2082431897@qq.com>
waizuichougou
force-pushed
the
fix/fast-prefill-lora-dispatch
branch
from
September 11, 2026 13:04
d669f83 to
5aeb687
Compare
waizuichougou
marked this pull request as ready for review
September 11, 2026 17:00
waizuichougou
requested review from
WoosukKwon,
njhill and
yewentao256
as code owners
September 11, 2026 17:00
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: waizuichougou <105572299+waizuichougou@users.noreply.github.com>
Signed-off-by: waizuichougou <2082431897@qq.com>
Contributor
|
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: waizuichougou <105572299+waizuichougou@users.noreply.github.com>
Signed-off-by: waizuichougou <2082431897@qq.com>
Member
|
/ci test |
njhill
enabled auto-merge (squash)
September 18, 2026 01:57
|
✅ @waizuichougou, CI is now available for this PR.
|
Member
|
/ci run |
|
✅ Triggered Buildkite CI #89867 for commit |
linfeng-yuan
pushed a commit
to vllm-project/vllm-ascend
that referenced
this pull request
Oct 12, 2026
### What this PR does / why we need it?
The PR advances the main2main lane from vLLM v0.30.0 (tag commit
`ced6857afa0ea7b2e3f0846a62e1394e90f15607`) to vLLM main
`8cc9aa5ad350f6f80cf3bebb298d410803ff75a9` (installed as `0.30.0.dev`),
adapting vllm-ascend to every upstream change landed after the v0.30.0
release tag. The v0.30.0 lane stays supported: each upstream divergence
is selected with `vllm_version_is("0.30.0")`, so the release keeps the
legacy API and main takes the new one.
| Files | Upstream vLLM change (why it breaks vllm-ascend) | vllm-ascend
adaptation |
|-------|--------------------------------------------------|------------------------|
| `.github/vllm-main-verified.commit` | — (main-lane pin only) |
Verified main commit bumped `ced6857` (v0.30.0) -> `8cc9aa5` |
| `hidden_out` | — (stray artifact) | Accidental empty file created by a
shell redirect in `fe6d042a0`; no functional content (should be removed)
|
| `tests/e2e/pull_request/four_card/test_kimi_k3.py` |
[vllm#54222](vllm-project/vllm#54222) makes the
decode worker report the prefill worker's prefix-cache hits via
`kv_transfer_params["remote_prefill_cached_tokens"]` instead of its own
~100% transferred-KV hit rate, so the existing `cached_tokens > 0`
assertion fails on a fresh 129-token prompt | On main assert the P-side
hit count propagates to the decode output; keep `cached_tokens > 0` only
on v0.30.0 |
| `tests/e2e/pull_request/one_card/test_model_runner_v1_with_device.py`
| [vllm#45635](vllm-project/vllm#45635) moved
`enable_return_routed_experts` from `ModelConfig` to
`VllmConfig.aux_output_config`;
`test_stateful_handoff_preserves_decode_graph` mocks only
`model_config`, so `_sync_metadata_across_dp` raises for the dp_size=4
cases | Add `aux_output_config` to the mock `VllmConfig` on main |
| `tests/e2e/pull_request/one_card/test_thinking_budget.py` |
[vllm#56497](vllm-project/vllm#56497) changed
`ThinkingBudgetState.apply` from six positional args to `(logits, ctx:
LogitsContext)`, so the helper fails with a signature/TypeError | Build
`LogitsContext` and call `apply(logits, ctx)` on main; keep the six-arg
call on v0.30.0 |
| `tests/e2e/pull_request/two_card/spec_decode/test_spec_decode.py` |
[vllm#57934](vllm-project/vllm#57934) added a
`VllmConfig` validation rejecting DFlash candidate-head drafts
(`DFlash2DraftModel`/`LiLiCorrDraftModel`) under Model Runner V1;
`test_dflash2_acceptance` runs the V1 path, so config creation fails |
Skip the V1 variant on main (V2 covered by
`test_dflash2_v2_acceptance`); v0.30.0 still runs it |
| `tests/ut/_310p/test_model_runner_v2_310p.py` |
[vllm#56456](vllm-project/vllm#56456) added the
trailing `num_active_loras` to `prepare_inputs`;
[vllm#56497](vllm-project/vllm#56497) dropped
`prompt_len` from `Sampler.add_request` | Version-aware `_add_request`
helper (no `prompt_len` on main) and `prepare_inputs` args
(`num_active_loras` on main) |
| `tests/ut/attention/test_mla_cp.py` | vLLM main resolves the DCP group
through `get_dcp_world_size_and_rank` and computes LSE capability inside
`__new__`, so patching `get_dcp_group` no longer intercepts it | Patch
`get_dcp_world_size_and_rank` on main; keep `get_dcp_group` on v0.30.0 |
| `tests/ut/core/test_recompute_scheduler_short_request_first.py` | vLLM
main reads `ModelConfig.runner_type` in `supports_multimodal_inputs`,
but the patched `__post_init__` no longer initializes it | Set
`model_config.runner_type = "generate"` |
| `tests/ut/distributed/eplb/test_state.py` | vLLM main renamed
`EplbState.cuda_device_index` to `device_index` and `add_model` passes
`device_index=...`, so the old attribute is never set | Assert
`cuda_device_index` on v0.30.0 / `device_index` on main |
|
`tests/ut/distributed/kv_transfer/sparse_kv_offload/test_sparse_kv_offload_manager.py`
| [vllm#56723](vllm-project/vllm#56723) made
`UniformTypeKVCacheSpecs` read `dcp_sharded` from each member spec | Add
`dcp_sharded = False` to `_FakeKVCacheSpec` |
| `tests/ut/kv_offload/test_mooncake_layerwise_connector.py` | Same
[vllm#56723](vllm-project/vllm#56723) per-spec
`dcp_sharded` read | Add `dcp_sharded=False` to the
`UniformTypeKVCacheSpecs` member spec |
| `tests/ut/kv_offload/test_preempt_offload_connector.py` | vLLM main
tracks prefix-replay bookkeeping on the scheduler
(`prefix_replay_tokens`, `request.num_tokens`), which the mock scheduler
does not provide | Initialize `scheduler.prefix_replay_tokens` (and
`request.num_tokens`) on main |
| `tests/ut/models/test_deepseek_v41_release_config.py` |
[vllm#56554](vllm-project/vllm#56554) moved the
mm-prefix decision to the model-arch config converter, so the flattened
released config no longer carries
`is_mm_prefix_lm`/`mm_prefix_clamp_sliding_window` | Version-gate those
assertions (present on v0.30.0, absent on main) and normalize the config
|
| `tests/ut/models/test_kimi_k3_adapter.py` |
[vllm#50592](vllm-project/vllm#50592) /
[vllm#50593](vllm-project/vllm#50593) reworked
the Kimi-K3 AttnResidual API (prefix_delta threading, fused norms) |
Adjust adapter expectations to the `prefix_delta` AttnResidual form on
main |
| `tests/ut/ops/test_gdn_attn_builder.py` | vLLM main reads
`use_v2_model_runner` from the `VllmConfig` built in the test | Add
`use_v2_model_runner=False` to the mock config |
| `tests/ut/patch/platform/test_patch_engram_config.py` | vLLM main
resolves the Engram `dp_shared_memory` default to `True` when the caller
leaves it unset (v0.30.0 keeps it `False`) | Assert the
version-dependent default |
| `tests/ut/patch/platform/test_patch_kv_cache_coordinator.py` |
Upstream `KVCacheCoordinator.__init__` sets `group_block_sizes` and
`SimpleCPUOffloadScheduler` reads it; `AscendHybridKVCacheCoordinator`
builds managers itself, so the attribute is missing (`AttributeError`) |
Cover the new `AscendHybridKVCacheCoordinator.group_block_sizes`
exposure |
| `tests/ut/patch/platform/test_patch_mamba_block_aligned_split.py` |
vLLM main added the `mamba_shared_prefix_checkpoint` scheduler kwarg
read by the patched path | Add `mamba_shared_prefix_checkpoint=False` to
the scheduler mock |
| `tests/ut/spec_decode/test_eagle_proposer.py` | vLLM main removed
`MultiModalRegistry.supports_multimodal_inputs` and reads
`ModelConfig.supports_multimodal_inputs` instead, so patching the
removed method fails | `_supports_multimodal_inputs_patch` helper: patch
the registry method on v0.30.0, set `ModelConfig` flags on main |
| `tests/ut/spec_decode/test_mla_dspark.py` |
[vllm#57632](vllm-project/vllm#57632) inserted
`precompute_context_kv` before `progress_bar_desc` in the DFlash capture
path | Version-aware DFlash `capture` kwargs |
| `tests/ut/test_platform.py` |
[vllm#45635](vllm-project/vllm#45635) introduces
`VllmConfig.aux_output_config`, read by the Ascend platform validator |
Add `aux_output_config` (`None` on v0.30.0, disabled mock on main) to
the mocked `VllmConfig` |
| `tests/ut/worker/test_attn_utils_v2.py` |
[vllm#58149](vllm-project/vllm#58149) made
`max_model_len` a read-only property backed by `model_config`, so
assigning the instance attribute raises `AttributeError` | Set
`model_config.max_model_len` instead of the instance attribute on main |
| `tests/ut/worker/test_dcp_speculator_metadata_v2.py` |
[vllm#56723](vllm-project/vllm#56723) reads
`speculator.dcp_size` and `builder.supports_update_block_table`, and
slices `is_prefilling` to the padded request count | Fixture sets
`spec.dcp_size`/`supports_update_block_table`; version-aware
`is_prefilling` expectation |
| `tests/ut/worker/test_model_runner_v2.py` |
[vllm#58149](vllm-project/vllm#58149)
`max_model_len` property;
[vllm#56456](vllm-project/vllm#56456) added
`num_active_loras` | `max_model_len` workaround; pass the trailing
`num_active_loras` on main; aux-hidden-state restore assertions |
| `tests/ut/worker/test_model_runner_v2_kv_cache.py` |
[vllm#45635](vllm-project/vllm#45635) adds an
aux-output branch; `MagicMock` makes `aux_output_config.enabled` truthy
| Disable `aux_output_config.enabled` so the KV-connector path is
exercised |
| `tests/ut/worker/test_model_runner_v2_mamba.py` | vLLM main
split/reorganized `prepare_inputs` so the Ascend override is now
`_prepare_inputs_impl` | AST test now looks up `_prepare_inputs_impl` |
| `tests/ut/worker/test_pcp_manager_v2.py` |
[vllm#57980](vllm-project/vllm#57980) replaced
`padded_num_tokens`/`padded_num_reqs` with a `BatchExecutionDescriptor`
and dropped `routed_experts`; vLLM main renamed the DCP helper |
`_partition_batch` helper using `BatchExecutionDescriptor`; drop
`routed_experts`; `_prepare_dcp_local_seq_lens` rename |
| `tests/ut/worker/v2/test_aclgraph.py` |
[vllm#58275](vllm-project/vllm#58275) reads
`max_query_len`/`uniform_token_count` off the descriptor when preparing
capture inputs | Version-aware descriptor and `capture` kwargs |
| `vllm_ascend/_310p/attention/attention_v1.py` |
[vllm#53175](vllm-project/vllm#53175) added an
optional `kv_cache_spec` to `get_supported_kernel_block_sizes`, so the
zero-arg Ascend override raises `TypeError` when loading the MTP drafter
| Apply the `@supports_kernel_block_spec` decorator |
| `vllm_ascend/_310p/worker/v2/block_table.py` |
[vllm#56723](vllm-project/vllm#56723) passes a
per-group `dcp_sharded` to `BlockTables.__init__` (unexpected kwarg);
[vllm#56734](vllm-project/vllm#56734) sets
`idx_mapping == -1` for dummy draft steps, so the native 310P path
addresses block-table row `-1` | Version-split `__init__` accepting
`dcp_sharded`; skip negative `req_idx` in the 310P native slot-mapping
path |
| `vllm_ascend/_310p/worker/v2/model_runner.py` |
[vllm#56456](vllm-project/vllm#56456) added the
trailing `num_active_loras` positional to
`GPUModelRunner.prepare_inputs`, so the 310P override no longer matches
| Version-split `prepare_inputs`, accepting `num_active_loras` on main |
| `vllm_ascend/_310p/worker/v2/sampler.py` |
[vllm#56497](vllm-project/vllm#56497) dropped
`prompt_len` from `Sampler.add_request`, so
`GPUModelRunner.add_requests` fails with a missing/extra positional |
Version-split `add_request`; shared body moved to `_add_request_impl` |
| `vllm_ascend/attention/attention_v1.py` |
[vllm#53175](vllm-project/vllm#53175)
`kv_cache_spec` signature break; and on main the speculative-decode
request metadata stays at the real request extent, so a padded
FULL-graph decode makes FIA reject the TND replay (`queryT !=
last(actualSequenceLengthQ)`, error 561002) |
`@supports_kernel_block_spec`; on main append the padded tail to
`actual_seq_lengths_q` for V2 multi-token decode, whole block behind
`vllm_version_is("0.30.0")` |
| `vllm_ascend/attention/dsa_v1.py` |
[vllm#53175](vllm-project/vllm#53175)
`get_supported_kernel_block_sizes(kv_cache_spec)` signature break |
Apply the decorator to the 6 DSA backends |
| `vllm_ascend/attention/fa3_v1.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/indexer.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/indexer_kpool.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator to both indexer backends |
| `vllm_ascend/attention/mla_v1.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/sfa_v1.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/utils.py` |
[vllm#53175](vllm-project/vllm#53175) made
`get_supported_kernel_block_sizes` accept `kv_cache_spec` and made
`_largest_kernel_block_within` pass it; Ascend's zero-arg staticmethods
raise `TypeError` | New `supports_kernel_block_spec` decorator that
accepts/ignores `kv_cache_spec` on main and keeps the zero-arg static
method on v0.30.0 |
| `vllm_ascend/distributed/eplb/state.py` | vLLM main renamed
`EplbState.cuda_device_index` to `device_index`, so
`AscendEPLBController.prepare_load` raises `AttributeError:
'AscendEplbState' object has no attribute 'cuda_device_index'` | Set
`cuda_device_index` on v0.30.0 / `device_index` on main |
| `vllm_ascend/lora/punica_npu.py` |
[vllm#53555](vllm-project/vllm#53555) added the
abstract `apply_lora_full_linear` (sequence classification), so
`PunicaWrapperNPU` can no longer be instantiated (`TypeError: Can't
instantiate abstract class`) | Implement the per-adapter einsum fallback
for the classification head (skips the half/bf16-only BGMV shrink
kernel) |
| `vllm_ascend/models/kimi_k3.py` |
[vllm#50592](vllm-project/vllm#50592) /
[vllm#50593](vllm-project/vllm#50593):
`KimiDecoderLayer.forward` threads `prefix_delta`,
`forward_attn_residual` returns a 3-tuple and the fused norm path is
used, so `AscendKimiDecoderLayer.forward_attn_residual` fails with a
signature/unpack error | Version-gate AttnResidual: fused-norm
`_apply_ascend_attn_res`, `forward_attn_residual` threading
`prefix_delta` and returning the 3-tuple on main; v0.30.0 keeps the
2-tuple |
| `vllm_ascend/models/minimax_m3/msa_m3.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator to the MiniMax-M3 indexer/sparse backends |
| `vllm_ascend/ops/fused_moe/gate_linear.py` |
[vllm#58234](vllm-project/vllm#58234) extended
`GateLinear.__init__` with `skip_bias_add`/`quant_config`/`return_bias`
and routed qwen3_moe (and others) through it, so loading Qwen3 MoE fails
with `Gate AscendGateLinear.__init__` (unexpected kwargs) |
Version-split `AscendGateLinear.__init__` (main forwards the new args,
still forcing FP32) and `forward` returns the single output so
`return_bias` is honored |
| `vllm_ascend/ops/fused_moe/router/grouped_topk_router.py` |
[vllm#58880](vllm-project/vllm#58880) removed
`routed_scaling_factor` from the fused MiniMax2 routing config, so
passing it raises an unexpected-kwarg error on main | Pass
`routed_scaling_factor` only on v0.30.0 |
| `vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py` |
[vllm#56734](vllm-project/vllm#56734) marks
dummy draft decode runs with `idx_mapping == -1` and skips the
block-table read; the forked Ascend kernel used the raw index and
aborted with an invalid GM address (`error code 507035`) | Main-only
guarded kernel: skip block-table reads and emit `PAD_SLOT_ID` for
`idx_mapping == -1`; v0.30.0 keeps the original kernel |
| `vllm_ascend/patch/platform/patch_kv_cache_coordinator.py` | Upstream
`KVCacheCoordinator.__init__` sets `group_block_sizes`, which
`SimpleCPUOffloadScheduler` reads; the Ascend subclass constructs
managers itself and never sets it, so startup fails with
`AttributeError: 'AscendHybridKVCacheCoordinator' object has no
attribute 'group_block_sizes'` | Expose `group_block_sizes` after
building the managers (fixes #17831) |
| `vllm_ascend/patch/platform/patch_kv_cache_utils.py` |
[vllm#55390](vllm-project/vllm#55390) renamed
`_annotate_eagle_groups`'s positional-fallback param from
`use_deepseek_v4_fallback` to `use_trailing_layer_fallback`, so the
Ascend packed-KV-cache-group patch fails with an unexpected-keyword
`TypeError` | Pass the correct param per version |
| `vllm_ascend/patch/worker/patch_step3p5.py` | vLLM main replaced
`FP32ReplicatedLinear` with `GateLinear` inside `step3p5.FusedMoEBlock`,
so the gate import/construction no longer exists on main | Version-gate
the import and `_patched_fused_moe_block_init` gate construction
(`FP32ReplicatedLinear` vs `GateLinear`) |
| `vllm_ascend/patch/worker/patch_triton.py` |
[vllm#58651](vllm-project/vllm#58651) added
`packed_qk_rope.py`, whose kernel calls
`triton.next_power_of_2(rotary_dim)` with a `tl.constexpr`; the injected
host helper calls `(n-1).bit_length()`, so the Kimi vision tower's
`profile_run` aborts with `AttributeError('constexpr' object has no
attribute 'bit_length')` | On main wrap `next_power_of_2` to unwrap
`tl.constexpr` before delegating |
| `vllm_ascend/patch/worker/patch_v2/patch_model_runner.py` |
[vllm#45635](vllm-project/vllm#45635) moved
routed-experts output to the AuxOutput connector (wired in
`GPUModelRunner.initialize_kv_cache`); the Ascend fork predates it, so
the worker emits no `aux_output_connector_output` and the scheduler
raises `AssertionError: auxiliary output worker output is missing`.
[vllm#56723](vllm-project/vllm#56723) added
`dcp_sharded` and dropped `attn_cg_support` | Build
`get_aux_output_connector` when enabled (main); collect/forward
per-group `dcp_sharded`; drop `attn_cg_support` on main |
| `vllm_ascend/platform.py` |
[vllm#45635](vllm-project/vllm#45635) requires
Model Runner V2 for AuxOutput; Ascend is out-of-tree, so the upstream
guard is skipped and an MRV1 run fails with the same missing-aux-output
assertion | Add `_validate_aux_output_config`: reject
`aux_output_config.enabled` under Model Runner V1 |
| `vllm_ascend/worker/v2/aclgraph_utils.py` |
[vllm#57980](vllm-project/vllm#57980) renamed
`maybe_prepare_dcp_local_seq_lens` to `prepare_dcp_local_seq_lens` and
moved the `cp_size > 1` guard to callers;
[vllm#57632](vllm-project/vllm#57632) reaches
model methods through `ModelWithContext` during capture | Alias both DCP
helpers and guard `cp_size > 1`; add `ModelWithContext.__getattr__`
forwarding to the wrapped model on main |
| `vllm_ascend/worker/v2/block_table.py` |
[vllm#56723](vllm-project/vllm#56723) passes a
per-group `dcp_sharded` list to `BlockTables.__init__`, so engine
startup fails with `TypeError: AscendBlockTables.__init__() got an
unexpected keyword argument 'dcp_sharded'` | Version-split `__init__`
accepting and forwarding `dcp_sharded` on main |
| `vllm_ascend/worker/v2/input_batch.py` |
[vllm#57270](vllm-project/vllm#57270) added
`is_padding` to `InputBatch.make_dummy` to route profiling dummy tokens
to MoE experts | `make_dummy` accepts and forwards `is_padding` on main
|
| `vllm_ascend/worker/v2/model_runner.py` |
[vllm#56456](vllm-project/vllm#56456) added
`num_active_loras`;
[vllm#57980](vllm-project/vllm#57980) dropped
the module-level `maybe_partition_pcp_batch` and folded the aux-hidden
restore into `restore_for_sampling`, so the replicated-PCP fast path
leaves `aux_hidden_states` in the PCP-local layout and the draft copy
fails (`self [5, 4096] vs src [3, 4096]`) | Split
`prepare_inputs`/`_prepare_inputs_impl` with `num_active_loras` on main;
call `pcp_manager.partition_batch(batch, desc)`; restore PCP-local
`aux_hidden_states` on main |
| `vllm_ascend/worker/v2/pcp_manager.py` |
[vllm#57980](vllm-project/vllm#57980) replaced
`padded_num_tokens` with a `BatchExecutionDescriptor` and threads
`aux_hidden_states` through `restore_for_sampling`;
[vllm#56456](vllm-project/vllm#56456) forwards
`padded_num_reqs` | Version-split `partition_batch` (descriptor) and
`restore_for_sampling` (`aux_hidden_states`); forward `padded_num_reqs`
|
| `vllm_ascend/worker/v2/spec_decode/autoregressive/aclgraph.py` |
[vllm#58275](vllm-project/vllm#58275) makes
draft capture pass `max_query_len`; the Ascend override left it
unbounded (`num_tokens`), diverging from upstream for mixed FULL graphs
| Forward `max_query_len=desc.max_query_len or desc.uniform_token_count`
on main |
| `vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py` |
[vllm#57632](vllm-project/vllm#57632) added a
trailing `precompute_context_kv` to `DFlashCudaGraphManager.capture`, so
the Ascend override's positional `super().capture()` call shifts |
Version-split `capture`, accepting and forwarding
`precompute_context_kv` on main (passed by keyword) |
> **Notes**
> - `hidden_out` is an accidental empty file introduced by a shell
redirect in `fe6d042a0`; remove it before merging.
> - The branch commits `cacf5b7d5` (`model_runner_v1.py` routed-experts)
and `f763bc65e` (workflow edits) were reverted later in the branch, so
they do not appear in the net PR diff and are omitted.
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
- vLLM main:
vllm-project/vllm@ced6857
---------
Signed-off-by: hfadzxy <starmoon_zhang@163.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Co-authored-by: wxsIcey <1790571317@qq.com>
ningjingbengxiaohai
pushed a commit
to vllm-project/vllm-ascend
that referenced
this pull request
Oct 15, 2026
…tibility (#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
…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>
michael-gpu
pushed a commit
to practical-inference/vllm-ampere-extended
that referenced
this pull request
Oct 20, 2026
…m-project#56456) Signed-off-by: waizuichougou <2082431897@qq.com> Signed-off-by: waizuichougou <105572299+waizuichougou@users.noreply.github.com>
tangdafu
pushed a commit
to tangdafu/vllm-ascend
that referenced
this pull request
Oct 20, 2026
### What this PR does / why we need it?
The PR advances the main2main lane from vLLM v0.30.0 (tag commit
`ced6857afa0ea7b2e3f0846a62e1394e90f15607`) to vLLM main
`8cc9aa5ad350f6f80cf3bebb298d410803ff75a9` (installed as `0.30.0.dev`),
adapting vllm-ascend to every upstream change landed after the v0.30.0
release tag. The v0.30.0 lane stays supported: each upstream divergence
is selected with `vllm_version_is("0.30.0")`, so the release keeps the
legacy API and main takes the new one.
| Files | Upstream vLLM change (why it breaks vllm-ascend) | vllm-ascend
adaptation |
|-------|--------------------------------------------------|------------------------|
| `.github/vllm-main-verified.commit` | — (main-lane pin only) |
Verified main commit bumped `ced6857` (v0.30.0) -> `8cc9aa5` |
| `hidden_out` | — (stray artifact) | Accidental empty file created by a
shell redirect in `fe6d042a0`; no functional content (should be removed)
|
| `tests/e2e/pull_request/four_card/test_kimi_k3.py` |
[vllm#54222](vllm-project/vllm#54222) makes the
decode worker report the prefill worker's prefix-cache hits via
`kv_transfer_params["remote_prefill_cached_tokens"]` instead of its own
~100% transferred-KV hit rate, so the existing `cached_tokens > 0`
assertion fails on a fresh 129-token prompt | On main assert the P-side
hit count propagates to the decode output; keep `cached_tokens > 0` only
on v0.30.0 |
| `tests/e2e/pull_request/one_card/test_model_runner_v1_with_device.py`
| [vllm#45635](vllm-project/vllm#45635) moved
`enable_return_routed_experts` from `ModelConfig` to
`VllmConfig.aux_output_config`;
`test_stateful_handoff_preserves_decode_graph` mocks only
`model_config`, so `_sync_metadata_across_dp` raises for the dp_size=4
cases | Add `aux_output_config` to the mock `VllmConfig` on main |
| `tests/e2e/pull_request/one_card/test_thinking_budget.py` |
[vllm#56497](vllm-project/vllm#56497) changed
`ThinkingBudgetState.apply` from six positional args to `(logits, ctx:
LogitsContext)`, so the helper fails with a signature/TypeError | Build
`LogitsContext` and call `apply(logits, ctx)` on main; keep the six-arg
call on v0.30.0 |
| `tests/e2e/pull_request/two_card/spec_decode/test_spec_decode.py` |
[vllm#57934](vllm-project/vllm#57934) added a
`VllmConfig` validation rejecting DFlash candidate-head drafts
(`DFlash2DraftModel`/`LiLiCorrDraftModel`) under Model Runner V1;
`test_dflash2_acceptance` runs the V1 path, so config creation fails |
Skip the V1 variant on main (V2 covered by
`test_dflash2_v2_acceptance`); v0.30.0 still runs it |
| `tests/ut/_310p/test_model_runner_v2_310p.py` |
[vllm#56456](vllm-project/vllm#56456) added the
trailing `num_active_loras` to `prepare_inputs`;
[vllm#56497](vllm-project/vllm#56497) dropped
`prompt_len` from `Sampler.add_request` | Version-aware `_add_request`
helper (no `prompt_len` on main) and `prepare_inputs` args
(`num_active_loras` on main) |
| `tests/ut/attention/test_mla_cp.py` | vLLM main resolves the DCP group
through `get_dcp_world_size_and_rank` and computes LSE capability inside
`__new__`, so patching `get_dcp_group` no longer intercepts it | Patch
`get_dcp_world_size_and_rank` on main; keep `get_dcp_group` on v0.30.0 |
| `tests/ut/core/test_recompute_scheduler_short_request_first.py` | vLLM
main reads `ModelConfig.runner_type` in `supports_multimodal_inputs`,
but the patched `__post_init__` no longer initializes it | Set
`model_config.runner_type = "generate"` |
| `tests/ut/distributed/eplb/test_state.py` | vLLM main renamed
`EplbState.cuda_device_index` to `device_index` and `add_model` passes
`device_index=...`, so the old attribute is never set | Assert
`cuda_device_index` on v0.30.0 / `device_index` on main |
|
`tests/ut/distributed/kv_transfer/sparse_kv_offload/test_sparse_kv_offload_manager.py`
| [vllm#56723](vllm-project/vllm#56723) made
`UniformTypeKVCacheSpecs` read `dcp_sharded` from each member spec | Add
`dcp_sharded = False` to `_FakeKVCacheSpec` |
| `tests/ut/kv_offload/test_mooncake_layerwise_connector.py` | Same
[vllm#56723](vllm-project/vllm#56723) per-spec
`dcp_sharded` read | Add `dcp_sharded=False` to the
`UniformTypeKVCacheSpecs` member spec |
| `tests/ut/kv_offload/test_preempt_offload_connector.py` | vLLM main
tracks prefix-replay bookkeeping on the scheduler
(`prefix_replay_tokens`, `request.num_tokens`), which the mock scheduler
does not provide | Initialize `scheduler.prefix_replay_tokens` (and
`request.num_tokens`) on main |
| `tests/ut/models/test_deepseek_v41_release_config.py` |
[vllm#56554](vllm-project/vllm#56554) moved the
mm-prefix decision to the model-arch config converter, so the flattened
released config no longer carries
`is_mm_prefix_lm`/`mm_prefix_clamp_sliding_window` | Version-gate those
assertions (present on v0.30.0, absent on main) and normalize the config
|
| `tests/ut/models/test_kimi_k3_adapter.py` |
[vllm#50592](vllm-project/vllm#50592) /
[vllm#50593](vllm-project/vllm#50593) reworked
the Kimi-K3 AttnResidual API (prefix_delta threading, fused norms) |
Adjust adapter expectations to the `prefix_delta` AttnResidual form on
main |
| `tests/ut/ops/test_gdn_attn_builder.py` | vLLM main reads
`use_v2_model_runner` from the `VllmConfig` built in the test | Add
`use_v2_model_runner=False` to the mock config |
| `tests/ut/patch/platform/test_patch_engram_config.py` | vLLM main
resolves the Engram `dp_shared_memory` default to `True` when the caller
leaves it unset (v0.30.0 keeps it `False`) | Assert the
version-dependent default |
| `tests/ut/patch/platform/test_patch_kv_cache_coordinator.py` |
Upstream `KVCacheCoordinator.__init__` sets `group_block_sizes` and
`SimpleCPUOffloadScheduler` reads it; `AscendHybridKVCacheCoordinator`
builds managers itself, so the attribute is missing (`AttributeError`) |
Cover the new `AscendHybridKVCacheCoordinator.group_block_sizes`
exposure |
| `tests/ut/patch/platform/test_patch_mamba_block_aligned_split.py` |
vLLM main added the `mamba_shared_prefix_checkpoint` scheduler kwarg
read by the patched path | Add `mamba_shared_prefix_checkpoint=False` to
the scheduler mock |
| `tests/ut/spec_decode/test_eagle_proposer.py` | vLLM main removed
`MultiModalRegistry.supports_multimodal_inputs` and reads
`ModelConfig.supports_multimodal_inputs` instead, so patching the
removed method fails | `_supports_multimodal_inputs_patch` helper: patch
the registry method on v0.30.0, set `ModelConfig` flags on main |
| `tests/ut/spec_decode/test_mla_dspark.py` |
[vllm#57632](vllm-project/vllm#57632) inserted
`precompute_context_kv` before `progress_bar_desc` in the DFlash capture
path | Version-aware DFlash `capture` kwargs |
| `tests/ut/test_platform.py` |
[vllm#45635](vllm-project/vllm#45635) introduces
`VllmConfig.aux_output_config`, read by the Ascend platform validator |
Add `aux_output_config` (`None` on v0.30.0, disabled mock on main) to
the mocked `VllmConfig` |
| `tests/ut/worker/test_attn_utils_v2.py` |
[vllm#58149](vllm-project/vllm#58149) made
`max_model_len` a read-only property backed by `model_config`, so
assigning the instance attribute raises `AttributeError` | Set
`model_config.max_model_len` instead of the instance attribute on main |
| `tests/ut/worker/test_dcp_speculator_metadata_v2.py` |
[vllm#56723](vllm-project/vllm#56723) reads
`speculator.dcp_size` and `builder.supports_update_block_table`, and
slices `is_prefilling` to the padded request count | Fixture sets
`spec.dcp_size`/`supports_update_block_table`; version-aware
`is_prefilling` expectation |
| `tests/ut/worker/test_model_runner_v2.py` |
[vllm#58149](vllm-project/vllm#58149)
`max_model_len` property;
[vllm#56456](vllm-project/vllm#56456) added
`num_active_loras` | `max_model_len` workaround; pass the trailing
`num_active_loras` on main; aux-hidden-state restore assertions |
| `tests/ut/worker/test_model_runner_v2_kv_cache.py` |
[vllm#45635](vllm-project/vllm#45635) adds an
aux-output branch; `MagicMock` makes `aux_output_config.enabled` truthy
| Disable `aux_output_config.enabled` so the KV-connector path is
exercised |
| `tests/ut/worker/test_model_runner_v2_mamba.py` | vLLM main
split/reorganized `prepare_inputs` so the Ascend override is now
`_prepare_inputs_impl` | AST test now looks up `_prepare_inputs_impl` |
| `tests/ut/worker/test_pcp_manager_v2.py` |
[vllm#57980](vllm-project/vllm#57980) replaced
`padded_num_tokens`/`padded_num_reqs` with a `BatchExecutionDescriptor`
and dropped `routed_experts`; vLLM main renamed the DCP helper |
`_partition_batch` helper using `BatchExecutionDescriptor`; drop
`routed_experts`; `_prepare_dcp_local_seq_lens` rename |
| `tests/ut/worker/v2/test_aclgraph.py` |
[vllm#58275](vllm-project/vllm#58275) reads
`max_query_len`/`uniform_token_count` off the descriptor when preparing
capture inputs | Version-aware descriptor and `capture` kwargs |
| `vllm_ascend/_310p/attention/attention_v1.py` |
[vllm#53175](vllm-project/vllm#53175) added an
optional `kv_cache_spec` to `get_supported_kernel_block_sizes`, so the
zero-arg Ascend override raises `TypeError` when loading the MTP drafter
| Apply the `@supports_kernel_block_spec` decorator |
| `vllm_ascend/_310p/worker/v2/block_table.py` |
[vllm#56723](vllm-project/vllm#56723) passes a
per-group `dcp_sharded` to `BlockTables.__init__` (unexpected kwarg);
[vllm#56734](vllm-project/vllm#56734) sets
`idx_mapping == -1` for dummy draft steps, so the native 310P path
addresses block-table row `-1` | Version-split `__init__` accepting
`dcp_sharded`; skip negative `req_idx` in the 310P native slot-mapping
path |
| `vllm_ascend/_310p/worker/v2/model_runner.py` |
[vllm#56456](vllm-project/vllm#56456) added the
trailing `num_active_loras` positional to
`GPUModelRunner.prepare_inputs`, so the 310P override no longer matches
| Version-split `prepare_inputs`, accepting `num_active_loras` on main |
| `vllm_ascend/_310p/worker/v2/sampler.py` |
[vllm#56497](vllm-project/vllm#56497) dropped
`prompt_len` from `Sampler.add_request`, so
`GPUModelRunner.add_requests` fails with a missing/extra positional |
Version-split `add_request`; shared body moved to `_add_request_impl` |
| `vllm_ascend/attention/attention_v1.py` |
[vllm#53175](vllm-project/vllm#53175)
`kv_cache_spec` signature break; and on main the speculative-decode
request metadata stays at the real request extent, so a padded
FULL-graph decode makes FIA reject the TND replay (`queryT !=
last(actualSequenceLengthQ)`, error 561002) |
`@supports_kernel_block_spec`; on main append the padded tail to
`actual_seq_lengths_q` for V2 multi-token decode, whole block behind
`vllm_version_is("0.30.0")` |
| `vllm_ascend/attention/dsa_v1.py` |
[vllm#53175](vllm-project/vllm#53175)
`get_supported_kernel_block_sizes(kv_cache_spec)` signature break |
Apply the decorator to the 6 DSA backends |
| `vllm_ascend/attention/fa3_v1.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/indexer.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/indexer_kpool.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator to both indexer backends |
| `vllm_ascend/attention/mla_v1.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/sfa_v1.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator |
| `vllm_ascend/attention/utils.py` |
[vllm#53175](vllm-project/vllm#53175) made
`get_supported_kernel_block_sizes` accept `kv_cache_spec` and made
`_largest_kernel_block_within` pass it; Ascend's zero-arg staticmethods
raise `TypeError` | New `supports_kernel_block_spec` decorator that
accepts/ignores `kv_cache_spec` on main and keeps the zero-arg static
method on v0.30.0 |
| `vllm_ascend/distributed/eplb/state.py` | vLLM main renamed
`EplbState.cuda_device_index` to `device_index`, so
`AscendEPLBController.prepare_load` raises `AttributeError:
'AscendEplbState' object has no attribute 'cuda_device_index'` | Set
`cuda_device_index` on v0.30.0 / `device_index` on main |
| `vllm_ascend/lora/punica_npu.py` |
[vllm#53555](vllm-project/vllm#53555) added the
abstract `apply_lora_full_linear` (sequence classification), so
`PunicaWrapperNPU` can no longer be instantiated (`TypeError: Can't
instantiate abstract class`) | Implement the per-adapter einsum fallback
for the classification head (skips the half/bf16-only BGMV shrink
kernel) |
| `vllm_ascend/models/kimi_k3.py` |
[vllm#50592](vllm-project/vllm#50592) /
[vllm#50593](vllm-project/vllm#50593):
`KimiDecoderLayer.forward` threads `prefix_delta`,
`forward_attn_residual` returns a 3-tuple and the fused norm path is
used, so `AscendKimiDecoderLayer.forward_attn_residual` fails with a
signature/unpack error | Version-gate AttnResidual: fused-norm
`_apply_ascend_attn_res`, `forward_attn_residual` threading
`prefix_delta` and returning the 3-tuple on main; v0.30.0 keeps the
2-tuple |
| `vllm_ascend/models/minimax_m3/msa_m3.py` |
[vllm#53175](vllm-project/vllm#53175) signature
break | Apply the decorator to the MiniMax-M3 indexer/sparse backends |
| `vllm_ascend/ops/fused_moe/gate_linear.py` |
[vllm#58234](vllm-project/vllm#58234) extended
`GateLinear.__init__` with `skip_bias_add`/`quant_config`/`return_bias`
and routed qwen3_moe (and others) through it, so loading Qwen3 MoE fails
with `Gate AscendGateLinear.__init__` (unexpected kwargs) |
Version-split `AscendGateLinear.__init__` (main forwards the new args,
still forcing FP32) and `forward` returns the single output so
`return_bias` is honored |
| `vllm_ascend/ops/fused_moe/router/grouped_topk_router.py` |
[vllm#58880](vllm-project/vllm#58880) removed
`routed_scaling_factor` from the fused MiniMax2 routing config, so
passing it raises an unexpected-kwarg error on main | Pass
`routed_scaling_factor` only on v0.30.0 |
| `vllm_ascend/ops/triton/v2/block_table/compute_slot_mappings.py` |
[vllm#56734](vllm-project/vllm#56734) marks
dummy draft decode runs with `idx_mapping == -1` and skips the
block-table read; the forked Ascend kernel used the raw index and
aborted with an invalid GM address (`error code 507035`) | Main-only
guarded kernel: skip block-table reads and emit `PAD_SLOT_ID` for
`idx_mapping == -1`; v0.30.0 keeps the original kernel |
| `vllm_ascend/patch/platform/patch_kv_cache_coordinator.py` | Upstream
`KVCacheCoordinator.__init__` sets `group_block_sizes`, which
`SimpleCPUOffloadScheduler` reads; the Ascend subclass constructs
managers itself and never sets it, so startup fails with
`AttributeError: 'AscendHybridKVCacheCoordinator' object has no
attribute 'group_block_sizes'` | Expose `group_block_sizes` after
building the managers (fixes vllm-project#17831) |
| `vllm_ascend/patch/platform/patch_kv_cache_utils.py` |
[vllm#55390](vllm-project/vllm#55390) renamed
`_annotate_eagle_groups`'s positional-fallback param from
`use_deepseek_v4_fallback` to `use_trailing_layer_fallback`, so the
Ascend packed-KV-cache-group patch fails with an unexpected-keyword
`TypeError` | Pass the correct param per version |
| `vllm_ascend/patch/worker/patch_step3p5.py` | vLLM main replaced
`FP32ReplicatedLinear` with `GateLinear` inside `step3p5.FusedMoEBlock`,
so the gate import/construction no longer exists on main | Version-gate
the import and `_patched_fused_moe_block_init` gate construction
(`FP32ReplicatedLinear` vs `GateLinear`) |
| `vllm_ascend/patch/worker/patch_triton.py` |
[vllm#58651](vllm-project/vllm#58651) added
`packed_qk_rope.py`, whose kernel calls
`triton.next_power_of_2(rotary_dim)` with a `tl.constexpr`; the injected
host helper calls `(n-1).bit_length()`, so the Kimi vision tower's
`profile_run` aborts with `AttributeError('constexpr' object has no
attribute 'bit_length')` | On main wrap `next_power_of_2` to unwrap
`tl.constexpr` before delegating |
| `vllm_ascend/patch/worker/patch_v2/patch_model_runner.py` |
[vllm#45635](vllm-project/vllm#45635) moved
routed-experts output to the AuxOutput connector (wired in
`GPUModelRunner.initialize_kv_cache`); the Ascend fork predates it, so
the worker emits no `aux_output_connector_output` and the scheduler
raises `AssertionError: auxiliary output worker output is missing`.
[vllm#56723](vllm-project/vllm#56723) added
`dcp_sharded` and dropped `attn_cg_support` | Build
`get_aux_output_connector` when enabled (main); collect/forward
per-group `dcp_sharded`; drop `attn_cg_support` on main |
| `vllm_ascend/platform.py` |
[vllm#45635](vllm-project/vllm#45635) requires
Model Runner V2 for AuxOutput; Ascend is out-of-tree, so the upstream
guard is skipped and an MRV1 run fails with the same missing-aux-output
assertion | Add `_validate_aux_output_config`: reject
`aux_output_config.enabled` under Model Runner V1 |
| `vllm_ascend/worker/v2/aclgraph_utils.py` |
[vllm#57980](vllm-project/vllm#57980) renamed
`maybe_prepare_dcp_local_seq_lens` to `prepare_dcp_local_seq_lens` and
moved the `cp_size > 1` guard to callers;
[vllm#57632](vllm-project/vllm#57632) reaches
model methods through `ModelWithContext` during capture | Alias both DCP
helpers and guard `cp_size > 1`; add `ModelWithContext.__getattr__`
forwarding to the wrapped model on main |
| `vllm_ascend/worker/v2/block_table.py` |
[vllm#56723](vllm-project/vllm#56723) passes a
per-group `dcp_sharded` list to `BlockTables.__init__`, so engine
startup fails with `TypeError: AscendBlockTables.__init__() got an
unexpected keyword argument 'dcp_sharded'` | Version-split `__init__`
accepting and forwarding `dcp_sharded` on main |
| `vllm_ascend/worker/v2/input_batch.py` |
[vllm#57270](vllm-project/vllm#57270) added
`is_padding` to `InputBatch.make_dummy` to route profiling dummy tokens
to MoE experts | `make_dummy` accepts and forwards `is_padding` on main
|
| `vllm_ascend/worker/v2/model_runner.py` |
[vllm#56456](vllm-project/vllm#56456) added
`num_active_loras`;
[vllm#57980](vllm-project/vllm#57980) dropped
the module-level `maybe_partition_pcp_batch` and folded the aux-hidden
restore into `restore_for_sampling`, so the replicated-PCP fast path
leaves `aux_hidden_states` in the PCP-local layout and the draft copy
fails (`self [5, 4096] vs src [3, 4096]`) | Split
`prepare_inputs`/`_prepare_inputs_impl` with `num_active_loras` on main;
call `pcp_manager.partition_batch(batch, desc)`; restore PCP-local
`aux_hidden_states` on main |
| `vllm_ascend/worker/v2/pcp_manager.py` |
[vllm#57980](vllm-project/vllm#57980) replaced
`padded_num_tokens` with a `BatchExecutionDescriptor` and threads
`aux_hidden_states` through `restore_for_sampling`;
[vllm#56456](vllm-project/vllm#56456) forwards
`padded_num_reqs` | Version-split `partition_batch` (descriptor) and
`restore_for_sampling` (`aux_hidden_states`); forward `padded_num_reqs`
|
| `vllm_ascend/worker/v2/spec_decode/autoregressive/aclgraph.py` |
[vllm#58275](vllm-project/vllm#58275) makes
draft capture pass `max_query_len`; the Ascend override left it
unbounded (`num_tokens`), diverging from upstream for mixed FULL graphs
| Forward `max_query_len=desc.max_query_len or desc.uniform_token_count`
on main |
| `vllm_ascend/worker/v2/spec_decode/dflash/aclgraph.py` |
[vllm#57632](vllm-project/vllm#57632) added a
trailing `precompute_context_kv` to `DFlashCudaGraphManager.capture`, so
the Ascend override's positional `super().capture()` call shifts |
Version-split `capture`, accepting and forwarding
`precompute_context_kv` on main (passed by keyword) |
> **Notes**
> - `hidden_out` is an accidental empty file introduced by a shell
redirect in `fe6d042a0`; remove it before merging.
> - The branch commits `cacf5b7d5` (`model_runner_v1.py` routed-experts)
and `f763bc65e` (workflow edits) were reverted later in the branch, so
they do not appear in the net PR diff and are omitted.
### Does this PR introduce _any_ user-facing change?
### How was this patch tested?
- vLLM main:
vllm-project/vllm@ced6857
---------
Signed-off-by: hfadzxy <starmoon_zhang@163.com>
Signed-off-by: wxsIcey <1790571317@qq.com>
Co-authored-by: wxsIcey <1790571317@qq.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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Fixes a Model Runner V2 fast-prefill regression for batches containing LoRA
requests.
The main model dispatch and the fast-prefill dispatch must use the same
num_active_lorasvalue for a batch. This keeps the LoRA specializationconsistent between the two paths; their token counts may differ because
fast-prefill dispatches a reduced logits batch.
The main model dispatch computes the number of active LoRA adapters, but the
second dispatch in
FastPrefillHelper.prepare()always usednum_active_loras=0. A batch with an adapter could therefore select ano-LoRA CUDA graph descriptor for fast-prefill, even when the main model path
selected an eager or LoRA-specialized descriptor. The resulting padded logits
metadata could have a different token shape from the actual model input.
Pass the active-LoRA count from the main dispatch into fast-prefill so the
reduced logits dispatch uses the same LoRA specialization and computes padding
for its own token count. The production fix is limited to three worker files
(
+14/-3lines); the remaining changes are regression coverage (+61testlines).
Test Plan
active-LoRA batch, verifying that fast-prefill forwards the active-LoRA
count and does not add unrelated padding.
LoRA counts (1, 2, and 4).
tests/v1/worker/test_attn_utils.pyandtests/v1/cudagraph/test_cudagraph_manager.py.rank-8 LoRA request while fast-prefill and CUDA graphs are enabled.
Test Result
Before the fix, the regression setup selected an 8-token no-LoRA descriptor
for an active-LoRA batch whenever the no-LoRA graph was available. Across 14
token counts and 3 active-LoRA counts (42 combinations), the old choice
differed from the active-LoRA choice in 39 cases. With the fix, all 42 cases
forward the active-LoRA count and match the main dispatch's LoRA
specialization.
Tests pass:
Ruff and whitespace checks pass.
The Gemma 4 E2B mixed-batch run completed CUDA graph capture and generated
outputs for both requests (one without an adapter and one with the dummy
rank-8 adapter). This exercises model initialization, LoRA registration,
request batching, fast-prefill preparation, and graph dispatch together.
The regression is a dispatch/metadata shape error, so the worker test checks
the
BatchExecutionDescriptorcontract directly while the mixed-batch runverifies execution through the real model path.
Essential Elements of an Effective PR Description Checklist
supported_models.mdandexamplesfor a new model.BEFORE SUBMITTING, PLEASE READ https://docs.vllm.ai/en/latest/contributing (anything written below this line will be removed by GitHub Actions)