tilegym-cutile-autotuning — Claude Code skill: tune CuTile kernel
Walks your agent through wiring autotuning into CuTile kernels: search once, cache the winner, launch straight from the cache.
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a claude-codeWhat tilegym-cutile-autotuning does
The skill splits the job into stages: classify the kernel, pick candidate configs, call exhaustive_search from cuda.tile.tune, store the winning setup, and skip the search afterwards with a plain ct.launch. Templates cover elementwise ops, in-place kernels, matmul, persistent kernels, FMHA, FP8, grouped GEMM and varlen attention.
A task router points to the right section quickly, and the pitfalls list flags the mistakes that bite most often. Architecture-specific settings run across sm80–sm120, with tile sizes, occupancy and num_ctas treated as separate search dimensions. One trap matters more than the rest: rebuilding the kernel with replace_hints on every call forces a recompile, so both the config and the compiled kernel belong in the cache.
Simple occupancy-only kernels are handled by copying the quick pattern. The heavier cases need the reference files in references/. Tuning runs on a real GPU, so a CUDA setup with PyTorch has to be in place first. Test twice: once with tuning on, once with DISABLE_AUTOTUNE=1, because a broken in-place kernel shows up only in the second run.
What it helps with
- add config search to a fresh CuTile kernel
- find out why output turns wrong after the first run
- cut compile time by dropping configs that never win
- set up per-architecture parameters for a target GPU
- benchmark a tuned kernel against a fixed config
Example prompts for the agent
- Add autotuning to this CuTile kernel using the search-once, cache, direct-launch approach.
- Wrong results after the first call — check for in-place writes and fix them with split buffers.
- Trim the config list down to eight per architecture, then A/B it against the fixed baseline.
How to install tilegym-cutile-autotuning
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a claude-code2Manually: put the files in place
~/.claude/skills/tilegym-cutile-autotuning/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/tilegym-cutile-autotuning/
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a codex2Manually: put the files in place
.agents/skills/tilegym-cutile-autotuning/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a cursor2Manually: put the files in place
.cursor/skills/tilegym-cutile-autotuning/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install NVIDIA/skills tilegym-cutile-autotuning2Manually: put the files in place
.github/skills/tilegym-cutile-autotuning/SKILL.md1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a gemini-cli2Platform CLI
gemini skills install https://github.com/NVIDIA/skills --path skills/tilegym-cutile-autotuningManually: put the files in place
.devin/skills/tilegym-cutile-autotuning/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -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 tilegym-cutile-autotuning
How do I install tilegym-cutile-autotuning in Claude Code?
Run npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a claude-code. The skill file then lives at ~/.claude/skills/tilegym-cutile-autotuning/SKILL.md.
What does tilegym-cutile-autotuning do?
It guides the agent through classifying a kernel, designing the config set, implementing the cache-based pattern and validating the outcome. Common autotuning mistakes get their own section.
Why is calling replace_hints on every invocation a problem?
Each call triggers a recompile. That is why the cache stores the chosen config together with the already-built kernel object.