Skip to content

Commit b04e5c5

Browse files
committed
Address review comments
Signed-off-by: Xiaodong Ye <[email protected]>
1 parent 64f137e commit b04e5c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/compare-test-backend-ops-perf.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
logging.basicConfig(level=logging.INFO, format="%(message)s")
1212

1313

14-
def parse_benchmark_line(line: str):
14+
def parse_benchmark_line(line: str) -> tuple[str, float]:
1515
"""
1616
Parses a single line of benchmark output.
1717
@@ -43,8 +43,10 @@ def parse_benchmark_line(line: str):
4343
gflops = value * 1000
4444
elif unit == "MFLOPS":
4545
gflops = value / 1000
46-
else: # GFLOPS
46+
elif unit == "GFLOPS":
4747
gflops = value
48+
else:
49+
assert False
4850

4951
return key, gflops
5052

0 commit comments

Comments
 (0)