analyze-memory-snapshot
Installation
SKILL.md
Analyze Memory Snapshot
Analyze PyTorch CUDA memory snapshots by inspecting allocator state and event history. Always prefer evidence from the snapshot over generic memory advice.
Workflow
-
Get the snapshot path if the user did not provide one. Accept
.pickle,.pkl,.json, or a directory containing rank-local snapshots. If the user only has a screenshot from memory_viz, ask for the underlying snapshot file. -
Load the snapshot locally. PyTorch
_dump_snapshot()files are pickles, so only unpickle files the user provided or that already live in the workspace. JSON snapshots can be loaded directly. -
If available, run this skill's helper for a first-pass summary:
python scripts/analyze_snapshot.py /path/to/snapshot.pickle