time_with_torch_timer() — pytorch Function Reference
Architecture documentation for the time_with_torch_timer() function in benchmark_helper.py from the pytorch codebase.
Entity Profile
Dependency Diagram
graph TD fef5e6fa_eee5_e93a_0d8f_a4ef0477af02["time_with_torch_timer()"] 3c19a66e_66bb_a804_2d9f_5eed5907c0cc["test_total_time()"] 3c19a66e_66bb_a804_2d9f_5eed5907c0cc -->|calls| fef5e6fa_eee5_e93a_0d8f_a4ef0477af02 aba84ade_afa4_11e1_7f1a_d64880227dd0["test_total_time()"] aba84ade_afa4_11e1_7f1a_d64880227dd0 -->|calls| fef5e6fa_eee5_e93a_0d8f_a4ef0477af02 4526aa5c_f504_cae4_579d_39d37e870ba4["test_total_time()"] 4526aa5c_f504_cae4_579d_39d37e870ba4 -->|calls| fef5e6fa_eee5_e93a_0d8f_a4ef0477af02 30f99d63_57a2_51c8_7e20_9fb6ffcd7f76["a_shapes()"] 30f99d63_57a2_51c8_7e20_9fb6ffcd7f76 -->|calls| fef5e6fa_eee5_e93a_0d8f_a4ef0477af02 style fef5e6fa_eee5_e93a_0d8f_a4ef0477af02 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
benchmarks/dynamo/microbenchmarks/benchmark_helper.py lines 4–13
def time_with_torch_timer(fn, args, kwargs=None, iters=100):
kwargs = kwargs or {}
env = {"args": args, "kwargs": kwargs, "fn": fn}
fn_call = "fn(*args, **kwargs)"
# Measure end-to-end time
timer = Timer(stmt=f"{fn_call}", globals=env)
tt = timer.timeit(iters)
return tt
Domain
Subdomains
Source
Frequently Asked Questions
What does time_with_torch_timer() do?
time_with_torch_timer() is a function in the pytorch codebase.
What calls time_with_torch_timer()?
time_with_torch_timer() is called by 4 function(s): a_shapes, test_total_time, test_total_time, test_total_time.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free