torchcell.profiling
A timing decorator for profiling. time_method() records the wall time of each call of the decorated function in a module-level store when the environment variable TORCHCELL_DEBUG_TIMING is 1 (otherwise it calls the function directly), and get_timings(), get_timing_summary() and print_timing_summary() read it back.
Functions
Time a function/method execution when profiling is enabled. |
|
Print formatted timing summary with standard deviations. |
|
Clear all timing data. |
|
Get raw timing data as a dictionary. |
|
Get timing summary statistics as a dictionary. |