run_benchmark() — pytorch Function Reference
Architecture documentation for the run_benchmark() function in benchmark.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD 5a01be28_6429_ebf7_fc47_02232b445a1f["run_benchmark()"] 8a4f57e1_634a_07c6_3a9a_c44f7ba2dbe1["sweep()"] 8a4f57e1_634a_07c6_3a9a_c44f7ba2dbe1 -->|calls| 5a01be28_6429_ebf7_fc47_02232b445a1f 320a5772_c0de_3469_ef0c_57110d2440fd["benchmark_process_group()"] 5a01be28_6429_ebf7_fc47_02232b445a1f -->|calls| 320a5772_c0de_3469_ef0c_57110d2440fd 9cb370ea_5749_29d9_5dca_4a2b481fcfac["allgather_object()"] 5a01be28_6429_ebf7_fc47_02232b445a1f -->|calls| 9cb370ea_5749_29d9_5dca_4a2b481fcfac style 5a01be28_6429_ebf7_fc47_02232b445a1f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/distributed/ddp/benchmark.py lines 86–97
def run_benchmark(benchmark, ranks, opts):
group = dist.new_group(ranks=ranks, backend=benchmark.distributed_backend)
measurements = []
if dist.get_rank() in set(ranks):
if not opts:
opts = {}
measurements = benchmark_process_group(group, benchmark, **opts)
dist.destroy_process_group(group)
dist.barrier()
# Aggregate measurements for better estimation of percentiles
return list(itertools.chain(*allgather_object(measurements)))
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does run_benchmark() do?
run_benchmark() is a function in the pytorch codebase.
What does run_benchmark() call?
run_benchmark() calls 2 function(s): allgather_object, benchmark_process_group.
What calls run_benchmark()?
run_benchmark() is called by 1 function(s): sweep.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free