diff --git a/tuner/tuner/candidate_gen_test.py b/tuner/tuner/candidate_gen_test.py index 71ed7e1ff..d135a8502 100644 --- a/tuner/tuner/candidate_gen_test.py +++ b/tuner/tuner/candidate_gen_test.py @@ -94,11 +94,11 @@ def test_get_td_spec_contraction(tuner_ctx: common.TunerContext) -> None: td_spec_module = tuner.get_td_spec(ir_module, compilation_info) assert td_spec_module - named_sequence_ops: list[transform.NamedSequenceOp] = ( - op_matchers.get_ops_from_module( - module=td_spec_module, - fn=lambda op: isinstance(op.opview, transform.NamedSequenceOp), - ) + named_sequence_ops: list[ + transform.NamedSequenceOp + ] = op_matchers.get_ops_from_module( + module=td_spec_module, + fn=lambda op: isinstance(op.opview, transform.NamedSequenceOp), ) apply_config_sequence = None matcher_sequence = None @@ -176,11 +176,11 @@ def test_get_td_spec_convolution(tuner_ctx: common.TunerContext) -> None: td_spec_module = tuner.get_td_spec(ir_module, compilation_info) assert td_spec_module - named_sequence_ops: list[transform.NamedSequenceOp] = ( - op_matchers.get_ops_from_module( - module=td_spec_module, - fn=lambda op: isinstance(op.opview, transform.NamedSequenceOp), - ) + named_sequence_ops: list[ + transform.NamedSequenceOp + ] = op_matchers.get_ops_from_module( + module=td_spec_module, + fn=lambda op: isinstance(op.opview, transform.NamedSequenceOp), ) apply_config_sequence = None matcher_sequence = None diff --git a/tuner/tuner/libtuner.py b/tuner/tuner/libtuner.py index d6ee92310..6bece17f4 100644 --- a/tuner/tuner/libtuner.py +++ b/tuner/tuner/libtuner.py @@ -1017,9 +1017,10 @@ def parse_dispatch_benchmark_results( benchmark_time = res.get_mean_time_us() assert benchmark_time is not None candidate_trackers[candidate_id].first_benchmark_time = benchmark_time - candidate_trackers[candidate_id].spec_path = ( - path_config.specs_dir - / path_config.get_candidate_spec_filename(candidate_id) + candidate_trackers[ + candidate_id + ].spec_path = path_config.specs_dir / path_config.get_candidate_spec_filename( + candidate_id ) mlir_path = candidate_trackers[candidate_id].dispatch_mlir_path spec_path = candidate_trackers[candidate_id].spec_path @@ -1283,9 +1284,9 @@ def parse_model_benchmark_results( ] dump_list = [] - incomplete_list: list[tuple[int, Optional[str]]] = ( - [] - ) # format: [(candidate_id, device_id)] + incomplete_list: list[ + tuple[int, Optional[str]] + ] = [] # format: [(candidate_id, device_id)] baseline_time = None for same_device_results in grouped_benchmark_results: @@ -1337,9 +1338,9 @@ def parse_model_benchmark_results( calibrated_benchmark_diff = ( benchmark_time - baseline_time ) / baseline_time - candidate_trackers[candidate_id].calibrated_benchmark_diff = ( - calibrated_benchmark_diff - ) + candidate_trackers[ + candidate_id + ].calibrated_benchmark_diff = calibrated_benchmark_diff else: calibrated_benchmark_diff = None