Skip to content

Commit 34a2120

Browse files
authored
[Runtime] Fix triton_key import in autotuner disk caching (#7345)
Fixes triton-lang/triton#7306 (comment)
1 parent f169591 commit 34a2120

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

python/triton/runtime/autotuner.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
from typing import Dict, Tuple, List, Optional
1010

1111
from .. import knobs
12-
from .jit import KernelInterface
12+
from .jit import KernelInterface, JITFunction
1313
from .errors import OutOfResources, PTXASError
1414
from .driver import driver
15+
from .cache import get_cache_manager, triton_key
16+
from triton._C.libtriton import get_cache_invalidating_env_vars
1517

1618

1719
class Autotuner(KernelInterface):
@@ -169,10 +171,7 @@ def check_disk_cache(self, tuning_key, configs, bench_fn):
169171
bench_fn()
170172
return False
171173

172-
from triton._C.libtriton import get_cache_invalidating_env_vars
173-
from triton.compiler.compiler import make_backend, triton_key
174-
from triton.runtime.cache import get_cache_manager
175-
from triton.runtime.jit import JITFunction
174+
from triton.compiler.compiler import make_backend
176175

177176
fn = self.fn
178177
while not isinstance(fn, JITFunction):

0 commit comments

Comments
 (0)