Skip to content

Commit 05b52ec

Browse files
authored
Fix nits in script (flagos-ai#2373)
1 parent 5fac540 commit 05b52ec

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

tools/run_tests.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,13 @@ def dedup(fn):
297297

298298
def run_accuracy(gpu_id, start, index, count):
299299
op = OP_LIST[start + index].strip()
300-
n = index * 10 // count
300+
n = (index + 1) * 10 // count
301+
total = len(OP_LIST)
301302
prog = "█" * n + " " * (10 - n)
302-
pinfo(f"[GPU {gpu_id:2d}][{index:3d}][{prog}] Running accuracy tests for '{op}'")
303+
pinfo(
304+
f"[GPU {gpu_id:2d}][{start + index:3d}/{total:3d}][{prog}] "
305+
"Running accuracy tests for '{op}'"
306+
)
303307
env = get_env(str(gpu_id))
304308

305309
if op in NO_CPU_LIST:
@@ -414,9 +418,13 @@ def run_benchmark(gpu_id, start, index, count):
414418
This returns a dict as report summary.
415419
"""
416420
op = OP_LIST[start + index].strip()
417-
n = index * 10 // count
421+
total = len(OP_LIST)
422+
n = (index + 1) * 10 // count
418423
prog = "█" * n + " " * (10 - n)
419-
pinfo(f"[GPU {gpu_id:2d}][{index:3d}][{prog} Running perf benchmark for '{op}'")
424+
pinfo(
425+
f"[GPU {gpu_id:2d}][{start + index:3d}/{total:3d}][{prog}] "
426+
"Running perf benchmark for '{op}'"
427+
)
420428

421429
env = get_env(str(gpu_id))
422430

0 commit comments

Comments
 (0)