Optimizing LLM Inference on Heterogeneous Edge SoCs with Operator-Level Controls
Hanzhang Ma, Qianjun Zheng, Bohua Zou, Debayan Roy, Sudeep Kanav, Binqi Sun, Lin Wang, Yutao Liu
Abstract
On-device large language model (LLM) inference on heterogeneous edge systems-on-chip (SoCs) can improve privacy, latency, and energy efficiency. However, efficiently exploiting CPU-NPU heterogeneity is challenging because matrix multiplication (MM) performance varies substantially across tensor geometries and accelerator configurations, while NPU execution may also face limited accelerator-addressable memory. We present a two-stage framework for shape-aware MM placement in edge LLM inference. Stage 1 profiles each unique MM geometry across CPU and NPU configurations, while Stage 2 selects MM instances for NPU execution under the memory budget, accounting for activation buffers shared by equal-geometry MMs. We realize this framework in a 3,000-LOC Rockchip NPU backend for llama.cpp supporting fine-grained placement, multi-core NPU execution, and efficient memory and layout management. Across 18 model-quantization pairs, shape-aware placement improves average prefill/decode throughput by 32.9%/20.2% over the shape-unaware first-come, first-served (FCFS) strategy and 253.8%/12.6% over the CPU-only strategy, outperforming both in every pair.
Create a lesson
Metadata
- Categories
- cs.AR, cs.SE
- Comments
- Accepted at the Design, Automation and Test in Europe Conference (DATE) 2027
Related papers
Beyond Equivalence: Task-Level Verification Unlocks Architectural Optimizations by LLM Agents
Shared title terminologycs.ARFelix Arnold, Ryan Amaudruz, Renzo Andri et al.
Design and Evaluation of Mamba Inference on a Programmable CGLA
Shared title terminologycs.ARTakuto Ando, Yasuhiko Nakashima
PACER: Accelerating Mixture-of-Experts LLM Inference on High Bandwidth Flash Memory via Resource-Aware Expert Prefetching and Caching
Shared title terminologycs.ARGeraldo F. Oliveira, Ahmet Caner Yüzügüler, Renzo Andri et al.
Deploying and Optimizing SmolVLA Base on AMD XDNA 2
Shared title terminologycs.ARHaoyue Zhang
A Programmable SoC for Heterogeneous Neural Acquisition
Shared title terminologycs.ARJuan Sapriza, Natalia Martínez, Tommaso Terzano et al.
Let2Gain: Efficient LLM Inference on 2.5D Chiplet Architecture using 2T Gain-Cell Memory
Shared title terminologycs.ARArkapravo Ghosh, XinXin Wang, Shuhan Liu et al.