Skip to content

Commit 6aab772

Browse files
quanliu1991xuebwang-amd
authored andcommitted
[Bugfix][Core]Fix block table out-of-range issue in priority scheduling (vllm-project#26661)
Signed-off-by: quanliu <18646313696@163.com> Signed-off-by: xuebwang-amd <xuebwang@amd.com>
1 parent d890c3c commit 6aab772

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vllm/v1/core/sched/scheduler.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,9 @@ def schedule(self) -> SchedulerOutput:
271271
self.running.remove(preempted_req)
272272
if preempted_req in scheduled_running_reqs:
273273
scheduled_running_reqs.remove(preempted_req)
274+
token_budget += num_scheduled_tokens[preempted_req.request_id]
275+
req_to_new_blocks.pop(preempted_req.request_id)
276+
num_scheduled_tokens.pop(preempted_req.request_id)
274277
else:
275278
preempted_req = self.running.pop()
276279

0 commit comments

Comments
 (0)