CREW:硬件加速的MLP和RNN的计算重用和有效的权重存储
CREW: Computation Reuse and Efficient Weight Storage for Hardware-accelerated MLPs and RNNs
摘要:
深度神经网络(DNN)在认知应用方面取得了巨大的成功。DNN中的核心操作是量化输入和权重之间的点积。先前的工作利用由于量化而产生的权重/输入重复来避免卷积神经网络(CNN)中的冗余计算。然而,在本文中,我们表明,当应用于最先进的DNN中常用的全连接(FC)层时,它们的有效性受到严重限制,就像现代递归神经网络(RNN)和Transformer模型一样。为了提高FC计算的能量效率,我们提出了CREW,一个硬件加速器,实现计算重用和有效的权重存储机制,以利用FC层中大量的重复权重。CREW首先将唯一权重乘以其各自的输入,并将结果存储在片内缓冲器中。存储要求是适度的,因为与卷积层相比,唯一权重的数量很少,输入的大小相对较小。接下来,CREW通过获取和添加所需的产品来计算每个输出。为此,每个权重都由唯一产品缓冲区中的索引离线替换。索引通常小于量化权重,因为每个输入的唯一权重的数量往往远低于量化权重的范围,这降低了存储和内存带宽要求。总的来说,CREW大大减少了乘法的数量,并在模型内存占用和内存带宽使用方面提供了显著的节省。我们在一组不同的现代DNN上评估CREW。平均而言,CREW提供了2.61倍的加速比和2.42倍的节能比。与最先进的计算重用技术UCNN相比,CREW平均实现了2.10倍的加速和2.08倍的节能。
英文摘要:
Deep Neural Networks (DNNs) have achieved tremendous success for cognitive applications. The core operation in a DNN is the dot product between quantized inputs and weights. Prior works exploit the weight/input repetition that arises due to quantization to avoid redundant computations in Convolutional Neural Networks (CNNs). However, in this paper we show that their effectiveness is severely limited when applied to Fully-Connected (FC) layers, which are commonly used in state-of-the-art DNNs, as it is the case of modern Recurrent Neural Networks (RNNs) and Transformer models. To improve energy-efficiency of FC computation we present CREW, a hardware accelerator that implements Computation Reuse and an Efficient Weight Storage mechanism to exploit the large number of repeated weights in FC layers. CREW first performs the multiplications of the unique weights by their respective inputs and stores the results in an on-chip buffer. The storage requirements are modest due to the small number of unique weights and the relatively small size of the input compared to convolutional layers. Next, CREW computes each output by fetching and adding its required products. To this end, each weight is replaced offline by an index in the buffer of unique products. Indices are typically smaller than the quantized weights, since the number of unique weights for each input tends to be much lower than the range of quantized weights, which reduces storage and memory bandwidth requirements. Overall, CREW greatly reduces the number of multiplications and provides significant savings in model memory footprint and memory bandwidth usage. We evaluate CREW on a diverse set of modern DNNs. On average, CREW provides 2.61x speedup and 2.42x energy savings over a TPU-like accelerator. Compared to UCNN, a state-of-art computation reuse technique, CREW achieves 2.10x speedup and 2.08x energy savings on average.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。