From 0090df5d643163eeb5b9fdc8a12be7e69010fde3 Mon Sep 17 00:00:00 2001 From: Yuhao Yang <47235274+yhyang201@users.noreply.github.com> Date: Sat, 12 Sep 2026 03:01:50 +0800 Subject: [PATCH] Gate the G=1 wo_a GEMV to sm90 --- python/sglang/srt/models/deepseek_v4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/models/deepseek_v4.py b/python/sglang/srt/models/deepseek_v4.py index 8c306e2413..18cfd3b0a2 100644 --- a/python/sglang/srt/models/deepseek_v4.py +++ b/python/sglang/srt/models/deepseek_v4.py @@ -496,7 +496,7 @@ def _apply_wo_a_bf16_matmul( ) ) and o.shape[2] == 4096 - and o.shape[1] in (1, 2) + and (o.shape[1] == 2 or (o.shape[1] == 1 and get_platform().is_sm90)) and wo_a.shape == (o.shape[1], 1024, 4096) and o.dtype == wo_a.dtype == torch.bfloat16 and o.stride(2) == 1