viz/cli: add Other row in profiler (#15600)

This commit is contained in:
qazal
2026-04-04 22:40:53 +09:00
committed by GitHub
parent 74ecf6d3e6
commit f7aed180e4
3 changed files with 8 additions and 3 deletions
@@ -2,4 +2,4 @@
export BENCHMARK=5
export EVAL_BS=0
VIZ=${VIZ:--1} examples/mlperf/training_submission_v6.0/tinycorp/benchmarks/llama8b/implementations/tinybox_8xMI350X/dev_run.sh
extra/viz/cli.py --profile -s "${DEV:-AMD}" | head -23
extra/viz/cli.py --profile -s "${DEV:-AMD}"
+1 -1
View File
@@ -13,7 +13,7 @@ Flags: VIZ=-1 to only save the trace to a file, VIZ=1 also launches a web server
Use `extra/viz/cli.py --profile` to list all sources.
List top slowest kernels on a source: `--profile -s "AMD" | head 10`
List top slowest kernels on a source: `--profile -s "AMD"`
List samples of a kernel on a source: `--profile -s "AMD" -i E_3 | head 4`
## Inspect codegen and PatternMatcher
+6 -1
View File
@@ -117,7 +117,12 @@ def main(args) -> None:
if agg and total > 0:
from tabulate import tabulate
items = sorted(agg.items(), key=lambda kv:kv[1][0], reverse=True)
table = [[format_colored(name), time_to_str(t, w=9), c, f"{(t/total*100.0):.2f}%"] for name,(t,c) in items]
rows = 20
table = [[format_colored(name), time_to_str(t, w=9), c, f"{(t/total*100.0):.2f}%"] for name,(t,c) in items[:rows]]
if items[rows:]:
other_t = sum(t for _,(t,_) in items[rows:])
other_c = sum(c for _,(_,c) in items[rows:])
table.append(["Other", time_to_str(other_t, w=9), other_c, f"{(other_t/total*100.0):.2f}%"])
print(tabulate(table, headers=["name", "total", "count", "pct"], tablefmt="github"))
return None