用强化学习自动发现并优化GPU内核,提升运行效率。
daVinci-kernel: Co-Evolving Skill Selection, Summarization, and Utilization via RL for GPU Kernel Optimization

- 三智能体协同:选技、写代码、总结经验,共享一个大模型
- 在KernelBench上比最强基线快37.2%~70.6%,且经验证才入库技能
- 适合想自动化优化高性能计算内核的开发者和研究者
GPU内核优化以功能正确为前提,目标是提升执行效率。我们提出daVinci-kernel,一个通过动态演化的技能库实现技能发现与利用的强化学习框架。该框架联合训练三个共享同一LLM主干的智能体:技能选择智能体通过BM25和LLM重排序检索相关技术;策略智能体根据选定技能生成多轮CUDA/Triton内核;技能摘要智能体将成功试运行结果提炼为可复用技能。仅当执行验证确认可重复加速后,候选技能才会被加入。所有智能体共享一个LLM主干,通过多样性过滤数据进行结构化SFT冷启动,随后使用多轮REINFORCE和每智能体优势估计进行端到端联合优化。在KernelBench测试中,daVinci-kernel-14B在Fast$_1$阈值下,对Level 1、Level 2、Level 3分别达到37.2%、70.6%、32.2%的性能提升,超越最强先前基于RL训练的模型Dr. Kernel-14B。
原文摘要 · Abstract (English)
GPU kernel optimization represents a paradigm where functional correctness is assumed and execution efficiency is the objective. We present daVinci-kernel, a reinforcement learning framework that couples skill discovery with skill exploitation through a dynamically evolving skill library. daVinci-kernel jointly trains three agents sharing one LLM backbone: a Skill Selection Agent that retrieves relevant techniques via BM25 and LLM reranking, a Policy Agent that generates multi-turn CUDA/Triton kernels conditioned on selected skills, and a Skill Summary Agent that distills successful rollouts into reusable skills. Candidate skills are added only after execution-based verification confirms reproducible speedups. All three agents share a single LLM backbone, are initialized via a structured SFT cold start on diversity-filtered data, and are then jointly optimized end-to-end with multi-turn REINFORCE and per-agent advantage estimation. On KernelBench, daVinci-kernel-14B achieves 37.2%, 70.6%, and 32.2% on Level 1, Level 2, and Level 3 under the Fast$_1$ threshold, outperforming the strongest prior RL-trained model, Dr\. Kernel-14B.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。