arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1804.04806cs.LGcs.DCcs.MScs.NEstat.ML
收藏

μ-cuDNN:使用微批处理加速深度学习框架

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

Tokyo Institute of Technology(东京工业大学);ETH Zurich(苏黎世联邦理工学院);RIKEN Center for Computational Science(理化学研究所计算科学中心)

Yosuke Oyama, Tal Ben-Nun, Torsten Hoefler, Satoshi Matsuoka

摘要:

NVIDIA cuDNN是一个低级库,提供深度学习中经常使用的GPU内核。具体来说,cuDNN实现了几种等效的卷积算法,其性能和内存占用可能会根据层的尺寸而发生很大变化。当cuDNN自动选择算法时,决策是在每层的基础上执行的,因此它通常采用适合工作空间大小约束的较慢算法。我们提出了μ-cuDNN,一个透明的cuDNN包装库,它将层的小批量计算分成几个微批。基于动态规划和线性规划,μ-cuDNN通过降低工作空间要求实现更快的算法。同时,μ-cuDNN保持计算语义不变,因此它安全地将统计效率与硬件效率相结合。我们在两个框架Caffe和TensorFlow上展示了μ-cuDNN的有效性,在P100-SXM 2 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 μ-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, μ-cuDNN enables faster algorithms by decreasing the workspace requirements. At the same time, μ-cuDNN keeps the computational semantics unchanged, so that it decouples statistical efficiency from the hardware efficiency safely. We demonstrate the effectiveness of μ-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.

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

↑