@@ -135,7 +135,10 @@ def benchmark_function(self, config: Config, fn: CompiledConfig) -> float:
135135 except Exception as e :
136136 action = classify_triton_exception (e )
137137 if action == "raise" :
138- raise exc .TritonError (f"{ type (e ).__qualname__ } : { e } " , config ) from e
138+ raise exc .TritonError (
139+ f"{ type (e ).__qualname__ } : { e } " ,
140+ self .kernel .format_kernel_decorator (config , self .settings ),
141+ ) from e
139142 if action == "warn" :
140143 self .log .warning (format_triton_compile_failure (config , e ))
141144 else :
@@ -182,9 +185,8 @@ def extract_launcher(
182185 return PrecompileFuture .skip (self , config , True )
183186 except Exception :
184187 log .warning (
185- "Helion autotuner precompile error for config %r, settings %r" ,
186- config ,
187- self .settings ,
188+ "Helion autotuner precompile error for %s" ,
189+ self .kernel .format_kernel_decorator (config , self .settings ),
188190 exc_info = True ,
189191 )
190192 raise
@@ -240,10 +242,11 @@ def autotune(self) -> Config:
240242 self .log .reset ()
241243 best = self ._autotune ()
242244 end = time .perf_counter ()
245+ kernel_decorator = self .kernel .format_kernel_decorator (best , self .settings )
243246 self .log (
244247 f"Autotuning complete in { end - start :.1f} s after searching { self .counters ['benchmark' ]} configs.\n "
245248 "One can hardcode the best config and skip autotuning with:\n "
246- f" @helion.kernel(config= { best !r } ) \n " ,
249+ f" { kernel_decorator } \n " ,
247250 level = logging .INFO + 5 ,
248251 )
249252 if self .settings .print_output_code :
0 commit comments