Skip to content

Commit d31a517

Browse files
panpan0000BBuf
authored andcommitted
[fix] benchmark : routed_scaling_factor is None (sgl-project#8059)
Co-authored-by: Xiaoyu Zhang <[email protected]>
1 parent ab99645 commit d31a517

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sgl-kernel/benchmark/bench_moe_fused_gate.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ def biased_grouped_topk_org(scores, bias, num_expert_group, topk_group, topk):
1818
renormalize=True,
1919
num_expert_group=num_expert_group,
2020
topk_group=topk_group,
21+
routed_scaling_factor=2.5, # DeepSeek-R1 : 2.5, Kimi K2: 2.872
2122
)
2223

2324

24-
def biased_grouped_topk_org_kernel(scores, bias, num_expert_group, topk_group, topk):
25+
def biased_grouped_topk_org_fuse_kernel(
26+
scores, bias, num_expert_group, topk_group, topk
27+
):
2528
return moe_fused_gate(scores, bias, num_expert_group, topk_group, topk)
2629

2730

@@ -61,7 +64,7 @@ def benchmark(seq_length, provider):
6164
)
6265
elif provider == "kernel":
6366
ms, min_ms, max_ms = triton.testing.do_bench(
64-
lambda: biased_grouped_topk_org_kernel(
67+
lambda: biased_grouped_topk_org_fuse_kernel(
6568
scores.clone(), bias.clone(), num_expert_group, topk_group, topk
6669
),
6770
quantiles=quantiles,

0 commit comments

Comments
 (0)