Skip to content

Commit eb73b03

Browse files
authored
[FRONTEND] Restor previous behavior of the cache hook (#7104)
The name return should be relative to the module. This restore the behavior before triton-lang/triton#7025
1 parent 919c9d2 commit eb73b03

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

python/triton/runtime/jit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,12 +475,13 @@ def _call_hook(
475475
if not hook:
476476
return None
477477

478-
name = get_full_name(self.fn)
478+
name = self.fn.__qualname__
479479
module = self.fn.__module__
480480
arg_reprs = ", ".join([f"{param.name}: {ty}" for param, ty in zip(self.params, key[1])])
481481
repr = f"{name}[num_warps={options.num_warps}, num_ctas={options.num_ctas}, num_stages={options.num_stages}, enable_fp_fusion={options.enable_fp_fusion}, launch_cooperative_grid={options.launch_cooperative_grid}]({arg_reprs})"
482+
full_name = get_full_name(self.fn)
482483

483-
specialization_data = serialize_specialization_data(name, signature, constants, configs[0], options, key)
484+
specialization_data = serialize_specialization_data(full_name, signature, constants, configs[0], options, key)
484485

485486
kwargs = {
486487
'signature': signature,

0 commit comments

Comments
 (0)