profile · pytorch — Claude Code skill for ExecuTorch profiling
profile is a Claude Code skill for profiling ExecuTorch model runs, inspecting operator timings, and tracking down slow models.
BSD-3-Clause 21 installs ★ 5,187 updated 2026-10-29
npx skills add pytorch/executorch --skill profile -a claude-codeWhat profile does
profile enables ETDump collection while an ExecuTorch program loads, runs the model method, and writes the captured results to files. Inspector then prints the collected data as a table.
Analysis uses model.etrecord together with etdump.etdp. Loading also sets enable_etdump=True and a debug buffer size; the run writes etdump.etdp and debug.bin.
What it helps with
- measure ExecuTorch model performance
- inspect operator execution times
- locate slow parts of a model
- save profiling output for analysis
Example prompts for the agent
- Profile this ExecuTorch model and show operator timings.
- Find the operators slowing down this model.
- Collect ETDump for
model.pteand display the results with Inspector.
How to install profile
1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill profile -a claude-code2Manually: put the files in place
~/.claude/skills/profile/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/profile/
1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill profile -a codex2Manually: put the files in place
.agents/skills/profile/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill profile -a cursor2Manually: put the files in place
.cursor/skills/profile/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install pytorch/executorch .claude/skills/profile2Manually: put the files in place
.github/skills/profile/SKILL.md1Skills CLI (Vercel)
npx skills add pytorch/executorch --skill profile -a gemini-cli2Platform CLI
gemini skills install https://github.com/pytorch/executorch --path .claude/skills/profileManually: put the files in place
.devin/skills/profile/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add pytorch/executorch --skill profile -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about profile
How do I install profile in Claude Code?
Run npx skills add pytorch/executorch --skill profile -a claude-code. The skill file is at ~/.claude/skills/profile/SKILL.md.
What does profile do?
It captures ExecuTorch model execution data in ETDump files, then uses Inspector to display the results in a table.
Which files does Inspector need for analysis?
Inspector takes model.etrecord and the saved dump etdump.etdp.
Source text
SKILL.md · BSD-3-Clause
---
name: profile
description: Profile ExecuTorch model execution. Use when measuring performance, analyzing operator timing, or debugging slow models.
---
# Profile
## 1. Enable ETDump when loading
```python
program = runtime.load_program("model.pte", enable_etdump=True, debug_buffer_size=int(1e7))
```
## 2. Execute and save
```python
outputs = program.load_method("forward").execute(inputs)
program.write_etdump_result_to_file("etdump.etdp", "debug.bin")
```
## 3. Analyze with Inspector
```python
from executorch.devtools import Inspector
inspector = Inspector(etrecord="model.etrecord", etdump_path="etdump.etdp")
inspector.print_data_tabular()
```
© pytorch · BSD-3-Clause · pytorch/executorch
Similar skills
SKILL.md skills catalog →profile by other authors comes first.