[Kernel] Add router GEMM kernels for (5120, 256) and BF16 output to ll_bf16_gemm (#62042)

Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: Lain <fusiyuan2000@gmail.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: vllm-agent <claw@inferact.ai>
This commit is contained in:
Woosuk Kwon
2026-10-16 15:39:46 -07:00
committed by GitHub
co-authored by Lain Codex Claude Opus 5.5 vllm-agent
parent 153a17166e
commit 596e530675
12 changed files with 258 additions and 64 deletions
+5
View File
@@ -2424,6 +2424,11 @@ def grouped_topk(
raise NotImplementedError(
"The fused grouped_topk kernel is only available on CUDA and XPU platforms"
)
if scores.shape[0] == 0:
return (
scores.new_empty((0, topk), dtype=torch.float32),
scores.new_empty((0, topk), dtype=torch.int32),
)
return torch.ops._moe_C.grouped_topk(
scores,
num_expert_group,