A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[Bugfix] Optimize CpuGpuBuffer initialization (#25447)
Signed-off-by: Naman Lalit <nl2688@nyu.edu>
Naman Lalit committed
Sep 26, 2025 at 17:07 UTC
4e33a7ea85cb702090c07fb7a8ebdbf44c472f5c
1 file changed
+1
-1
vllm/v1/utils.py
+1
-1
@@ -117,7 +117,7 @@ class CpuGpuBuffer:
117
dtype=dtype,
118
device="cpu",
119
pin_memory=pin_memory)
120
- self.gpu = self.cpu.to(device)
120
+ self.gpu = torch.zeros_like(self.cpu, device=device)
121
self.np: np.ndarray
122
# To keep type hints simple (avoiding generics and subclasses), we
123
# only conditionally create the numpy array attribute. This can cause