# tilegym-cutile-autotuning

Walks your agent through wiring autotuning into CuTile kernels: search once, cache the winner, launch straight from the cache.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 1500 installs · ★ 3748
- Author: NVIDIA
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/NVIDIA/skills/tree/HEAD/skills/tilegym-cutile-autotuning/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/tilegym-cutile-autotuning

## What it 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.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/tilegym-cutile-autotuning/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/tilegym-cutile-autotuning/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/tilegym-cutile-autotuning/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/tilegym-cutile-autotuning/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install NVIDIA/skills tilegym-cutile-autotuning
```

2. **Manually: put the files in place**
- File: `.github/skills/tilegym-cutile-autotuning/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/NVIDIA/skills --path skills/tilegym-cutile-autotuning
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/tilegym-cutile-autotuning/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tilegym-cutile-autotuning -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/NVIDIA/skills/tree/HEAD/skills/tilegym-cutile-autotuning/SKILL.md

## When to use it
- 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
- 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.

## Similar
- [nvidia-cuda](https://affpapa.org/en/nevibecode/skills/nvidia-cuda.md) — skill · 326 installs
- [cuda](https://affpapa.org/en/nevibecode/skills/cuda.md) — skill · 320 installs
- [cuda-debugging](https://affpapa.org/en/nevibecode/skills/cuda-debugging.md) — skill · 301 installs
- [gpu-server-management](https://affpapa.org/en/nevibecode/skills/gpu-server-management.md) — skill · 331 installs
- [nvidia](https://affpapa.org/en/nevibecode/plugins/nvidia.md) — plugin · ★ 7604
- [optimize-for-gpu](https://affpapa.org/en/nevibecode/skills/optimize-for-gpu.md) — skill · 2000 installs

From the same set: [nvidia/skills](https://affpapa.org/en/nevibecode/by/nvidia/skills.md) — 195 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
