Skip to content

Commit

Permalink
[Core] Refactor: Clean up unused argument in Scheduler._preempt (#9696)
Browse files Browse the repository at this point in the history
Signed-off-by: André Jonasson <[email protected]>
  • Loading branch information
andrejonasson authored Nov 1, 2024
1 parent 1dd4cb2 commit 4581d2c
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions vllm/core/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -828,8 +828,7 @@ def _schedule_priority_preemption(
num_running_seqs)

#Preempt out the victim sequence group
self._preempt(vseq_group, blocks_to_swap_out,
PreemptionMode.RECOMPUTE)
self._preempt(vseq_group, blocks_to_swap_out)
waiting_queue.appendleft(vseq_group)
force_preemption_count += 1
#Put the sequence back into the waiting queue
Expand Down Expand Up @@ -1451,12 +1450,8 @@ def _append_slots(self,
if len(cows) > 0:
blocks_to_copy.extend(cows)

def _preempt(
self,
seq_group: SequenceGroup,
blocks_to_swap_out: List[Tuple[int, int]],
preemption_mode: Optional[PreemptionMode] = None,
) -> PreemptionMode:
def _preempt(self, seq_group: SequenceGroup,
blocks_to_swap_out: List[Tuple[int, int]]) -> PreemptionMode:
# If preemption mode is not specified, we determine the mode as follows:
# We use recomputation by default since it incurs lower overhead than
# swapping. However, when the sequence group has multiple sequences
Expand Down

0 comments on commit 4581d2c

Please sign in to comment.