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 7, 05:15 UTC
[Perf] Optimize FusedMoEModularKernel output tensor using torch.empty (#35794)
Signed-off-by: Xin Yang <xyangx@amazon.com>
Xin Yang committed
Mar 5, 2026 at 10:47 UTC
f9170209834af0e8e53a6d16ccd17eacc0db2c67
1 file changed
+1
-1
vllm/model_executor/layers/fused_moe/modular_kernel.py
+1
-1
@@ -1519,7 +1519,7 @@ class FusedMoEKernelModularImpl:
1519
assert not disable_inplace()
1520
output = hidden_states
1521
else:
1522
- output = torch.zeros_like(hidden_states)
1522
+ output = torch.empty_like(hidden_states)
1523
1524
local_num_experts = w1.size(0)
1525
if global_num_experts == -1: