SkillCheatSheet
How to install

autokernel

An AI skill for Claude Code, Cursor, Codex and other AI agents, from pytorch/torchtitan. Scored by fixed code checks, no AI.

CCode 68/100Builder 0/10

Coordinate an agent swarm to optimize GPU kernel problem sets in CuTe DSL through operator fusion, schedule tuning, and profiling, while preserving bitwise parity and the complete input/output contract. Use when given kernel problems and reference implementations, or a substitute-kernels `cache_dir`, to optimize on available GPUs.
6k starsBSD-3-ClauseRepository score 58/100277 lines2 other files

Install

npx skills add pytorch/torchtitan --skill autokernel
Where do I paste this?

Open a terminal in your project folder, paste the command and press Enter. It needs Node.js on your computer.

Run it in your project. The skills CLI asks which agents to install it for (Claude Code, Cursor, Codex and more); add -g to install it for your user instead.

No terminal? Copy SKILL.md and give it to your AI as instructions.

Safety checks

Safety 7/7

Fixed checks over SKILL.md and its files. They catch known risky patterns; they cannot prove a skill is safe.

Each check shows when the skill’s files load from GitHub.

Not checked

  • Running the skill to see what it does
  • Packages it installs from npm or pip
  • What it can reach on your computer when it runs
How we check safety

SKILL.md

A skill is instructions and scripts your agent will follow, so read it before you install it. Its text loads here from GitHub; you can also read it on GitHub.

More skills from pytorch/torchtitan

Verify forward and backward numerical correctness of a handwritten low-precision GPU kernel against a high-precision oracle and an eager same-dtype baseline. Use for Triton or CUDA kernel correctness; use numerics_debugging to locate an unknown whole-model divergence.

Code 76/100

Review torchtitan pull requests the way the maintainers do -- question the problem and design first, push for minimal code, explain the change with a concrete example, then check correctness. Use when reviewing a PR or branch, when asked to "review", "review again", "review my review", or to evaluat

Code 75/100

Make a torchtitan model train faster with `local_compile` regions and compile-friendly rewrites: measure, find the slow glue, rewrite it, verify. Use when asked to speed up a model, layer or op with torch.compile, or to review such a change.

Code 72/100

Add a new HF MoE model to the transformers_modeling_backend experiment. Use when the user provides a HuggingFace model ID and wants to integrate it with Titan's MoE, or invokes /add_moe_model.

Code 67/100

Bisect PyTorch commits to find the regression that breaks TorchTitan. Use when the user wants to bisect PyTorch or invokes /torch_bisect.

Code 64/100

Profiler-driven hill-climbing to close the inference throughput gap between TorchTitan's unified model (running inside vLLM) and vLLM's native model. Benchmark with generate.py --benchmark, climb optimization rungs (compile / cudagraph / fused kernels), profile torchtitan vs the native target, then

Code 63/100

Run many autokernel runs concurrently on disjoint problem subsets of one substitute-kernels cache_dir, as independent, resumable workers (for example one preemptible cluster job per pattern), then monitor them and collect the promoted kernels. Use when asked to tune a whole kernel cache in parallel,

Code 62/100

Capture and compare per-op activations between two TorchTitan runs to spot numerics divergence (eager vs aot_fx_trace, FSDP vs no-FSDP, before vs after a refactor). Use when the user wants to debug bitwise / numeric drift in training, or invokes /numerics_debugging.

Code 59/100
All skills in pytorch/torchtitan