reset_counters() — pytorch Function Reference
Architecture documentation for the reset_counters() function in common.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD ae211a9b_17fb_b7cc_e24a_8b7ff181116b["reset_counters()"] c52cc8f1_b576_9d50_98d9_34f721215c0e["run_performance_test_non_alternate()"] c52cc8f1_b576_9d50_98d9_34f721215c0e -->|calls| ae211a9b_17fb_b7cc_e24a_8b7ff181116b d162fe35_2cc5_7738_ed94_76ad697846ef["run_performance_test()"] d162fe35_2cc5_7738_ed94_76ad697846ef -->|calls| ae211a9b_17fb_b7cc_e24a_8b7ff181116b style ae211a9b_17fb_b7cc_e24a_8b7ff181116b fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/common.py lines 787–793
def reset_counters(cls):
for k, v in torch._dynamo.utils.counters.items():
cls.totals[k].update(v)
ok = torch._dynamo.utils.counters["frames"]["ok"]
total = torch._dynamo.utils.counters["frames"]["total"]
torch._dynamo.utils.counters.clear()
return ok, total
Domain
Subdomains
Source
Frequently Asked Questions
What does reset_counters() do?
reset_counters() is a function in the pytorch codebase.
What calls reset_counters()?
reset_counters() is called by 2 function(s): 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