MCPcopy Index your code
hub / github.com/pytorch/tutorials / profile_mem

Function profile_mem

intermediate_source/pinmem_nonblock.py:396–400  ·  view source on GitHub ↗
(cmd)

Source from the content-addressed store, hash-verified

394
395
396def profile_mem(cmd):
397 with profile(activities=[ProfilerActivity.CPU]) as prof:
398 exec(cmd)
399 print(cmd)
400 print(prof.key_averages().table(row_limit=10))
401
402
403######################################################################

Callers 1

pinmem_nonblock.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected