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

Function trace_handler

intermediate_source/inductor_debug_cpu.py:436–439  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

434 repeat=5)
435
436def trace_handler(p):
437 output = p.key_averages().table(sort_by="self_cpu_time_total", row_limit=20)
438 # print(output)
439 p.export_chrome_trace(f"{RESULT_DIR}/{p.step_num}.json")
440
441for _ in range(10):
442 model(**input_dict) # compiled_model(**input_dict) to get inductor model profiling

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected