Home / Function/ _run_benchmark() — pytorch Function Reference

_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
  3c2a3e40_c658_76b5_064a_c0466a2cbf0c["_run_benchmark()"]
  e6249888_6b0d_225b_6d21_91a095fe832b["run_benchmark()"]
  e6249888_6b0d_225b_6d21_91a095fe832b -->|calls| 3c2a3e40_c658_76b5_064a_c0466a2cbf0c
  7720c5f4_4d99_dc08_206e_db4b625e9915["run_all_benchmarks()"]
  7720c5f4_4d99_dc08_206e_db4b625e9915 -->|calls| 3c2a3e40_c658_76b5_064a_c0466a2cbf0c
  style 3c2a3e40_c658_76b5_064a_c0466a2cbf0c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

benchmarks/dynamo/genai_layers/benchmark.py lines 59–70

def _run_benchmark(
    benchmark_cls,
    script_args,
):
    benchmark = benchmark_cls(script_args)
    benchmark.benchmark()
    benchmark.report_geomean_speedup()
    if script_args.print_benchmark_result:
        print(f"Benchmarking results {benchmark.name}:")
        print(benchmark.profiling_results)
    if script_args.visualize:
        benchmark.visualize()

Subdomains

Frequently Asked Questions

What does _run_benchmark() do?
_run_benchmark() is a function in the pytorch codebase.
What calls _run_benchmark()?
_run_benchmark() is called by 2 function(s): run_all_benchmarks, run_benchmark.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free