Skip to content

Commit 87a7af8

Browse files
sufubaosufubao
andauthored
fix autotune and benchmark (#1037)
Co-authored-by: sufubao <1411045825@qq.com>
1 parent 7781fb7 commit 87a7af8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

lightllm/common/triton_utils/autotuner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,9 @@ def __call__(self, *args, **kwargs):
144144
if static_key not in self.cached_configs and autotune_level == AutotuneLevel.USE_AUTOTUNE_HIS_CONFIG:
145145
if (dist.is_initialized() and get_current_rank_in_node() == 0) or not dist.is_initialized():
146146
logger.warning(
147-
f"No kernel config for {self.kernel_name} in {KernelConfigs.get_config_file_name(static_key)}",
147+
f"No kernel config for {self.kernel_name} in {KernelConfigs.get_config_file_name(static_key)},"
148+
f"the performance may be suboptimal!"
149+
f"You can use LIGHTLLM_TRITON_AUTOTUNE_LEVEL=1 to enable autotune.",
148150
)
149151
self.cached_configs[static_key] = {}
150152

test/benchmark/kernel/benchmark_fused_moe_triton.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import triton
77
from transformers import AutoConfig
88
from lightllm.common.fused_moe.topk_select import select_experts
9-
from lightllm.common.fused_moe.grouped_fused_moe import fused_experts_impl
9+
from lightllm.common.fused_moe.grouped_fused_moe import fused_experts
1010

1111

1212
def get_model_config(model_name: str, tp_size: int):
@@ -98,7 +98,7 @@ def fused_moe_lightllm_api(
9898
)
9999
use_fp8_w8a8 = use_fp8_w8a8
100100

101-
return fused_experts_impl(
101+
return fused_experts(
102102
hidden_states=x,
103103
w1=w1,
104104
w2=w2,

0 commit comments

Comments
 (0)