Less is more: learning what to profile for GPU kernel optimization
Organizations: Renmin University of China · University of International Business and Economics
Abstract
Large language models have recently shown strong potential for automatically optimizing GPU kernels, yet their effectiveness depends critically on the hardware information available to the kernel optimization model. Existing systems typically rely on predefined profiling strategies, leaving what to profile largely outside the optimization process. We show that effective profiling is not simply about collecting more information: increasing the number of profiling metrics does not monotonically improve kernel optimization, while the most useful profiling information varies across kernels. Our theoretical analysis further shows that, under such heterogeneous profiling utility, kernel-conditioned selection can outperform any single fixed profiling configuration. Motivated by this observation, we propose AutoProfiler, a feedback-driven framework for learning a deterministic profiling tree from optimization feedback. The tree is iteratively refined through REWRITE and SPLIT operations, with an LLM generating candidate modifications and empirical evaluation determining their acceptance. Once constructed, the tree quickly gathers the required profiling information for any kernel, allowing the LLM rewriter to be invoked only once. Experiments on KernelBench show that our approach improves kernel optimization over fixed profiling configurations under constrained profiling budgets. These results suggest that hardware profiling should evolve from static metric collection toward profiling reasoning, making profiling itself a new dimension for improving kernel optimization. The codes are available at https://github.com/Satissss/AutoProfiler.
Figures & tables
| Method | Speedup ( ) | Avg. Accuracy (%) | LLM Calls/Task | |||
|---|---|---|---|---|---|---|
| Level 1 | Level 2 | Level 3 | Avg. | |||
| CudaForge | 1.567 | 1.808 | 1.099 | 1.570 | 78.4 | 2 |
| KernelMem | 1.233 | 1.351 | 1.091 | 1.252 | 82.0 | 2 |
| KernelAgent | 1.361 | 1.306 | 1.044 | 1.276 | 84.8 | 4 |
| AutoKernel | 1.058 | 1.182 | 0.997 | 1.095 | 84.4 | 1 |
| AutoProfiler | 1.810 | 1.775 | 1.352 | 1.704 | 87.2 | 1 |
| Rewriter | Model Family | Speedup ( ) | Accuracy ( ) | Time (s, ) | Tokens ( ) |
|---|---|---|---|---|---|
| Claude-Sonnet-5 | Anthropic | 1.47 | 91.7 | 8.2 | 1,840 |
| Kimi-K3 | Moonshot | 1.38 | 89.6 | 9.1 | 2,010 |
| GPT-5.6-Sol | OpenAI | 1.34 | 87.5 | 10.4 | 2,260 |
| DeepSeek-V4-Pro | DeepSeek | 1.21 | 83.3 | 12.7 | 2,580 |
| Qwen3-Coder-Plus | Qwen | 1.12 | 79.2 | 14.3 | 3,120 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Profiling Configuration | Geomean Speedup | Best on # Kernels |
|---|---|---|
| Algorithm | 1.332 | 26 |
| Memory | 1.277 | 31 |
| Latency | 1.242 | 27 |
| Compute | 1.239 | 23 |
| Per-kernel Oracle | 1.429 | 128 |
GPU Kernel Optimization
GPU kernel optimization improves the speed and memory efficiency of computations by tailoring code to GPU hardware and workloads.
See all 211 papers