Skip to content

Commit a95b8fd

Browse files
committed
Refactor cache check to use env.is_cache_enabled() for consistency in tuner.py
1 parent 2108a9f commit a95b8fd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tilelang/autotuner/tuner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import traceback
2626
from pathlib import Path
2727

28-
from tilelang import env, is_cache_enabled
28+
from tilelang import env
2929
from tilelang.autotuner.param import CompileArgs, ProfileArgs, AutotuneResult
3030
from tilelang.autotuner.capture import get_autotune_inputs
3131
from tilelang.jit.param import _P, _RProg
@@ -279,7 +279,7 @@ def run(self, warmup: int = 25, rep: int = 100, timeout: int = 30):
279279
key = self.generate_cache_key(parameters)
280280

281281
with self._lock:
282-
if is_cache_enabled():
282+
if env.is_cache_enabled():
283283
# First check in-memory cache
284284
if key in self._memory_cache:
285285
logger.warning("Found kernel in memory cache. For better performance," \
@@ -537,7 +537,7 @@ def device_wrapper(func, device, **config_arg):
537537
logger.warning("DLPack backend does not support cache saving to disk.")
538538
else:
539539
with self._lock:
540-
if is_cache_enabled():
540+
if env.is_cache_enabled():
541541
self._save_result_to_disk(key, autotuner_result)
542542

543543
self._memory_cache[key] = autotuner_result

0 commit comments

Comments
 (0)