MCPcopy Index your code
hub / github.com/FlashSampling/FlashSampling / bench_fn

Function bench_fn

src/fused_mm_sampling/persistent_matmul.py:722–729  ·  view source on GitHub ↗
(label, reps, warmup_reps, fn, *args)

Source from the content-addressed store, hash-verified

720
721
722def bench_fn(label, reps, warmup_reps, fn, *args):
723 print(f"Benchmarking {label}: ...", end="")
724 for _ in range(warmup_reps):
725 fn(*args)
726 with proton_context():
727 for _ in range(reps):
728 fn(*args)
729 print(f"\rBenchmarking {label}: done")
730
731
732def bench(M, N, K, dtype, reps=100, warmup_reps=100):

Callers 1

benchFunction · 0.85

Calls 2

proton_contextFunction · 0.85
fnFunction · 0.50

Tested by

no test coverage detected