Skip to content

Commit 07838f1

Browse files
committed
fix
1 parent f7f8a54 commit 07838f1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lightllm/common/triton_utils/autotuner.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from lightllm.utils.device_utils import get_current_device_name
1313
from lightllm.utils.log_utils import init_logger
1414
from typing import Callable, Optional, Union, List
15-
from lightllm.utils.envs_utils import get_triton_autotune_level, get_triton_autotune_warmup
15+
from lightllm.utils.envs_utils import get_triton_autotune_level
1616
from lightllm.common.kernel_config import KernelConfigs
1717
from lightllm.utils.dist_utils import get_global_world_size, get_global_rank, get_current_rank_in_node
1818

@@ -171,7 +171,10 @@ def __call__(self, *args, **kwargs):
171171
)
172172
self.cached_configs[static_key] = {}
173173

174-
if autotune_level in [AutotuneLevel.ADAPTIVE_AUTOTUNE, AutotuneLevel.FORCE_AUTOTUNE]:
174+
if (
175+
autotune_level in [AutotuneLevel.ADAPTIVE_AUTOTUNE, AutotuneLevel.FORCE_AUTOTUNE]
176+
and Autotuner.is_autotune_warmup()
177+
):
175178
need_tuning = (autotune_level == AutotuneLevel.FORCE_AUTOTUNE) or (
176179
run_key not in self.cached_configs.get(static_key, {})
177180
)

0 commit comments

Comments
 (0)