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

Relationship Graph

Source Code

benchmarks/dynamo/genai_layers/benchmark.py lines 73–90

def run_benchmark(
    benchmark_name: str,
    script_args,
):
    """Run a specific benchmark."""
    if benchmark_name not in BENCHMARK_REGISTRY:
        print(f"Error: Unknown benchmark '{benchmark_name}'")
        print("Use --list to see available benchmarks")
        return False

    print(f"Running benchmark: {benchmark_name}")
    print(f"Torch compile mode: {script_args.compile_mode}")
    print("=" * 60)

    benchmark_class = BENCHMARK_REGISTRY[benchmark_name]
    _run_benchmark(benchmark_class, script_args)

    return True

Subdomains

Called By

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 1 function(s): _run_benchmark.
What calls run_benchmark()?
run_benchmark() is called by 1 function(s): main.

Analyze Your Own Codebase

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

Try Supermodel Free