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

Function _discover_rerun_folders

benchmarking/plot-triton-bench.py:473–490  ·  view source on GitHub ↗

Find sibling rerun folders (e.g. b200-rerun1/tp1) for a primary folder. ``folder`` is typically ``.../ / ``. The parent's siblings matching `` -rerun*`` provide additional runs of the same configuration.

(folder: Path)

Source from the content-addressed store, hash-verified

471
472
473def _discover_rerun_folders(folder: Path) -> list[Path]:
474 """Find sibling rerun folders (e.g. b200-rerun1/tp1) for a primary folder.
475
476 ``folder`` is typically ``.../<gpu>/<tp>``. The parent&#x27;s siblings matching
477 ``<gpu>-rerun*`` provide additional runs of the same configuration.
478 """
479 gpu_dir = folder.parent
480 base_name = gpu_dir.name
481 tp_name = folder.name
482 matches = sorted(gpu_dir.parent.glob(f"{base_name}-rerun*"))
483 rerun_folders = [m / tp_name for m in matches if (m / tp_name).is_dir()]
484 if rerun_folders:
485 print(f"Errorbars: aggregating {len(rerun_folders)} rerun folder(s):")
486 for r in rerun_folders:
487 print(f" - {r}")
488 else:
489 print("Errorbars requested but no rerun folders found; bars will have no error bars.")
490 return rerun_folders
491
492
493def create_and_triton_bench_plots(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected