Agent skill · NVIDIA
tilegym-cutile-autotuning
Use when adding, modifying, optimizing, or debugging CuTile autotuning code. Trigger signals: `exhaustive_search` / `replace_hints` / `hints_fn` / `cuda.tile.tune` in code, `autotune` in filenames, or correctness/performance issues in autotuned CuTile kernels. Covers: tune-once/cache/launch pattern, per-architecture configs (sm80–sm120), parameter space design (tile sizes, occupancy, num_ctas), and 7 common pitfalls with solutions.
What it needs
About 9k tokens when loaded.
What this skill does
CuTile Autotuning Add autotuning to CuTile kernels using the exhaustivesearch API with tune-once/cache/direct-launch pattern. Instructions Follow the decision tree to classify the kernel, design a search space, implement the tune-once/cache/launch pattern, and validate performance. 1. Classify — use the Decision Tree to determine search dimensions (occupancy-only vs full tile search) 2. Design search space — select the matching template from references/kernel-type-templates.md; prune to ≤ 30 configs in the final code via arch filters (directed exploration probes may temporarily exceed this — see Design Philosophy) 3. Implement — add exhaustivesearch + cache + ct.launch following the Step-by-Step Workflow; handle in-place writes with split-buffer if needed 4. Test — run correctness with autotune enabled and with DISABLEAUTOTUNE=1 5. Validate — A/B benchmark against fixed best-known config; see references/search-strategies.md 6. Shrink — prune dead-weight configs that never win, targeting ≤ 8 configs per architecture to minimize compilation cost (Step 10) Task Router — Jump to What You Need What are you trying to do? Go to --- --- Add autotune to a new kernel (most common) Quick Reference below → Workflow: Adding Autotune → references/kernel-type-templates.md (pick by kernel type: T1=elementwise, T2=in-place, T3=matmul, T4=persistent, T5=FMHA, T6=FP8, T7=grouped GEMM, T8=varlen attention, T9=dual-GEMM fusion) Debug: data corruption / wrong results after first run Pitfall #1 (In-Place Kernel) Debug: autotune taking 5+ minutes Pitfall #2 (Compilation Timeout) Debug: search space generator returning zero configs Pitfall #5 first; also check arch filters, size guards, and numctas constraints Optimize an existing autotune config Workflow: Optimizing an Existing Config Quick Reference — Occupancy-Only Autotune (Tune-Once/Cache/Launch) Most CuTile kernels (elementwise, reduction, LayerNorm) need only occupancy tuning. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills NVIDIA/tilegym-cutile-autotuning