tilegym-improve-cutile-kernel-perf

Iteratively optimize cuTile GPU kernel performance through profiling, bottleneck analysis, and targeted tuning.

3.2k|370|Updated Feb 25, 2026
One-click install
npx skills add https://github.com/NVIDIA/skills --skill tilegym-improve-cutile-kernel-perf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tilegym-improve-cutile-kernel-perf
Source: https://github.com/NVIDIA/skills/tree/main/skills/tilegym-improve-cutile-kernel-perf
Command: npx skills add https://github.com/NVIDIA/skills --skill tilegym-improve-cutile-kernel-perf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Optimizing cuTile GPU kernels requires deep knowledge of TMA, tile sizes, occupancy, autotuning, and IR-level debugging, and ad-hoc tuning often regresses correctness or wastes effort on low-impact changes.

Core Features & Use Cases

  • Structured Experiment Loop: Applies one optimization per iteration from a playbook (TMA conversion, persistent scheduling, autotune configs, latency hints, flush_to_zero, and more), verifying correctness and benchmarking latency each time.
  • Tracked Results: Records every iteration in a perf_results.md table with latency, correctness, and keep/revert status, with clear decision rules for accepting or reverting changes.
  • Deep Reference Library: Ships an optimization playbook, performance knobs catalog, cuTile API reference with 18 critical rules, performance model, and IR dump/analysis guide.
  • Use Case: Ask your agent to optimize a memory-bound rms_norm cuTile kernel in TileGym; it creates a branch, establishes a baseline, then iteratively applies TMA and persistent scheduling while keeping latency and correctness regressions in check.

Quick Start

Ask your agent to optimize the cuTile kernel for a specific TileGym operator and iteratively benchmark it on a GPU node.

Frequently Asked Questions about tilegym-improve-cutile-kernel-perf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize a cuTile kernel in the TileGym project?

Create a git branch, locate the kernel under src/tilegym/suites or src/tilegym/ops/cutile, classify it as memory-bound or compute-bound, then run the experiment loop: apply one optimization per iteration, verify correctness with pytest, benchmark latency, and record results in perf_results.md.

What optimizations give the biggest cuTile kernel speedups?

Replacing gather/scatter with TMA loads and stores yields 2-78x gains, persistent scheduling adds 50-300% for many work items, and autotuning tile sizes, occupancy, and num_ctas adds 10-50%. The optimization playbook lists recipes A through L in priority order.

Which GPUs are supported for cuTile kernel benchmarking?

Benchmarking requires a GPU node with Blackwell, Hopper, or Ampere architecture. Note that Ampere lacks hardware TMA, so ct.load with allow_tma falls back to cp.async emulation and needs padding_mode=ZERO to avoid silent out-of-bounds corruption.

Why does my cuTile optimization fail correctness tests?

Common causes are flush_to_zero or APPROX rounding changing results, tile size out-of-bounds access, allow_tma=False semantics, and persistent loop bound errors. The skill reverts any change that fails correctness immediately and moves to the next optimization.

When should I use IR dump analysis for cuTile kernels?

Use IR and SASS analysis when performance is unexpectedly poor but results are correct, to inspect scheduling, MUFU instruction counts, and token dependency chains. Do not use it for compile errors, wrong numerics, or differences under 5%.