get_dynamo_stats() — pytorch Function Reference
Architecture documentation for the get_dynamo_stats() function in common.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD f00a6213_f2a3_0eef_9451_ee5a24d1ab9f["get_dynamo_stats()"] 79f63331_206c_51dc_bfd1_4fd84b939754["check_accuracy()"] 79f63331_206c_51dc_bfd1_4fd84b939754 -->|calls| f00a6213_f2a3_0eef_9451_ee5a24d1ab9f c52cc8f1_b576_9d50_98d9_34f721215c0e["run_performance_test_non_alternate()"] c52cc8f1_b576_9d50_98d9_34f721215c0e -->|calls| f00a6213_f2a3_0eef_9451_ee5a24d1ab9f d162fe35_2cc5_7738_ed94_76ad697846ef["run_performance_test()"] d162fe35_2cc5_7738_ed94_76ad697846ef -->|calls| f00a6213_f2a3_0eef_9451_ee5a24d1ab9f 9bf8449e_2d7f_c370_514b_b3c7bf20f8e1["run_one_model()"] 9bf8449e_2d7f_c370_514b_b3c7bf20f8e1 -->|calls| f00a6213_f2a3_0eef_9451_ee5a24d1ab9f style f00a6213_f2a3_0eef_9451_ee5a24d1ab9f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/common.py lines 1719–1739
def get_dynamo_stats():
# TODO: consider deepcopy'ing the entire counters struct and
# adding a helper to do subtraction on it
return collections.Counter(
{
"calls_captured": torch._dynamo.utils.counters["stats"]["calls_captured"],
"unique_graphs": torch._dynamo.utils.counters["stats"]["unique_graphs"],
"graph_breaks": sum(torch._dynamo.utils.counters["graph_break"].values()),
# NB: The plus removes zero counts
"unique_graph_breaks": len(+torch._dynamo.utils.counters["graph_break"]),
"autograd_captures": torch._dynamo.utils.counters["compiled_autograd"][
"captures"
],
"autograd_compiles": torch._dynamo.utils.counters["compiled_autograd"][
"compiles"
],
"cudagraph_skips": torch._dynamo.utils.counters["inductor"][
"cudagraph_skips"
],
}
)
Domain
Subdomains
Source
Frequently Asked Questions
What does get_dynamo_stats() do?
get_dynamo_stats() is a function in the pytorch codebase.
What calls get_dynamo_stats()?
get_dynamo_stats() is called by 4 function(s): check_accuracy, run_one_model, run_performance_test, run_performance_test_non_alternate.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free