arXiv:2501.14794cs.DCcs.AI2025-01被引 34

提出GPU+NPU协同推理框架,显著提升移动端大模型运行速度。

Characterizing Mobile SoC for Accelerating Heterogeneous LLM Inference

  • 设计GPU与NPU协同计算机制,充分挖掘异构算力与内存带宽
  • 实现1.34倍至6.02倍端到端加速,性能远超单一加速器方案
  • 适合追求高效率、低延迟的移动端大模型部署开发者

随着ChatGPT、AI代理和视频生成等技术的快速发展,现代移动系统开始在本地设备集成这些AI能力,以增强隐私保护并降低响应延迟。为满足AI任务的计算需求,当前移动SoC配备了多种AI加速器,如GPU和神经网络处理单元(NPUs)。然而,对这些异构处理器缺乏全面表征,现有设计通常仅依赖单一加速器进行大语言模型(LLM)推理,导致计算资源与内存带宽利用不充分。本文首先总结了异构处理器的关键性能特征及SoC内存带宽特性。基于此,我们提出了多种异构并行机制,以充分释放GPU与NPU的计算能力和内存带宽。同时设计了一种快速同步机制,利用统一内存架构实现异构处理器间的高效通信。通过上述技术,我们构建了HeteroInfer——目前移动端最快的支持GPU-NPU异构执行的大模型推理引擎。评估表明,与最先进的仅使用GPU或仅使用NPU的推理引擎相比,HeteroInfer实现了1.34x至6.02x的端到端加速,且对其他应用干扰极小。

原文摘要 · Abstract (English)

With the rapid advancement of artificial intelligence technologies such as ChatGPT, AI agents, and video generation, contemporary mobile systems have begun integrating these AI capabilities on local devices to enhance privacy and reduce response latency. To meet the computational demands of AI tasks, current mobile SoCs are equipped with diverse AI accelerators, including GPUs and Neural Processing Units (NPUs). However, there has not been a comprehensive characterization of these heterogeneous processors, and existing designs typically only leverage a single AI accelerator for LLM inference, leading to suboptimal use of computational resources and memory bandwidth. In this paper, we first summarize key performance characteristics of heterogeneous processors, SoC memory bandwidth, etc. Drawing on these observations, we propose different heterogeneous parallel mechanisms to fully exploit both GPU and NPU computational power and memory bandwidth. We further design a fast synchronization mechanism between heterogeneous processors that leverages the unified memory architecture. By employing these techniques, we present HeteroInfer, the fastest LLM inference engine in mobile devices which supports GPU-NPU heterogeneous execution. Evaluation shows that HeteroInfer delivers a 1.34x to 6.02x end-to-end speedup over state-of-the-art GPU-only and NPU-only LLM engines, while maintaining negligible interference with other applications.

异构计算大模型推理移动AIGPU-NPU协同

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。