EdgeKernelBench: Unified LLM-Driven Kernel Generation for Edge Backends
Organizations: Westlake University · Zhejiang University
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% [email protected]. 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% [email protected], 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.
Figures & tables
| Model | Level 1 | Level 2 | Level 3 | ||||||
|---|---|---|---|---|---|---|---|---|---|
| CSR | FCR | F@1 | CSR | FCR | F@1 | CSR | FCR | F@1 | |
| CPU/LLVM | |||||||||
| GPT-5.6-sol | 87.9 | 82.4 | 46.2 | 68.8 | 62.4 | 15.1 | 60.0 | 40.0 | 0.0 |
| Gemini-3.7-Flash | 87.9 | 84.6 | 37.4 | 72.0 | 58.1 | 11.8 | 75.0 | 45.0 | 0.0 |
| Claude Sonnet 5 | 74.7 | 67.0 | 29.7 | 46.2 | 29.0 | 2.2 | 45.0 | 40.0 | 0.0 |
| DeepSeek-V4-Pro | 97.8 | 94.5 | 37.4 | 83.9 | 75.3 | 3.2 | 55.0 | 35.0 | 0.0 |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| Level | Representative tasks |
|---|---|
| Level 1 | Matrix multiplication, convolution, reductions, pooling, tensor reshaping and transposition, LayerNorm, RMSNorm, GELU, SwiGLU, rotary position embeddings (RoPE), KV cache updates, and matrix multiplication with dequantized weights. |
| Level 2 | Convolutional blocks with normalization and activation, residual blocks, multiscale feature fusion, image and point-cloud feature fusion, RMSNorm followed by QKV projection, grouped-query attention (GQA) with KV caching, SwiGLU feed-forward blocks, and LoRA linear layers. |
| Level 3 | MobileNetV2/V3, ResNet-18, and compact ConvNeXt classifiers; NanoDet detection networks, U-Net segmentation networks, and PointPillars backbones; Transformer decoder blocks for prefill and decoding (Llama, Qwen2, Mistral, and Phi-3); stacked TinyLlama decoder blocks. |
| Class | Matching rule / family | Dominant search structure |
|---|---|---|
| C1 | conv | Convolutional tiling, layout, and data reuse |
| C2 | matmul|dense|linear|bmm | Matrix-multiplication tiling and reduction mapping |
| C3 | softmax|norm|mean|sum| variance|pool | Reduction, normalization, and pooling schedules |
| C4 | lstm|gru | Recurrent computation with loop-carried state |
| C5 | cumsum|sort|topk | Scan, sorting, and synchronization structure |
| C6 | Catch-all | Elementwise, activation, and data-movement programs |
Large Language Model-Guided Optimization
Large Language Model-Guided Optimization uses language models to propose, steer, and refine solutions to hard search and design problems.
See all 601 papers