arXiv:2409.14803cs.AI2024-09被引 30

对比边缘AI平台性能,NPU在多数任务中更快更省电。

Benchmarking Edge AI Platforms for High-Performance ML Inference

  • 测试多种芯片组合在矩阵乘法与神经网络推理中的表现
  • NPU比CPU快58.6%(向量乘法),大模型推理快3.2倍
  • 适合追求低功耗实时推理的开发者参考

随着边缘计算因降低通信延迟和实现实时处理而日益重要,高性能异构系统级芯片逐渐兴起。尽管当前方法常通过缩小现代硬件来实现,但神经网络工作负载在这些平台上的性能表现差异显著,尤其是在并行处理方面。为此,我们对基于纯CPU、CPU/GPU及CPU/NPU集成方案的线性代数与神经网络推理任务进行了全面比较,评估其延迟与吞吐量。结果表明:神经处理单元(NPU)在矩阵-向量乘法上比CPU快58.6%,在视频分类与大语言模型等任务中提速达3.2倍;GPU在矩阵乘法上比CPU快22.6%,在LSTM网络中提速2.7倍;而CPU则在非并行操作如点积中表现更优。采用NPU的推理在低功耗下实现了良好的延迟与吞吐平衡,而基于GPU的推理虽能耗更高,但在大维度与大批量场景下表现最佳。研究突显了异构计算在边缘人工智能中的潜力,即通过合理调度不同计算单元,实现高效精准的实时推理。

原文摘要 · Abstract (English)

Edge computing's growing prominence, due to its ability to reduce communication latency and enable real-time processing, is promoting the rise of high-performance, heterogeneous System-on-Chip solutions. While current approaches often involve scaling down modern hardware, the performance characteristics of neural network workloads on these platforms can vary significantly, especially when it comes to parallel processing, which is a critical consideration for edge deployments. To address this, we conduct a comprehensive study comparing the latency and throughput of various linear algebra and neural network inference tasks across CPU-only, CPU/GPU, and CPU/NPU integrated solutions. {We find that the Neural Processing Unit (NPU) excels in matrix-vector multiplication (58.6% faster) and some neural network tasks (3.2$\times$ faster for video classification and large language models). GPU outperforms in matrix multiplication (22.6% faster) and LSTM networks (2.7$\times$ faster) while CPU excels at less parallel operations like dot product. NPU-based inference offers a balance of latency and throughput at lower power consumption. GPU-based inference, though more energy-intensive, performs best with large dimensions and batch sizes. We highlight the potential of heterogeneous computing solutions for edge AI, where diverse compute units can be strategically leveraged to boost accurate and real-time inference.

边缘计算NPU性能对比推理优化

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