tilegym-converting-cutile-to-triton — Claude Code skill: port cuTile
Turns cuTile GPU kernels into Triton ones through gated phases: analyze, convert, validate, test, benchmark. Debugging of failed ports included.
npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -a claude-codeWhat tilegym-converting-cutile-to-triton 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.
What it helps with
- rewrite a cuTile kernel for Triton without dropping logic
- track down a
cudaErrorIllegalAddressafter a port - fix shape or numerical mismatches in an existing translation
- build a dual-layout kernel with
transposeand aMETAgrid - recover performance in an attention kernel that regressed
Example prompts for the agent
- convert the
@ct.kernelinkernels/attention.pyto@triton.jit - my Triton port throws
cudaErrorIllegalAddress, find the cause - set up dual layouts for
transpose=Trueandtranspose=FalsewithMETA
How to install tilegym-converting-cutile-to-triton
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -a claude-code2Manually: put the files in place
~/.claude/skills/tilegym-converting-cutile-to-triton/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/tilegym-converting-cutile-to-triton/
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -a codex2Manually: put the files in place
.agents/skills/tilegym-converting-cutile-to-triton/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -a cursor2Manually: put the files in place
.cursor/skills/tilegym-converting-cutile-to-triton/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install NVIDIA/skills tilegym-converting-cutile-to-triton2Manually: put the files in place
.github/skills/tilegym-converting-cutile-to-triton/SKILL.md1Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -a gemini-cli2Platform CLI
gemini skills install https://github.com/NVIDIA/skills --path skills/tilegym-converting-cutile-to-tritonManually: put the files in place
.devin/skills/tilegym-converting-cutile-to-triton/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -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-converting-cutile-to-triton
How do I install tilegym-converting-cutile-to-triton in Claude?
Run npx skills add NVIDIA/skills --skill tilegym-converting-cutile-to-triton -a claude-code. The skill file then lands at ~/.claude/skills/tilegym-converting-cutile-to-triton/SKILL.md.
What does tilegym-converting-cutile-to-triton do?
It converts cuTile GPU kernels written with @ct.kernel into Triton kernels using @triton.jit. It also helps debug translations you already have and bring their speed back up.
Does it work outside the TileGym repository?
The validation phase expects TileGym pytest targets such as pytest tests/ops/test_<op>.py -k "triton" -vs. Without that suite you lose the gate that catches a broken conversion before benchmarking.