diff --git a/vllm/_custom_ops.py b/vllm/_custom_ops.py index cb4bd28f26..f8a42ad544 100644 --- a/vllm/_custom_ops.py +++ b/vllm/_custom_ops.py @@ -57,11 +57,11 @@ def create_fp4_scale_tensor( rounded_m = round_up(m, 128) scale_n = n // block_size rounded_n = round_up(scale_n, 4) - return torch.zeros( + return torch.empty( (rounded_m, rounded_n // 4), device=device, dtype=torch.int32 ) else: - return torch.zeros((m, n // block_size), device=device, dtype=torch.uint8) + return torch.empty((m, n // block_size), device=device, dtype=torch.uint8) def create_fp4_output_tensors( diff --git a/vllm/model_executor/layers/mamba/gdn_linear_attn.py b/vllm/model_executor/layers/mamba/gdn_linear_attn.py index 9b8a8ef9ce..12620feaa1 100644 --- a/vllm/model_executor/layers/mamba/gdn_linear_attn.py +++ b/vllm/model_executor/layers/mamba/gdn_linear_attn.py @@ -1094,7 +1094,6 @@ class GatedDeltaNetAttention(PluggableLayer, MambaBase): ) core_attn_out.zero_() - z_out.zero_() num_tokens_all = qkvz.shape[0] mixed_qkv, z, b, a = self.prepare_gdn_attention_core_inputs( qkvz, ba, num_tokens_all diff --git a/vllm/model_executor/layers/quantization/utils/fp8_utils.py b/vllm/model_executor/layers/quantization/utils/fp8_utils.py index 09b31add3b..f1a0209c6e 100644 --- a/vllm/model_executor/layers/quantization/utils/fp8_utils.py +++ b/vllm/model_executor/layers/quantization/utils/fp8_utils.py @@ -255,7 +255,7 @@ def silu_mul_quant_fp8_packed_triton( if output_q is None: output_q = torch.empty((M, N_2), dtype=fp8_dtype, device=input.device) - output_scale_packed = torch.zeros( + output_scale_packed = torch.empty( (num_packed_groups, tma_aligned_M), dtype=torch.int32, device=input.device, diff --git a/vllm/v1/attention/backends/turboquant_attn.py b/vllm/v1/attention/backends/turboquant_attn.py index 53684b4360..3bf3b6b824 100644 --- a/vllm/v1/attention/backends/turboquant_attn.py +++ b/vllm/v1/attention/backends/turboquant_attn.py @@ -454,7 +454,7 @@ class TurboQuantAttentionImpl(AttentionImpl["TurboQuantMetadata"]): ) else: # Mixed batch: decodes first (guaranteed by reorder_batch). - attn_out = torch.zeros( + attn_out = torch.empty( N, self.num_heads, self.head_size, device=device, dtype=q.dtype )