arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2012.15667cs.LG
收藏

CNN中卷积自动调整的I/O下界

I/O Lower Bounds for Auto-tuning of Convolutions in CNNs

Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Science(中国科学院大学)

Xiaoyang Zhang, Junmin Xiao, Guangming Tan

摘要:

卷积是卷积神经网络(CNN)计算中最耗时的部分,在众多的应用中取得了巨大的成功。由于复杂的数据依赖性和模型样本量的增加,卷积遭受数据移动的高开销(即,存储器访问)。这项工作提供了全面的分析和方法,以最大限度地减少CNN中卷积的通信。在深入分析红蓝博弈模型下的I/O复杂度理论的基础上,提出了一个适用于由多个子计算组成的复合算法的I/O复杂度下界理论.基于所提出的理论,我们建立了CNN中两种代表性卷积算法的数据移动下界结果,即直接卷积和Winograd算法。其次,从I/O下限结果出发,充分利用数据重用,为两种主要卷积算法设计了近I/O最优的卷积策略。此外,为了进一步提高近I/O最优卷积算法的性能,提出了一种基于I/O下限的自调整设计,以寻找GPU上直接卷积和Winograd算法的最优参数配置,如线程数和每个线程块所使用的共享内存大小.最后,对直接卷积和Winograd算法的实验评估结果表明,我们的自动调整策略与cuDNN相比,平均可以实现约3.32倍的性能加速。此外,与最先进的自整定方法TVM相比,基于I/O下界的自整定方法不仅能更快地找到最优参数配置,而且比TVM提供的最优解具有更高的性能。

英文摘要:

Convolution is the most time-consuming part in the computation of convolutional neural networks (CNNs), which have achieved great successes in numerous applications. Due to the complex data dependency and the increase in the amount of model samples, the convolution suffers from high overhead on data movement (i.e., memory access). This work provides comprehensive analysis and methodologies to minimize the communication for the convolution in CNNs. With an in-depth analysis of the recent I/O complexity theory under the red-blue game model, we develop a general I/O lower bound theory for a composite algorithm which consists of several different sub-computations. Based on the proposed theory, we establish the data movement lower bound results of two representative convolution algorithms in CNNs, namely the direct convolution and Winograd algorithm. Next, derived from I/O lower bound results, we design the near I/O-optimal dataflow strategies for the two main convolution algorithms by fully exploiting the data reuse. Furthermore, in order to push the envelope of performance of the near I/O-optimal dataflow strategies further, an aggressive design of auto-tuning based on I/O lower bounds, is proposed to search an optimal parameter configuration for the direct convolution and Winograd algorithm on GPU, such as the number of threads and the size of shared memory used in each thread block. Finally, experiment evaluation results on the direct convolution and Winograd algorithm show that our dataflow strategies with the auto-tuning approach can achieve about 3.32x performance speedup on average over cuDNN. In addition, compared with TVM, which represents the state-of-the-art technique for auto-tuning, not only our auto-tuning method based on I/O lower bounds can find the optimal parameter configuration faster, but also our solution has higher performance than the optimal solution provided by TVM.

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

↑