[Paper Review] KernelSkill: A Multi-Agent Framework for GPU Kernel Optimization
KernelSkill is a memory-augmented multi-agent system that externalizes expert GPU kernel optimization knowledge and per-task refinement history to achieve high-accuracy, fast kernel optimization guided by profiling feedback.
Improving GPU kernel efficiency is crucial for advancing AI systems. Recent work has explored leveraging large language models (LLMs) for GPU kernel generation and optimization. However, existing LLM-based kernel optimization pipelines typically rely on opaque, implicitly learned heuristics within the LLMs to determine optimization strategies. This leads to inefficient trial-and-error and weakly interpretable optimizations. Our key insight is to replace implicit heuristics with expert optimization skills that are knowledge-driven and aware of task trajectories. Specifically, we present KernelSkill, a multi-agent framework with a dual-level memory architecture. KernelSkill operates by coordinating agents with long-term memory of reusable expert skills and short-term memory to prevent repetitive backtracking. On KernelBench Levels 1-3, KernelSkill achieves a 100% success rate and average speedups of 5.44x, 2.82x, and 1.92x over Torch Eager on Levels 1, 2, and 3, respectively, outperforming prior baselines. Code is available at https://github.com/0satan0/KernelMem/.
Motivation & Objective
- Motivate the need for expert-driven, interpretable GPU kernel optimization amid profiling-driven bottlenecks.
- Introduce KernelSkill as a two-level memory, multi-agent framework for stable, traceable kernel refinement under profiling signals.
- Demonstrate that KernelSkill achieves high success rates and superior speedups on KernelBench Levels 1–3 compared to baselines.
- Show how long-term memory distills expert optimization knowledge and how short-term memory stabilizes per-task refinement.
Proposed method
- Proposes a closed-loop, multi-agent refinement pipeline including Generator, Reviewer, Feature Extractor, Planner, Optimizer, and Repairer.
- Implements a two-level memory system: long-term memory with deterministic decision policy and method knowledge, and short-term memory with per-task optimization/repair Trajectories.
- Uses static code features and profiling signals to retrieve candidate optimization methods from long-term memory, then plans concrete, stepwise edits.
- Separates repair and optimization paths, leveraging a Diagnoser and Repairer to handle compilation/correctness failures and subsequent refinement.
- Maintains a per-task short-term memory of past plans, edits, and outcomes to stabilize multi-round refinement and prevent oscillations.
- Relies on seed kernel generation, correctness checks, and profiling (nsys/nsight compute) to drive iterative improvement across up to N rounds.
- All optimization actions are implemented by an Optimizer/Repairer under environment constraints to ensure compilable, correct kernels.

Experimental results
Research questions
- RQ1Can a memory-augmented, multi-agent framework outperform baseline LLM-based kernel optimizers in terms of success rate and speedup across KernelBench Levels 1–3?
- RQ2Does separating long-term optimization knowledge from per-task trajectory memory improve interpretability, stability, and reuse of optimization strategies?
- RQ3How do static code features and profiling signals combine to guide robust, auditable optimization-method selection?
- RQ4What is the impact of two-level memory (long-term and short-term) on refinement efficiency and convergence under profiling feedback?
Key findings
- KernelSkill achieves a 100% success rate across KernelBench Levels 1–3.
- Average speedups over Torch Eager are 5.44× (Level 1), 2.82× (Level 2), and 1.92× (Level 3).
- KernelSkill outperforms strong profiling-grounded baselines (Astra, PRAGMA, CudaForge) and training-based methods (QiMeng, Kevin) across levels.
- Long-term memory enables auditable method decision-making and reusable optimization knowledge; short-term memory stabilizes per-task refinements and reduces oscillations.
- Ablation studies show removing either memory component degrades performance, underscoring the value of both memory levels.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.