arXiv(opens in a new tab)cs.DCNov 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2611.04998

ForgeKernel: Self-Evolving Kernels Catching and Surpassing Experts and Agents

Yaojian Chen, Dazhi Peng, Yiyun Zheng, Zhui Zhu, Shengye Xiang, Leshan Li, Zhen Li, Xianglong Deng, Haojun Sun, Qingfeng He, Shangzhan Li, Yifei Shen, Lin Gan, Yuxuan Li, Xu Han, Zhiyuan Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Yaojian Chen*

Tsinghua University

Beijing, China

yj-chen21@mails.tsinghua.edu.cn

Zhui Zhu

Tsinghua University

Beijing, China

z-zhu22@mails.tsinghua.edu.cn

Zhen Li

ModelBest Inc.

Beijing, China

lizhen@modelbest.cn

Qingfeng He

Tsinghua University

Beijing, China

heqf21@mails.tsinghua.edu.cn

Lin Gan

Tsinghua University

Beijing, China

lingan@tsinghua.edu.cn

Dazhi Peng*

ModelBest Inc.

Beijing, China

pengdazhi@modelbest.cn

Shengye Xiang

Tsinghua University

Beijing, China

xcy23@mails.tsinghua.edu.cn

Xianglong Deng

University of Chinese Academy of

Sciences

Beijing, China

dengxianglong02@gmail.com

Shangzhan Li

Harbin Institute of Technology

Harbin, China

szli@ir.hit.edu.cn

Yuxuan Li†

ModelBest Inc.

Beijing, China

yxuanl1995@gmail.com

Zhiyuan Liu†

Tsinghua University

Beijing, China

liuzy@tsinghua.edu.cn

Yiyun Zheng*

ModelBest Inc.

Beijing, China

zhengyiyun@modelbest.cn

Leshan Li

Tsinghua University

Beijing, China

lils25@mails.tsinghua.edu.cn

Haojun Sun

ModelBest Inc.

Beijing, China

sunhaojun@modelbest.cn

Yifei Shen

ModelBest Inc.

Beijing, China

shenyifei@modelbest.cn

Xu Han†

Tsinghua University

Beijing, China

han-xu@tsinghua.edu.cn

Abstract

Purpose-built kernel agents can now write high-performance GPU kernels. As base models grow stronger, though, even a naive agentic loop beats human experts on many operators, so both the purpose of a kernel agent and the way it should be designed need rethinking. Yet existing kernel agents generally lack cross-run knowledge accumulation and reuse, as well as continued evolution at the architectural level: each run starts from the same initial knowledge and merely outputs the best-performing kernel found during that search, without retaining the knowledge gained through optimization for subsequent runs; meanwhile, once the kernel architecture is fixed early, later iterations are largely confined to local optimization within it.

∗^{*}The first three authors contributed equally to this work.

†^{\dagger}Corresponding authors.

We present ForgeKernel, a kernel-generation system for continued optimization. It is designed to accumulate and reuse knowledge across runs while enabling continued evolution of kernel architectures. It combines two mechanisms. First, it analyzes the hardware behavior of a high-performance reference and distills its validated architectural decisions into reusable knowledge of hardware mechanisms rather than imitating its source code. Second, it self-evolves by sealing a kernel that passes correctness and performance validation and using it as the reference for the next optimization run, allowing the optimization results of one run to inform subsequent runs and providing a basis for revisiting and adjusting the kernel architecture.

Across 27 operators and 29 input configurations on NVIDIA Hopper and Blackwell GPUs, ForgeKernel matches or beats its expert reference on 25 of them, for a +10% geometric mean. On Ascend 910C, on the public case set of all 8 level-4 operators in the CANN-Bench Season 1 final

Preprint, arXiv 2026.

Yaojian Chen, Dazhi Peng, Yiyun Zheng, Zhui Zhu, Shengye Xiang, Leshan Li, Zhen Li, Xianglong Deng, Haojun Sun, Qingfeng He, Shangzhan Li, Yifei Shen, Preprint, 2026, arXiv

leaderboard, ForgeKernel leads the per-operator public best, with a +25.1% geometric-mean lead, while its full-suite submission ranks first on that benchmark's A3 leaderboard. As of 2026-10-30, public submissions generated by ForgeKernel rank first on all three CANN-Bench 2.0 solution leaderboards (Ascend 910C, 950DT, and 950PR) and on the SOL-ExecBench FlashInfer-Bench track.

Keywords: GPU kernels, code generation, large language models, self-evolution, performance optimization

1 Introduction

