Skip to content

Commit 96aa00b

Browse files
committed
Lint Toolchain quick fixes
1 parent 5c4eb09 commit 96aa00b

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

toolchain/mfc/bench.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def bench(targets = None):
8282
def diff():
8383
lhs, rhs = file_load_yaml(ARG("lhs")), file_load_yaml(ARG("rhs"))
8484
cons.print(f"[bold]Comparing Benchmarks: Speedups from [magenta]{os.path.relpath(ARG('lhs'))}[/magenta] to [magenta]{os.path.relpath(ARG('rhs'))}[/magenta] are displayed below. Thus, numbers > 1 represent increases in performance.[/bold]")
85-
85+
8686
if lhs["metadata"] != rhs["metadata"]:
8787
_lock_to_str = lambda lock: ' '.join([f"{k}={v}" for k, v in lock.items()])
8888
cons.print(f"[bold yellow]Warning[/bold yellow]: Metadata in lhs and rhs are not equal.\n"
@@ -126,17 +126,17 @@ def diff():
126126
if not math.isfinite(lhs_summary[target.name]["grind"]) or not math.isfinite(rhs_summary[target.name]["grind"]):
127127
err = 1
128128
cons.print(f"lhs_summary or rhs_summary reports non-real grind time for {target.name} - Case: {slug}")
129-
130-
grind_time_value = lhs_summary[target.name]["grind"] / rhs_summary[target.name]["grind"]
131-
speedups += f" & Grind: {grind_time_value:.2f}"
132-
if grind_time_value <0.98:
133-
raise MFCException(f"Benchmarking failed since grind time speedup for {target.name} below acceptable threshold (<0.98) - Case: {slug}")
129+
130+
grind_time_value = lhs_summary[target.name]["grind"] / rhs_summary[target.name]["grind"]
131+
speedups += f" & Grind: {grind_time_value:.2f}"
132+
if grind_time_value <0.98:
133+
raise MFCException(f"Benchmarking failed since grind time speedup for {target.name} below acceptable threshold (<0.98) - Case: {slug}")
134134
except Exception as _:
135135
err = 1
136136
cons.print(f"lhs_summary or rhs_summary reports non-real grind time for {target.name} - Case: {slug}")
137-
137+
138138
table.add_row(f"[magenta]{slug}[/magenta]", *speedups)
139-
139+
140140
cons.raw.print(table)
141141
if err:
142142
raise MFCException("Benchmarking failed")

0 commit comments

Comments
 (0)