From 5889fa1b1cddb283b5e2c206d08062bef8432cbd Mon Sep 17 00:00:00 2001 From: liziyu <56102866+liziyu179@users.noreply.github.com> Date: Wed, 3 Sep 2025 16:54:39 +0800 Subject: [PATCH] [bugfix] ascend schedule encountered an incorrect req block length in the check_watermark_for_prefill function (#2508) ### What this PR does / why we need it? bugfix ascend schedule encountered an incorrect req block length in the check_watermark_for_prefill function ### Does this PR introduce _any_ user-facing change? ### How was this patch tested? - vLLM version: v0.10.1.1 - vLLM main: https://github.com/vllm-project/vllm/commit/426cc8629f7e630e1c5a0b96fe2db737a170a06d Signed-off-by: liziyu --- vllm_ascend/core/scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vllm_ascend/core/scheduler.py b/vllm_ascend/core/scheduler.py index e4fef28..f274d3d 100644 --- a/vllm_ascend/core/scheduler.py +++ b/vllm_ascend/core/scheduler.py @@ -465,7 +465,7 @@ class AscendScheduler(Scheduler): self.block_size) req_blocks = self.kv_cache_manager.coordinator.get_blocks( request.request_id) - num_new_blocks = (num_required_blocks - len(req_blocks) - + num_new_blocks = (num_required_blocks - len(req_blocks[0]) - len(computed_blocks)) num_evictable_computed_blocks = sum(1 for blk in computed_blocks if blk.ref_cnt == 0)