Skip to content

Commit 9320301

Browse files
committed
Add pin_memory() call
1 parent 550753b commit 9320301

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/model_executor/sampling_metadata.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,8 @@ def from_lists(cls, temperatures: List[float], top_ps: List[float],
522522
pin_memory=pin_memory,
523523
)
524524
if do_penalties:
525-
prompt_tensor = torch.from_numpy(prompt_padded_tokens)
526-
output_tensor = torch.from_numpy(output_padded_tokens)
525+
prompt_tensor = torch.from_numpy(prompt_padded_tokens).pin_memory()
526+
output_tensor = torch.from_numpy(output_padded_tokens).pin_memory()
527527
else:
528528
prompt_tensor = None
529529
output_tensor = None

0 commit comments

Comments
 (0)