Skip to content

Commit f38f6f3

Browse files
committed
linting
1 parent 273e97e commit f38f6f3

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

helion/autotuner/base_search.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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

helion/autotuner/external.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,5 +297,5 @@ def autotune(
297297
**settings_kw,
298298
),
299299
args,
300-
**search_kw,
300+
**search_kw, # pyrefly: ignore[bad-argument-type]
301301
).autotune()

0 commit comments

Comments
 (0)