Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions vllm/engine/async_llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ async def step_async(self) -> List[RequestOutput]:
if not scheduler_outputs.is_empty():
# Execute the model.
output = await self.model_executor.execute_model_async(
seq_group_metadata_list, scheduler_outputs.blocks_to_swap_in,
seq_group_metadata_list,
scheduler_outputs.blocks_to_swap_in,
scheduler_outputs.blocks_to_swap_out,
scheduler_outputs.blocks_to_copy)
scheduler_outputs.blocks_to_copy,
num_lookahead_slots=scheduler_outputs.num_lookahead_slots)
else:
output = []

Expand Down
1 change: 1 addition & 0 deletions vllm/executor/executor_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ async def execute_model_async(
blocks_to_swap_in: Dict[int, int],
blocks_to_swap_out: Dict[int, int],
blocks_to_copy: Dict[int, List[int]],
num_lookahead_slots: int,
) -> SamplerOutput:
"""Executes one model step on the given sequences."""
raise NotImplementedError
Expand Down
4 changes: 3 additions & 1 deletion vllm/executor/gpu_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,12 @@ async def execute_model_async(
blocks_to_swap_in: Dict[int, int],
blocks_to_swap_out: Dict[int, int],
blocks_to_copy: Dict[int, List[int]],
num_lookahead_slots: int,
) -> SamplerOutput:
output = await make_async(self.driver_worker.execute_model)(
seq_group_metadata_list=seq_group_metadata_list,
blocks_to_swap_in=blocks_to_swap_in,
blocks_to_swap_out=blocks_to_swap_out,
blocks_to_copy=blocks_to_copy)
blocks_to_copy=blocks_to_copy,
num_lookahead_slots=num_lookahead_slots)
return output
4 changes: 3 additions & 1 deletion vllm/executor/neuron_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ async def execute_model_async(
blocks_to_swap_in: Dict[int, int],
blocks_to_swap_out: Dict[int, int],
blocks_to_copy: Dict[int, List[int]],
num_lookahead_slots: int,
) -> SamplerOutput:
output = await make_async(self.driver_worker.execute_model)(
seq_group_metadata_list=seq_group_metadata_list, )
seq_group_metadata_list=seq_group_metadata_list,
num_lookahead_slots=num_lookahead_slots)
return output

async def check_health_async(self) -> None:
Expand Down
2 changes: 2 additions & 0 deletions vllm/executor/ray_gpu_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ async def execute_model_async(
blocks_to_swap_in: Dict[int, int],
blocks_to_swap_out: Dict[int, int],
blocks_to_copy: Dict[int, List[int]],
num_lookahead_slots: int,
) -> SamplerOutput:
all_outputs = await self._run_workers_async(
"execute_model",
Expand All @@ -428,6 +429,7 @@ async def execute_model_async(
"blocks_to_swap_in": blocks_to_swap_in,
"blocks_to_swap_out": blocks_to_swap_out,
"blocks_to_copy": blocks_to_copy,
"num_lookahead_slots": num_lookahead_slots,
})

# Only the driver worker returns the sampling results.
Expand Down