KernelShift: Benchmarking Kernel Optimization Across Evolving Hardware

Shuaiwei Huang, Weihua Du, Allen Wu, Ivan Fox, Manupa Karunaratne, Yiming Yang, Sean Welleck

Carnegie Mellon University · Arm Ltd.

Published November 22, 2026 · on the feed November 24, 2026 · ▲ 4 · arXiv 2611.29590

The abstract

Efficient AI computation depends on hardware that evolves over time, shifting the strategies needed to implement performant code. For CPU kernels, a key evolving factor is the set of available architectural extensions, which expose specialized hardware instructions that change the techniques used to optimize kernels. We study how effectively coding agents use these new, potentially unfamiliar extensions to write fast code. We introduce KernelShift, a benchmarking pipeline and a set of environments for evaluating coding agents in kernel optimization across evolving CPU architectures. Its agent-assisted, human-verified pipeline turns code repositories into benchmark instances, and its environments let agents optimize code with feedback from the target hardware. Using this pipeline, we construct 99 kernels from real-world, actively developed repositories (ncnn, llama.cpp, Arm SIMD Loops, and KleidiAI), including inference workloads derived from real model executions. KernelShift supports incorporating new kernels and hardware configurations as libraries and processors evolve. We evaluate agents with proprietary and open-weight models across progressively newer architectural extensions (Arm Neon, SVE, SVE2, and SME2), examining how performance changes as hardware evolves. On established extensions, agents beat the auto-vectorized compiler everywhere (2.4-19.8x) and exceed general-purpose libraries such as ncnn (getting up to 2.74x over its Neon kernels), but fall behind Arm's hand-tuned KleidiAI kernels (0.70x). In end-to-end inference of two LLMs, agent-written kernels achieve a 1.3-1.6x prefill speedup over llama.cpp's fast path. However, current agents do not yet reliably adapt to new extensions that require unfamiliar programming models, such as SME2's matrix tiles.

The Brief

2:43

A short podcast summary of the paper. Written and voiced by AI.

Transcript

KernelShift. Benchmarking Kernel Optimization Across Evolving Hardware. By Shuaiwei Huang and six others, from Carnegie Mellon University and Arm. Published on the twenty-second of November.

Efficient AI computation depends on hardware, and hardware does not stand still. As it evolves, the strategies needed to write fast code shift with it. For CPU kernels, one of the main things that changes is the set of architectural extensions available. Each extension exposes specialized hardware instructions, and those instructions change the techniques used to optimize a kernel. A newer extension may also be unfamiliar. The authors want to know how well coding agents cope with that: whether they can use new and possibly unfamiliar extensions to write fast code.

KernelShift is built to answer that. It is two things at once: a benchmarking pipeline, and a set of environments for evaluating coding agents on kernel optimization across evolving CPU architectures. The environments let an agent optimize code while receiving feedback from the target hardware itself, so what gets measured is real speed on the processor in question.

The pipeline is agent-assisted and human-verified, and it turns code repositories into benchmark instances. Using it, the authors construct ninety-nine kernels drawn from real-world repositories that are still actively developed: ncnn, llama.cpp, Arm SIMD Loops, and KleidiAI. Some of these are inference workloads derived from real model executions. Because the pipeline is reusable, new kernels and hardware configurations can be added as the libraries and processors evolve. Agents running on both proprietary and open-weight models are then evaluated across a ladder of progressively newer extensions: Arm Neon, then SVE, then SVE2, and finally SME2. The point is to watch how performance changes as the hardware moves on.

On established extensions the agents do well. They beat the auto-vectorized compiler everywhere, by between two point four and nineteen point eight times. They also exceed general-purpose libraries such as ncnn, getting up to two point seven four times the speed of its Neon kernels. Against Arm's hand-tuned KleidiAI kernels, though, they fall behind, reaching zero point seven times their speed.

The gains carry into full inference. Across end-to-end runs of two large language models, agent-written kernels give a prefill speedup of between one point three and one point six times over the fast path in llama.cpp. The weak spot is the newest hardware. Current agents do not yet reliably adapt to extensions that require an unfamiliar programming model, and the example the authors name is the matrix tiles of SME2.

The results trace a gradient. Where the extension is established, agents outrun compilers and general libraries, though not expert hand-tuning. Where the extension asks for a new way of programming, the advantage has not yet arrived, which is the part of the curve KernelShift is designed to keep tracking as hardware evolves.

More with an account

Listen to every day’s papers

Daily playlists, deep dives, quests for the papers, and quizzes on their key terms.

Join free
KipQuest: the day’s AI research, as podcasts and quests. All papers Android app Privacy Contact Episodes are written and voiced by AI from each paper. Summaries can contain mistakes: the paper is the source.