TPT Kernel Optimizer
Auto-tunes kernel launch parameters (tile sizes, vector width, unroll factor) via a three-phase pipeline: exhaustive grid search, then hill-climbing, then optional AI-guided refinement.
Prerequisites
- Rust toolchain (see repo root
README.md) - Optional, for the
ai/--aiphases: an AI provider env var (ANTHROPIC_API_KEY,OPENROUTER_API_KEY) or local Ollama
Installation
Usage
# Phase 1: exhaustive grid search over the parameter space
# Phase 2: hill-climb from a starting point
# Phase 3: AI-guided search
# Full pipeline: grid → hill-climb → optional AI refinement
# Run the GEMM >= 90% cuBLAS-efficiency milestone loop
# Run the Attention >= 90% FlashAttention v2-efficiency milestone loop
# Try to beat cuBLAS on at least one problem size via fused GEMM + AI tuning
See also tpt-gpu-kernelgen for generating the kernel being tuned, and GEMM_VS_CUBLAS_IMPLEMENTATION.md for background on the GEMM efficiency work.