Convolutional neural network (CNN) is an important deep learning method. The convolution operation takes a large proportion of the total execution time for CNN. Feature maps for convolution operation are usually sparse. Multiplications and additions for zero values in the feature map are useless for convolution results. In addition, the convolution layer and pooling layer are computed separately in traditional methods, which leads to frequent data transfer between CPU and GPU. Based on these observations, we propose two new methods to accelerate CNN on GPUs. The first method focuses on accelerating convolution operation and reducing the calculation of zero values. The second method combines the operations of one convolution layer with the following pooling layer to effectively reduce traffic between CPU and GPU. For the first method, we extract some convolution layers from LeNet, AlexNet, and GoogLeNet, and can achieve up to 3.6X speedup over cuDNN for the single-layer convolution on GPU. Experiment on VGG-19 achieves 3.5X speedup over cuDNN for convolution operation on average. For the second method, the experiment on VGG-19 achieves 4.3X speedup over cuDNN on average.
翻译:卷积神经网络(CNN)是一种重要的深度学习方法。卷积操作占据了CNN总执行时间的很大比例。用于卷积操作的特征图通常是稀疏的。特征图中零值的乘法和加法对卷积结果是无用的。此外,传统方法中卷积层和池化层是分别计算的,这导致了CPU和GPU之间频繁的数据传输。基于这些观察,我们提出了两种在GPU上加速CNN的新方法。第一种方法专注于加速卷积操作并减少零值的计算。第二种方法将一层卷积层的操作与随后的池化层结合起来,以有效减少CPU和GPU之间的数据传输。对于第一种方法,我们从LeNet、AlexNet和GoogLeNet中提取了一些卷积层,在GPU上单层卷积相比cuDNN可实现高达3.6倍的加速。在VGG-19上的实验显示,卷积操作相比cuDNN平均达到3.5倍加速。对于第二种方法,在VGG-19上的实验显示,相比cuDNN平均达到4.3倍加速。