MetaKernelBench:衡量超越代码的GPU内核知识迁移
研究论文 · 2026/10/12
近期GPU内核优化智能体将所学知识保留在知识库或蒸馏技能中。内核基准测试对每次尝试的实现进行正确性和速度评分,但未衡量保留经验的复用价值。我们提出MetaKernelBench,衡量从一个内核领域特定语言(DSL)的尝试中蒸馏的经验能否提升在另一个DSL中对同一问题的新尝试。其74个问题为六个系列的融合子图,每个问题以仅DSL不同的CuTe DSL和TIRx变体对形式呈现。智能体首先单独尝试每个变体,并被指示将其所学蒸馏为自然语言技能,无论源尝试是否通过验证,该技能都会被转移。技能是同一模型在另一DSL中进行技能条件尝试的唯一额外输入。我们在匹配的每次尝试预算下,将每个技能条件尝试与同一变体上的单独尝试进行比较,评分正确性和端到端运行时间。在六个模型和两个方向上,配对提升相对于单独尝试的范围为-19%至+29%。四个模型在两个方向上均有提升,但每个模型和方向上16%至45%的问题出现退化。结果跟随源尝试相对于目标单独尝试的表现,而非仅源成功,当源表现更好时71%的比较得到改善,当源表现更差时54%退化。MetaKernelBench通过衡量同一问题跨DSL的内核知识转移,补充了实现质量指标。
该工作填补了内核优化中经验复用价值衡量的空白,为跨DSL知识转移提供了首个量化基准,对智能体学习和GPU内核优化研究具有重要参考价值。
Recent GPU kernel optimization agents retain what they learn in knowledge bases or as distilled skills. Kernel benchmarks score each attempt's implementation for correctness and speed but leave the reuse value of retained experience unmeasured. We introduce MetaKernelBench, which measures whether experience distilled from an attempt in one kernel domain-specific language (DSL) improves a fresh attempt at the same problem in another. Its 74 problems are fused subgraphs in six families, each posed as a pair of CuTe DSL and TIRx variants that differ only in the DSL. The agent first attempts each variant solo and is instructed to distill what it learns into a natural-language skill, which is transferred whether or not the source attempt passes verification. The skill is the only extra input to a skill-conditioned attempt by the same model in the other DSL. We compare each skill-conditioned attempt with the solo attempt on the same variant under matched per-attempt budgets, scoring correctness and end-to-end runtime. Across six models and both directions, paired lift over solo attempts ranges from -19% to +29%. Four models gain in both directions, yet regressions occur on 16% to 45% of problems in every model and direction. Outcomes follow the source attempt's result relative to the target's solo attempt rather than source success alone, improving in 71% of comparisons when the source stands above and regressing in 54% when it stands below. MetaKernelBench complements implementation-quality metrics by measuring same-problem cross-DSL kernel knowledge transfer.