From 1ff20d19cc98b16f829def1acd9bf26817b111bc Mon Sep 17 00:00:00 2001 From: liziyu Date: Tue, 19 Aug 2025 10:30:04 +0800 Subject: [PATCH] [bugfix] ascend schedule encountered an incorrect req block length in the check_watermark_for_prefill function 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 dfdc9aa863..40e8403456 100644 --- a/vllm_ascend/core/scheduler.py +++ b/vllm_ascend/core/scheduler.py @@ -417,7 +417,7 @@ def _check_watermark_for_prefill(self, 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)