Conventional multiply-accumulate (MAC) operations have long dominated computation time for deep neural networks (DNNs), espcially convolutional neural networks (CNNs). Recently, product quantization (PQ) has been applied to these workloads, replacing MACs with memory lookups to pre-computed dot products. To better understand the efficiency tradeoffs of product-quantized DNNs (PQ-DNNs), we create a custom hardware accelerator to parallelize and accelerate nearest-neighbor search and dot-product lookups. Additionally, we perform an empirical study to investigate the efficiency--accuracy tradeoffs of different PQ parameterizations and training methods. We identify PQ configurations that improve performance-per-area for ResNet20 by up to 3.1$\times$, even when compared to a highly optimized conventional DNN accelerator, with similar improvements on two additional compact DNNs. When comparing to recent PQ solutions, we outperform prior work by $4\times$ in terms of performance-per-area with a 0.6% accuracy degradation. Finally, we reduce the bitwidth of PQ operations to investigate the impact on both hardware efficiency and accuracy. With only 2-6-bit precision on three compact DNNs, we were able to maintain DNN accuracy eliminating the need for DSPs.
翻译:摘要:传统的乘加(MAC)运算长期以来主导着深度神经网络(DNN),尤其是卷积神经网络(CNN)的计算时间。近年来,乘积量化(PQ)被应用于这些工作负载,将MAC运算替换为对预计算点积的内存查找。为了更好地理解乘积量化DNN(PQ-DNN)的效率权衡,我们设计了一种定制硬件加速器,用于并行化和加速最近邻搜索以及点积查找。此外,我们通过实证研究探究了不同PQ参数化和训练方法下的效率-精度权衡。我们识别出的PQ配置使ResNet20的单位面积性能提升高达3.1倍,即便与高度优化的传统DNN加速器相比也是如此,并且在另外两个紧凑型DNN上取得了类似的改进。与近期PQ解决方案对比,我们在单位面积性能上比先前工作提升了4倍,而精度仅下降0.6%。最后,我们缩减了PQ运算的位宽,以研究其对硬件效率和精度的双重影响。在三个紧凑型DNN上仅使用2-6位精度时,我们仍能维持DNN精度,从而消除了对DSP的需求。