From cfd8ec741dea727db3eef1020b6bc9cb82b009a3 Mon Sep 17 00:00:00 2001 From: biondizzle Date: Tue, 19 May 2026 04:35:58 +0000 Subject: [PATCH] Debug: add shape mismatch logging in MoE apply --- vllm/patches/fused_moe/experts/cutedsl_moe.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vllm/patches/fused_moe/experts/cutedsl_moe.py b/vllm/patches/fused_moe/experts/cutedsl_moe.py index 67a0d887..77ee0f9b 100644 --- a/vllm/patches/fused_moe/experts/cutedsl_moe.py +++ b/vllm/patches/fused_moe/experts/cutedsl_moe.py @@ -313,4 +313,9 @@ class CuTeDSLMoEExperts(mk.FusedMoEExpertsModular): ) # Copy result into output tensor + if result.shape != output.shape: + import sys + print(f"[CuTeDSL MoE] SHAPE MISMATCH: result={result.shape} output={output.shape} " + f"hidden_dim={self.hidden_dim} w1={w1.shape if w1 is not None else None} " + f"hs={hidden_states.shape}", file=sys.stderr, flush=True) output.copy_(result)