arXiv:2610.24648cs.LGOct 2026

Manuscript Offprint

arXiv:2610.24648

EdgeKernelBench: Unified LLM-Driven Kernel Generation for Edge Backends

Yuhua Zheng, Xueyi Chen, Xinze Zou, Xin Li, Haoji Hu, Huan Wang

ABSTRACT

Recent works show that LLMs can generate kernels with strong performance on server GPUs. Edge deployment presents distinct challenges because the hardware is heterogeneous, the software stacks are fragmented, and the resource budgets are tight. LLM kernel generation across diverse edge backends has yet to be studied systematically. We introduce EdgeKernelBench, which combines a unified IR deployment framework with a hierarchical benchmark for edge workloads. The unified IR captures reusable computation, scheduling, and memory decisions and connects to each target backend through a compiler interface. The benchmark spans progressively larger program scopes, from individual operators to compact model graphs, across representative edge application domains. We instantiate the design with TVM as a reference compiler and validate it across heterogeneous edge backends. With a single generation attempt, the best model achieves 64.5% Correct@1 but only 25.5% Fast@1.0. This gap shows that functional correctness does not consistently translate into performance gains. We therefore introduce the Layered Edge Kernel Agent (LEKA), which organizes optimization through a layered IR. On the agent evaluation subset, LEKA achieves 43.5% Fast@1.0, compared with 13.0% for direct generation and 26.1% for Claude Code. LEKA and Claude Code use the same base model and optimization budget. Together, EdgeKernelBench and LEKA support unified evaluation and layered optimization of kernels generated by LLMs across edge backends.

1 INTRODUCTION

Growing demand for low latency, reduced network reliance, and local data processing drives model deployment on edge devices (Zhou et al., 2019; Xu et al., 2021). Yet rapidly evolving models must run across diverse runtimes and hardware backends. Deployment systems continue improving inference efficiency across platforms (NVIDIA, 2026; Jiang et al., 2020; Nachin et al., 2026). Still, new operators and backends often require custom kernels. The need to manually implement, validate, and maintain high-performance operators remains a persistent bottleneck in edge deployment.

Large language models can now generate executable code from natural language descriptions (Chen et al., 2021; Li et al., 2022). Recent works apply this capability to high-performance kernel generation (Ouyang et al., 2025; Li et al., 2025a; Lin et al., 2026). However, most of this work still targets server GPUs. There are three major problems that prevent these methods from being used to generate kernels for edge devices, as illustrated in Figure 1.

(1) Edge hardware and software ecosystems are highly fragmented. Server kernel generation usually targets a small set of mainstream accelerators supported by mature software stacks. Edge devices span heterogeneous processors, vendor runtimes, and deployment engines. Generating native programs directly ties reusable computation and scheduling knowledge to the languages, interfaces, and legality rules of individual backends. Supporting a new backend therefore requires the model to adapt to another programming and deployment environment, which limits transfer across devices.

(2) Edge kernel generation has a different optimization objective from server kernel generation. Server kernels often run on accelerators with ample dedicated memory, allowing optimization to focus primarily on execution speed. Edge workloads share compute and memory with the rest of the system, and memory capacity can determine whether a model is deployable. Edge kernel generation must therefore optimize performance and memory jointly within a fixed resource budget.

∗^{*}Equal contribution.

†^{\dagger}Work done as a visiting research intern at ENCODE Lab, Westlake University.

∗^{*}Corresponding authors.

(a) Server-Side Kernel Generation

Figure

(b) Edge-Side Deployment-Oriented Generation

Generated by the LLM

Provided by the toolchain

Hardware facts given to the LLM

Selected kernel

Figure 1: Server and edge kernel generation follow different optimization regimes. Server methods usually emphasize execution speed within relatively uniform software stacks and generous resource budgets. Edge generation spans fragmented hardware and software ecosystems. It must also balance performance, memory use, and deployment feasibility under tight resource limits.

(3) Existing benchmarks do not fully capture the requirements of edge kernel generation. KernelBench and related studies mainly target server GPUs (Ouyang et al., 2025; Li et al., 2025a), while MobileKernelBench extends evaluation to mobile devices (Zou et al., 2026). Its public tasks consist mainly of individual operators and their attribute variants. Such tasks assess basic code generation, but not cross-operator optimization or graph-level resource planning in edge deployments.

To address these problems, we introduce EdgeKernelBench. It combines a unified deployment framework with a hierarchical benchmark for edge workloads. The LLM does not produce a separate native program for each backend. The LLM expresses optimization choices for the target device in a unified intermediate representation, or IR. A deterministic backend adapter then lowers the program to the target backend in stages. This separation isolates reusable computation and knowledge from interfaces that are specific to each backend. EdgeKernelBench also places scheduling and memory decisions in the same optimization space. The model can reuse optimization knowledge across backends while balancing execution performance and memory cost under deployment constraints.

All EdgeKernelBench tasks are PyTorch reference programs with traceable provenance (Paszke et al., 2019). The tasks are organized along two orthogonal axes, compositional complexity and application domain. The complexity axis contains three levels named Basic Compute Patterns, Composed Operator Graphs, and Compact Model Graphs. The application domains cover Mobile and Personal Intelligence, Embodied Robotics, and Smart AIoT. Separating these axes enables targeted evaluation of optimization capabilities across edge deployment settings.

To test the feasibility of this design, we instantiate EdgeKernelBench with TVM as the reference compiler stack (Chen et al., 2018). We evaluate five LLMs on 650 task instances across CPU/L-VM, GPU/CUDA, and GPU/OpenCL execution paths. The results show that a consistent workflow for generation, validation, and measurement runs across heterogeneous backends. The hierarchical benchmark also reveals how the model capability changes as the program scope grows.

The experiments also expose the limits of one-shot generation. Across 650 task instances, the strongest model achieves 73.5% Compile@1 and 64.5% Correct@1, but only 25.5% Fast@1.0. At Level 3, the highest Fast@1.0 scores on the three backends fall further to values between 0.0% and 4.0%. As the program scope grows, one-shot generation struggles to coordinate increasingly coupled decisions across representation levels.

To address this limitation, we further introduce LEKA, the Layered Edge Kernel Agent. LEKA decomposes coupled cross-level decisions along the IR hierarchy, allowing each agent to focus on one representation while preserving coordination across levels. On a randomly sampled 69-instance subset for agent evaluation, LEKA raises Correct@1 from 42.0% to 100.0% and Fast@1.0 from 13.0% to 43.5% relative to one-shot generation. With the same base model, task contract, and wall-clock budget, LEKA raises Fast@1.0 from 26.1% for the pure Claude Code baseline to 43.5%.

Our work makes three contributions.

• We introduce EdgeKernelBench, which combines a unified IR deployment framework with a hierarchical benchmark for edge workloads. It provides a common basis for studying LLM kernel generation and optimization on edge devices.

• We introduce LEKA, a general agent architecture for edge kernel generation and optimization. LEKA organizes optimization through a layered IR to reduce the complexity of decisions across representation levels.

• We conduct systematic experiments on a range of representative edge hardware backends. The evaluation measures the edge kernel generation capabilities of leading LLMs and examines their main failure modes. It also tests the optimization gains from LEKA.

References (31)