μ-cuDNN: Accelerating Deep Learning Frameworks with Micro-Batching

μ-cuDNN: Accelerating Deep Learning Frameworks with Micro-Batching
复制标题

DOI:
--
复制
发表时间:
2018-04
期刊:
ArXiv
影响因子:
--
通讯作者:
Yosuke Oyama;Tal Ben-Nun;T. Hoefler;S. Matsuoka
Yosuke Oyama;Tal Ben-Nun;T. Hoefler;S. Matsuoka
中科院分区:
其他
文献类型:
--
作者:
Yosuke Oyama;Tal Ben-Nun;T. Hoefler;S. Matsuoka

文献摘要

相似文献

NVIDIA cuDNN是一个低级库,提供深度学习中经常使用的GPU内核。具体地说,cuDNN实现了几种等价的卷积算法,其性能和内存占用可能会有很大差异,具体取决于层的维度。当一个算法被cuDNN自动选择时,决策是在每个层的基础上执行的,因此它通常求助于满足工作空间大小限制的较慢的算法。提出了一种用于cuDNN的透明包装库--{\u}-cuDNN,它将各层的小批量计算划分为多个微批处理。基于动态规划和整数线性规划,{\u}-cuDNN通过减少对工作空间的要求来实现更快的算法。同时,{\u}-cuDNN保持了计算语义不变,实现了统计效率与硬件效率的安全解耦。我们在Caffe和TensorFlow两个框架上演示了{\u}-cuDNN的有效性,在P100-SXM2 GPU上实现了AlexNet的1.63倍和ResNet-18的1.21倍的加速。这些结果表明,使用微批次可以在保持相同内存占用的情况下无缝地提高深度学习的性能。
NVIDIA cuDNN is a low-level library that provides GPU kernels frequently used in deep learning. Specifically, cuDNN implements several equivalent convolution algorithms, whose performance and memory footprint may vary considerably, depending on the layer dimensions. When an algorithm is automatically selected by cuDNN, the decision is performed on a per-layer basis, and thus it often resorts to slower algorithms that fit the workspace size constraints. We present {\mu}-cuDNN, a transparent wrapper library for cuDNN, which divides layers' mini-batch computation into several micro-batches. Based on Dynamic Programming and Integer Linear Programming, {\mu}-cuDNN enables faster algorithms by decreasing the workspace requirements. At the same time, {\mu}-cuDNN keeps the computational semantics unchanged, so that it decouples statistical efficiency from the hardware efficiency safely. We demonstrate the effectiveness of {\mu}-cuDNN over two frameworks, Caffe and TensorFlow, achieving speedups of 1.63x for AlexNet and 1.21x for ResNet-18 on P100-SXM2 GPU. These results indicate that using micro-batches can seamlessly increase the performance of deep learning, while maintaining the same memory footprint.