[论文解读] Mitigating Edge Machine Learning Inference Bottlenecks: An Empirical Study on Accelerating Google Edge Models
该论文提出Mensa,一种异构机器学习推理加速框架,可根据层的特性,将来自多种Google边缘模型(CNN、LSTM、转换器、RCNN)的层动态调度至专用的片上和近数据加速器。通过将层聚类为三类不同类型,Mensa实现了比Google Edge TPU高3.0倍的能效和3.1倍的吞吐量,且在24个真实边缘模型上相较Eyeriss v2分别提升了2.4倍和4.3倍。
As the need for edge computing grows, many modern consumer devices now contain edge machine learning (ML) accelerators that can compute a wide range of neural network (NN) models while still fitting within tight resource constraints. We analyze a commercial Edge TPU using 24 Google edge NN models (including CNNs, LSTMs, transducers, and RCNNs), and find that the accelerator suffers from three shortcomings, in terms of computational throughput, energy efficiency, and memory access handling. We comprehensively study the characteristics of each NN layer in all of the Google edge models, and find that these shortcomings arise from the one-size-fits-all approach of the accelerator, as there is a high amount of heterogeneity in key layer characteristics both across different models and across different layers in the same model. We propose a new acceleration framework called Mensa. Mensa incorporates multiple heterogeneous ML edge accelerators (including both on-chip and near-data accelerators), each of which caters to the characteristics of a particular subset of models. At runtime, Mensa schedules each layer to run on the best-suited accelerator, accounting for both efficiency and inter-layer dependencies. As we analyze the Google edge NN models, we discover that all of the layers naturally group into a small number of clusters, which allows us to design an efficient implementation of Mensa for these models with only three specialized accelerators. Averaged across all 24 Google edge models, Mensa improves energy efficiency and throughput by 3.0x and 3.1x over the Edge TPU, and by 2.4x and 4.3x over Eyeriss v2, a state-of-the-art accelerator.
研究动机与目标
- 识别并分析在执行多种前沿边缘神经网络模型时,商用Google Edge TPU的性能瓶颈。
- 量化CNN、LSTM、转换器和RCNN中层特征(如FLOP/Byte比、占用空间、数据重用)在模型内和模型间的高度异构性。
- 设计一个异构加速器框架Mensa,根据计算和内存访问模式将特定加速器匹配至层聚类。
- 证明Mensa的最小三加速器设计可在多种边缘工作负载中超越单体式和可重构加速器。
- 通过在24个真实Google边缘模型上的全面评估,验证该框架的有效性,展示其在能效和吞吐量方面的显著提升。
提出的方法
- 对24个Google边缘模型进行逐层分析,以表征FLOP/Byte比、参数占用空间和数据重用模式等关键指标。
- 基于共享特征将层聚类为三组,以实现对加速器的针对性优化。
- 设计三种异构加速器:Pascal(用于高计算量、高重用率层)、Pavlov(用于低重用率的循环层)和Jacquard(用于低占用空间、高带宽层)。
- 实现一个运行时调度器,将每层分配至最优加速器,同时尊重层间依赖关系并最大化利用率。
- 集成片上和近数据处理单元(如存内计算),以减少内存瓶颈并提升带宽效率。
- 使用真实工作负载对比Mensa与Edge TPU及Eyeriss v2的性能,测量吞吐量、能效和推理延迟。
实验结果
研究问题
- RQ1在执行多种边缘神经网络模型时,Google Edge TPU的主要性能瓶颈是什么?
- RQ2模型内和模型间层特征(如FLOP/Byte比、占用空间、数据重用)的异构性在多大程度上影响加速器效率?
- RQ3基于共享特征的层聚类能否有效实现面向边缘机器学习推理的异构加速器专业化?
- RQ4与单体式或可重构设计相比,通过动态调度层至专用加速器可实现多大程度的性能提升?
- RQ5为在多种边缘模型上实现高性能,所需的专用加速器的最优数量和类型是什么?
主要发现
- 在24个边缘模型上,Google Edge TPU的平均吞吐量利用率仅为25%,其中LSTM和转换器模型的利用率低于1%,主要由于数据流和内存访问模式不匹配。
- Edge TPU的平均理论峰值能效仅实现37%,主要因片上缓冲区利用率不足和内存访问处理效率低下。
- 单个模型内层特征差异最高可达两个数量级,尤其在使用可分离卷积和循环单元的边缘优化模型中更为显著。
- Mensa在全部24个模型上相较Edge TPU实现了3.0倍的能效提升和3.1倍的吞吐量提升,相较Eyeriss v2分别提升2.4倍和4.3倍。
- 由于Pavlov的优化数据流和存内计算支持,LSTM和转换器的延迟降低了5.4倍;而CNN则得益于多加速器负载均衡。
- 三加速器Mensa设计能有效处理所有模型类型,且运行时开销极小,证明少量专用单元可超越通用或可重构设计。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。