Skip to content

Commit f04d604

Browse files
authored
[Minor] Zero-initialize attn output buffer (#19784)
Signed-off-by: Woosuk Kwon <woosuk.kwon@berkeley.edu>
1 parent 19a53b2 commit f04d604

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vllm/attention/layer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ def forward(
209209
if self.use_output:
210210
output_shape = (output_shape
211211
if output_shape is not None else query.shape)
212-
output = torch.empty(output_shape,
212+
output = torch.zeros(output_shape,
213213
dtype=query.dtype,
214214
device=query.device)
215215
hidden_size = output_shape[-1]

0 commit comments

Comments
 (0)