Skip to content

Commit e45c80a

Browse files
p88hnjhill
andcommitted
Update vllm/v1/serial_utils.py
Co-authored-by: Nick Hill <[email protected]> Signed-off-by: Staszek Pasko <[email protected]>
1 parent cd4a2d4 commit e45c80a

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
@@ -138,7 +138,7 @@ def _encode_tensor(
138138
) -> tuple[str, tuple[int, ...], Union[int, memoryview]]:
139139
assert self.aux_buffers is not None
140140
# this creates a copy of the tensor
141-
obj = obj.contiguous() if not obj.is_contiguous() else obj
141+
obj = obj.contiguous()
142142
# view the tensor as a 1D array of bytes
143143
arr = obj.view((obj.numel(), )).view(torch.uint8).numpy()
144144
if obj.nbytes < self.size_threshold:

0 commit comments

Comments
 (0)