Skip to content

Commit

Permalink
fix xpu
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
  • Loading branch information
youkaichao committed Jan 22, 2025
1 parent ce49aa9 commit a677f83
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vllm/worker/xpu_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,8 @@ def __init__(
SamplingMetadataCache() \
if self.parallel_config.pipeline_parallel_size == 1 else None

self.builder = self._builder_cls(weakref.proxy(self))

def load_model(self) -> None:
with DeviceMemoryProfiler() as m:
self.model = get_model(vllm_config=self.vllm_config)
Expand Down Expand Up @@ -521,7 +523,8 @@ def _prepare_model_input_tensors(
metadata for possible additional steps, e.g., sampling.
"""
builder = self._builder_cls(weakref.proxy(self), finished_requests_ids)
builder = self.builder
builder.prepare(finished_requests_ids)
for seq_group_metadata in seq_group_metadata_list:
builder.add_seq_group(seq_group_metadata)

Expand Down

0 comments on commit a677f83

Please sign in to comment.