Agent skill

torch-compile

Use torch.compile to JIT-compile PyTorch code into optimized kernels, then validate speedups with warmups and graph-break audits.

majiayu000534★ · 1 repos on radarProfile →
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill torch-compile --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 3 KB
Bundled scripts: none
Path: skills/ai-ml/torch-compile/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

--- name: torch-compile description: Optimize PyTorch with torch.compile (TorchDynamo/Inductor), focusing on compile overhead, graph breaks, and benchmark methodology. Use when speeding up PyTorch models or debugging compile behavior; triggers: torch.compile, torchdynamo, inductor, graph break, pytorch optimization. --- # Torch Compile ## Overview Use `torch.compile` to JIT-compile PyTorch code into optimized kernels, then validate speedups with warmups and graph-break audits. ## When to Use Use this skill only when the frontmatter triggers apply; otherwise keep eager mode. ## Decision Tree 1. Do you need to reduce Python overhead in hot paths? - Yes: compile and benchmark. 2. Are first runs much slower than eager? - Yes: warm up and re-measure after caching. 3. Are graph breaks frequent? - Yes: audit with `torch._dynamo.explain` or logging and reduce non-tensor logic. ## Workflows ### 1. Compile Benchmark With Warmup 1. Run a short eager baseline. 2. Compile the model and run warmup iterations. 3. Measure steady-state latency after warmup. 4. Compare the eager and compiled timings. ### 2. Graph Break Audit 1. Run `torch._dynamo.explain` on the target function. 2. Record graph brea

What's inside
Steps it walks through
  1. Overview
  2. When to Use
  3. Decision Tree
  4. Workflows
  5. 1. Compile Benchmark With Warmup
  6. 2. Graph Break Audit
  7. 3. Speedup Expectation Check
  8. Non-Obvious Insights
  9. Evidence
  10. Scripts
  11. Dependencies
  12. References
Ships with 1 file
  • metadata.json
More from claude-skill-registry
All skills →
About this skill
What does the torch-compile skill do?

Use torch.compile to JIT-compile PyTorch code into optimized kernels, then validate speedups with warmups and graph-break audits.

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill torch-compile --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going