MCPcopy Create free account
hub / github.com/FlashSampling/FlashSampling / main

Function main

benchmarking/plot_ncu_kernel_breakdown.py:26–42  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24
25
26def main():
27 args = parse_args()
28 base = Path(args.dir)
29 bsz_dirs = sorted(base.glob("bsz*"), key=lambda p: int(p.name[3:]))
30 assert bsz_dirs, f"No bszN/ directories found in {base}"
31
32 out_dir = base / "kernel-breakdowns"
33 out_dir.mkdir(exist_ok=True)
34
35 methods = list(METHOD_FILENAMES.keys()) if args.method == "all" else [args.method]
36 for method in methods:
37 df = load_method(base, bsz_dirs, method)
38 if df.empty:
39 print(f"No data for {method}, skipping")
40 continue
41 out = out_dir / f"{method}.{args.fmt}"
42 plot_breakdown(df, out, method)
43
44
45def parse_args():

Callers 1

Calls 3

load_methodFunction · 0.85
plot_breakdownFunction · 0.85
parse_argsFunction · 0.70

Tested by

no test coverage detected