Skip to content

Commit fdb0e56

Browse files
committed
Don't fill tensor with 0
Signed-off-by: Hui Gao <[email protected]>
1 parent 2854f0c commit fdb0e56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorrt_llm/_torch/memory_buffer_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def get_buffer(self, tensor_shape: list[int], dtype: torch.dtype,
9191
new_buffer_tensor = None
9292
try:
9393
with torch.cuda.memory.use_mem_pool(get_shared_pool()):
94-
new_buffer_tensor = torch.zeros((required_memory_size, ),
94+
new_buffer_tensor = torch.empty((required_memory_size, ),
9595
device='cuda',
9696
dtype=torch.uint8)
9797
except Exception as ex:

0 commit comments

Comments
 (0)