Skip to content

Commit

Permalink
Add pin_memory() call
Browse files Browse the repository at this point in the history
  • Loading branch information
peng1999 committed Jul 16, 2024
1 parent 550753b commit 9320301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vllm/model_executor/sampling_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ def from_lists(cls, temperatures: List[float], top_ps: List[float],
pin_memory=pin_memory,
)
if do_penalties:
prompt_tensor = torch.from_numpy(prompt_padded_tokens)
output_tensor = torch.from_numpy(output_padded_tokens)
prompt_tensor = torch.from_numpy(prompt_padded_tokens).pin_memory()
output_tensor = torch.from_numpy(output_padded_tokens).pin_memory()
else:
prompt_tensor = None
output_tensor = None
Expand Down

0 comments on commit 9320301

Please sign in to comment.