Skip to content

Commit eb01ea9

Browse files
author
none
committed
fix
1 parent 4c1bd6e commit eb01ea9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lightllm/common/fused_moe/moe_silu_and_mul_config.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ def try_to_get_best_config(
3030
config = finded_config[min(finded_config.keys(), key=lambda x: abs(int(x) - M))]
3131
return config
3232
else:
33-
config = {"BLOCK_M": 16, "BLOCK_N": 128, "num_warps": 4, "NUM_STAGES": 5}
33+
if M < 256:
34+
config = {"BLOCK_M": 1, "BLOCK_N": 128, "num_warps": 1, "NUM_STAGES": 1}
35+
else:
36+
config = {"BLOCK_M": 16, "BLOCK_N": 128, "num_warps": 4, "NUM_STAGES": 5}
3437

3538
return config
3639

0 commit comments

Comments
 (0)