arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1910.00178cs.LGcs.DCcs.PF
收藏

NGEMM:通过基于嵌入式技术优化GEMM用于深度学习

NGEMM: Optimizing GEMM for Deep Learning via Compiler-based Techniques

Microsoft(微软)

Wenlei Bao, Li-Wen Chang, Yang Chen, Ke Deng, Amit Agarwal, Emad Barsoum, Abe Taha

摘要:

量化已经成为一种有效的方法,通过利用低比特计算来显着提高深度神经网络(DNN)的性能。尽管具有较低的数值精度,量化的DNN能够减少内存带宽和计算周期,几乎没有精度损失。通用矩阵乘法(GEMM)对于有效运行量化DNN模型至关重要,因为GEMM运算通常主导这些模型中的计算。通过利用诸如向量化和存储器布局的技术已经开发了各种方法来提高整数GEMM的性能。然而,这些现有的方法在某些情况下不够快。我们开发了NGEMM,这是一种基于编译器的GEMM实现,用于加速低精度训练和推理。NGEMM通过避免在树约简期间引入的不必要的向量计算而更好地使用向量单元。我们将NGEMM的性能与最先进的BLAS库(如MKL)进行了比较。我们的实验结果表明,NGEMM优于MKL非包装和包装版本的平均1.86倍和1.16倍,分别。我们已经将NGEMM应用于微软的许多生产服务。

英文摘要:

Quantization has emerged to be an effective way to significantly boost the performance of deep neural networks (DNNs) by utilizing low-bit computations. Despite having lower numerical precision, quantized DNNs are able to reduce both memory bandwidth and computation cycles with little losses of accuracy. Integer GEMM (General Matrix Multiplication) is critical to running quantized DNN models efficiently, as GEMM operations often dominate the computations in these models. Various approaches have been developed by leveraging techniques such as vectorization and memory layout to improve the performance of integer GEMM. However, these existing approaches are not fast enough in certain scenarios. We developed NGEMM, a compiler-based GEMM implementation for accelerating lower-precision training and inference. NGEMM has better use of the vector units by avoiding unnecessary vector computation that is introduced during tree reduction. We compared NGEMM's performance with the state-of-art BLAS libraries such as MKL. Our experimental results showed that NGEMM outperformed MKL non-pack and pack version by an average of 1.86x and 1.16x, respectively. We have applied NGEMM to a number of production services in Microsoft.

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

↑