MCPcopy Create free account
hub / github.com/pytorch/tutorials / start_timer

Function start_timer

recipes_source/recipes/amp_recipe.py:35–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33start_time = None
34
35def start_timer():
36 global start_time
37 gc.collect()
38 torch.cuda.empty_cache()
39 torch.cuda.reset_max_memory_allocated()
40 torch.cuda.synchronize()
41 start_time = time.time()
42
43def end_timer_and_print(local_msg):
44 torch.cuda.synchronize()

Callers 1

amp_recipe.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected