← ClaudeAtlas

tilegym-cutile-autotuninglisted

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.
yangwhale/CloseCrab · ★ 4 · AI & Automation · score 80
Install: claude install-skill yangwhale/CloseCrab
# CuTile Autotuning Add autotuning to CuTile kernels using the `exhaustive_search` 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 `exhaustive_search` + 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 `DISABLE_AUTOTUNE=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) |