Modern machine-learning systems increasingly demand high-performance GPU kernels. New operators and model architectures, including sparse attention indexers [8], gated delta networks [28], and latent-attention variants [7], continue to appear and further expand the computational patterns that require optimization. Each such pattern is a new optimization task: work partitioning, dataflow, and pipeline organization have to be determined again for the concrete operator, input shape, and hardware.

Faced with this continuing demand for kernel development, agents that automatically write and optimize operators have drawn attention. Prior work has built agents dedicated to kernel optimization [4, 9, 10, 14, 25, 26], organizing generation, evaluation, and iterative improvement into a dedicated workflow, and has surpassed expert implementations on some tasks. These workflows still have two structural limits. On tasks that fall short of the expert reference, optimization traces show that architectural decisions, such as work partitioning, dataflow, and pipeline organization, are often fixed in the early attempts. Subsequent iterations tune within that architecture and rarely revise these decisions from performance feedback. In addition, producing a high-performance kernel in a single run does not mean that its validated findings have become cross-run knowledge that can guide later architectural design and implementation.

Overall, an operator-specific agent should close these two limits. First, performance feedback should revise architectural decisions, rather than leaving optimization inside an early choice of work partitioning, dataflow, and pipeline organization. Second, validated findings should become cross-run knowledge that guides later architectural design and implementation.

Guided by these design objectives, we introduce ForgeKernel, a self-evolving operator agent system (Figure 1). To address these two problems, ForgeKernel starts optimization from architectural design rather than existing code, and uses a hardware knowledge base to retain and reuse measurement-validated optimization experience.

For architectural design, ForgeKernel uses a high-performance reference implementation as a design reference and starting point. It separates architecture from coding, with a dedicated architecture agent reviewing and adjusting

Figure

Figure 1. Single-run optimization and cross-run self-evolution.

architectural decisions so that optimization is not confined to code-level tuning within a fixed architecture. Building on this separation, self-evolution enables continual reflection on the architecture as a whole and iterative improvement, reducing the risk of becoming trapped in local optima.

For knowledge accumulation, ForgeKernel distills mechanisms discovered during optimization and validated through independent experiments on the target hardware into cross-run knowledge that guides architectural design and implementation in subsequent tasks. Reference updates provide new performance baselines, while accumulated knowledge provides reusable evidence for optimization decisions; together, they support continued optimization.

We evaluate ForgeKernel on NVIDIA Hopper and Blackwell GPUs across 29 test configurations covering 27 operators. ForgeKernel matches or exceeds reference performance on 25 configurations, achieving a geometric-mean speedup of 1.10× over reference implementations from expert libraries and other kernel-generation systems. On Ascend, ForgeKernel outperforms the per-operator public best on the public case set of all 8 level-4 operators in the CANN-Bench Season 1 final leaderboard. In experiments comparing against kernels generated by a general-purpose coding agent, ForgeKernel achieves performance gains of up to 9.5%. In addition, knowledge-provenance records demonstrate reuse of

Preprint, 2026, arXiv

validated optimization knowledge across runs and operators, while knowledge-base ablations show that this knowledge helps improve generated kernel performance on some evaluated tasks. As external validation beyond these controlled experiments, as of 2026-10-30, public submissions generated by ForgeKernel rank first on all four leaderboards: the three CANN-Bench 2.0 solution leaderboards (Ascend 910C, 950DT, and 950PR) and the SOL-ExecBench FlashInfer-Bench track [2, 20].

The ForgeKernel source code is publicly available at https://github.com/OpenBMB/ForgeKernel.

This paper makes the following contributions:

  • We propose a kernel optimization method centered on architectural decisions. It separates architectural design from code implementation, guides implementation through explicit architectural decisions, and revises these decisions based on performance feedback. When optimization encounters a structural bottleneck, the method revisits work partitioning, dataflow, or pipeline organization rather than only tuning locally within a fixed architecture. Across runs, it also reassesses an existing implementation's architecture rather than directly carrying it forward.

  • We propose a measurement-validated mechanism for accumulating and reusing knowledge across runs. Hardware mechanisms discovered during optimization are validated through independent probes on the target GPU before being stored in a knowledge base shared across operators and input shapes. This knowledge guides architectural design and implementation planning in subsequent runs, converting findings from individual runs into reusable knowledge.

  • We implement ForgeKernel, a self-evolving operator optimization system that integrates architectural revision, reference updates, and knowledge reuse. Evaluation on NVIDIA Hopper and Blackwell GPUs and Ascend demonstrates performance gains over expert and generated references, including a 1.10× geometric-mean speedup on NVIDIA GPUs. As of 2026-10-30, submissions generated by ForgeKernel rank first on all four leaderboards: the three CANN-Bench 2.0 solution leaderboards (Ascend 910C, 950DT, and 950PR) and the SOL-ExecBench FlashInfer-Bench track.

References (21)