# tilegym-converting-cutile-to-triton

Turns cuTile GPU kernels into Triton ones through gated phases: analyze, convert, validate, test, benchmark. Debugging of failed ports included.

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

## What it does

The skill takes kernels written with `@ct.kernel` and rewrites them for `@triton.jit`. Work runs in phases — analysis first, then conversion, validation, tests and benchmarking — with gates in between. A failing test or benchmark stops the run until you fix it.

Reference docs cover cuTile-to-Triton API pairs, debugging and file placement. Special cases get their own pages: dual layouts behind the `transpose` flag, autotuned grids via `META`, and attention kernels such as Gemma FMHA and GQA. For 2D block tiles the skill insists on `tl.make_tensor_descriptor` rather than raw `tl.load` with a mask, since that shortcut is a common source of slowdowns. When Triton comes out slower, checklists for GEMM, BMM and attention optimization are there to work through.

One thing to plan for: validation runs against the TileGym test suite with `pytest tests/ops/test_<op>.py -k "triton" -vs`, so without those tests there is no gate to pass. Debugging covers `cudaErrorIllegalAddress`, shape mismatches and numerical mismatches.

## Install

### Claude Code (native platform)

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

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

### Codex

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

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

### Cursor

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

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

### GitHub Copilot

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

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

### Gemini CLI

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

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

### Windsurf (Devin Desktop)

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

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -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-converting-cutile-to-triton/SKILL.md

## When to use it
- rewrite a cuTile kernel for Triton without dropping logic
- track down a `cudaErrorIllegalAddress` after a port
- fix shape or numerical mismatches in an existing translation
- build a dual-layout kernel with `transpose` and a `META` grid
- recover performance in an attention kernel that regressed

## Example prompts
- convert the `@ct.kernel` in `kernels/attention.py` to `@triton.jit`
- my Triton port throws `cudaErrorIllegalAddress`, find the cause
- set up dual layouts for `transpose=True` and `transpose=False` with `META`

## Similar
- [model-serving-kubernetes](https://affpapa.org/en/nevibecode/skills/model-serving-kubernetes.md) — skill · 327 installs
- [mojo-gpu-fundamentals](https://affpapa.org/en/nevibecode/skills/mojo-gpu-fundamentals.md) — skill · 2600 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
- [pod-doctor](https://affpapa.org/en/nevibecode/skills/pod-doctor.md) — skill · 2600 installs
- [discovery](https://affpapa.org/en/nevibecode/skills/discovery.md) — skill · 2600 installs

From the same set: [nvidia/skills](https://affpapa.org/en/nevibecode/by/nvidia/skills.md) — 194 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
