@@ -337,16 +337,17 @@ def create_precompile_future(
337337 A ``PrecompileFuture`` that resolves to True on success or False on
338338 failure/timeout when called.
339339 """
340- ctx = self .benchmark_provider ._precompile_context ()
340+ # TODO(hinriksnaer): migrate create_precompile_future to BenchmarkProvider
341+ bp = self .benchmark_provider
342+ assert isinstance (bp , LocalBenchmarkProvider )
343+ ctx = bp ._precompile_context ()
341344 if not self .settings .autotune_precompile :
342345 return PrecompileFuture .skip (ctx , config , True )
343346 mode = self .settings .autotune_precompile
344347 if mode not in {"fork" , "spawn" }:
345348 raise exc .InvalidAPIUsage ("autotune_precompile must be 'fork' or 'spawn'" )
346- if len (self .benchmark_provider .mutated_arg_indices ) > 0 :
347- args = _clone_args (
348- self .args , idx_to_clone = self .benchmark_provider .mutated_arg_indices
349- )
349+ if len (bp .mutated_arg_indices ) > 0 :
350+ args = _clone_args (self .args , idx_to_clone = bp .mutated_arg_indices )
350351 else :
351352 args = self .args
352353
@@ -355,8 +356,8 @@ def create_precompile_future(
355356 config = config ,
356357 fn = fn ,
357358 args = args ,
358- result_path = self . benchmark_provider ._next_precompile_result_path (),
359- args_path = self . benchmark_provider ._precompile_args_path ,
359+ result_path = bp ._next_precompile_result_path (),
360+ args_path = bp ._precompile_args_path ,
360361 )
361362
362363 # TODO(hinriksnaer): migrate _benchmark to BenchmarkProvider
0 commit comments