Skip to content

Commit d5903c6

Browse files
p88hnjhill
andcommitted
Apply suggestions from code review
Co-authored-by: Nick Hill <[email protected]> Signed-off-by: Staszek Pasko <[email protected]>
1 parent e45c80a commit d5903c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/v1/serial_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _encode_tensor(
137137
self, obj: torch.Tensor
138138
) -> tuple[str, tuple[int, ...], Union[int, memoryview]]:
139139
assert self.aux_buffers is not None
140-
# this creates a copy of the tensor
140+
# this creates a copy of the tensor if it's not already contiguous
141141
obj = obj.contiguous()
142142
# view the tensor as a 1D array of bytes
143143
arr = obj.view((obj.numel(), )).view(torch.uint8).numpy()

0 commit comments

Comments
 (0)