Profile

Profile ExecuTorch model execution. Use when measuring performance, analyzing operator timing, or debugging slow models.

pytorch b118a8a 659 B Updated

File contents

Profile

1. Enable ETDump when loading

program = runtime.load_program("model.pte", enable_etdump=True, debug_buffer_size=int(1e7))

2. Execute and save

outputs = program.load_method("forward").execute(inputs)
program.write_etdump_result_to_file("etdump.etdp", "debug.bin")

3. Analyze with Inspector

from executorch.devtools import Inspector
inspector = Inspector(etrecord="model.etrecord", etdump_path="etdump.etdp")
inspector.print_data_tabular()

pytorch/executorch/tree/main/.claude/skills/profile commit b118a8a61e

Frequently asked questions

npx skillmds@latest add pytorch/profile