arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2108.11033cs.LGcs.AI
收藏

GRIM:一个基于细粒度结构化权重稀疏度的移动设备通用实时的深度学习推理框架

GRIM: A General, Real-Time Deep Learning Inference Framework for Mobile Devices based on Fine-Grained Structured Weight Sparsity

William & Mary(威廉与玛丽学院);Northeastern University(东北大学);University of Southern California(南加州大学)

Wei Niu, Zhengang Li, Xiaolong Ma, Peiyan Dong, Gang Zhou, Xuehai Qian, Xue Lin, Yanzhi Wang, Bin Ren

摘要:

在移动设备上实现实时的【形】深度神经网络(DNN)推理是有吸引力但具有挑战性的,因为即使是功能强大的现代移动设备在执行大规模DNN时也被认为是“资源受限的”。它需要通过权重修剪进行稀疏模型推理,即,DNN权重稀疏性,并且期望设计一种新的DNN权重稀疏性方案,其可以促进移动设备上的实时的【形】推理,同时保持高稀疏模型精度。本文设计了一种新的移动推理加速框架GRIM,该框架通用于卷积神经网络(CNN)和递归神经网络(RNN),并实现了实时的【形】执行和高精度,利用细粒度结构化稀疏模型推理和编译器优化。首先,我们提出了一个新的细粒度结构稀疏方案,通过基于块的列行(BCR)修剪。基于这种新的细粒度结构稀疏性,GRIM框架由两部分组成:(a)用于实时的【形】移动推理的编译器优化和代码生成;(b)用于确定剪枝超参数和执行权重剪枝的BCR剪枝优化。我们将GRIM与Alibaba MNN,TVM,TensorFlow-Lite,基于CSR,PatDNN和ESE(RNN的代表性FPGA推理加速框架)的稀疏实现进行了比较,并实现了高达14.08倍的加速比。

英文摘要:

It is appealing but challenging to achieve real-time deep neural network (DNN) inference on mobile devices because even the powerful modern mobile devices are considered as ``resource-constrained'' when executing large-scale DNNs. It necessitates the sparse model inference via weight pruning, i.e., DNN weight sparsity, and it is desirable to design a new DNN weight sparsity scheme that can facilitate real-time inference on mobile devices while preserving a high sparse model accuracy. This paper designs a novel mobile inference acceleration framework GRIM that is General to both convolutional neural networks (CNNs) and recurrent neural networks (RNNs) and that achieves Real-time execution and high accuracy, leveraging fine-grained structured sparse model Inference and compiler optimizations for Mobiles. We start by proposing a new fine-grained structured sparsity scheme through the Block-based Column-Row (BCR) pruning. Based on this new fine-grained structured sparsity, our GRIM framework consists of two parts: (a) the compiler optimization and code generation for real-time mobile inference; and (b) the BCR pruning optimizations for determining pruning hyperparameters and performing weight pruning. We compare GRIM with Alibaba MNN, TVM, TensorFlow-Lite, a sparse implementation based on CSR, PatDNN, and ESE (a representative FPGA inference acceleration framework for RNNs), and achieve up to 14.08x speedup.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