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

异构CPU + GPU随机梯度下降算法

Heterogeneous CPU+GPU Stochastic Gradient Descent Algorithms

University of California Merced(加州大学默塞德分校)

Yujing Ma, Florin Rusu

摘要:

广泛采用的做法是使用专用硬件加速器训练深度学习模型,例如,GPU或TPU,由于其在线性代数运算上的卓越性能。然而,这种策略并没有有效地利用大量的CPU和内存资源--它们只用于预处理、数据传输和调度--这些资源在加速服务器上默认可用。在本文中,我们研究了异构CPU + GPU架构上的深度学习训练算法。我们的双重目标-同时最大化收敛速度和资源利用率-使问题具有挑战性。为了允许对设计空间进行原则性探索,我们首先介绍了一个通用的深度学习框架,该框架通过异步消息传递利用CPU和GPU之间的计算能力和存储层次结构的差异。通过实验的框架获得的见解的基础上,我们设计了两个异构异步随机梯度下降(SGD)算法。第一种算法-CPU + GPU Hogbatch-将CPU上的小批量与GPU上的大批量相结合,以最大限度地利用两种资源。然而,这会产生一个不平衡的模型更新分布,这阻碍了统计收敛。第二种算法-自适应Hogbatch-根据CPU和GPU的相对速度分配具有不断变化的大小的批次。这以可定制的利用率降低为代价来平衡模型更新率。我们表明,在拟议的CPU + GPU框架中实现这些算法,在几个真实数据集和两个计算架构(本地服务器和云实例)上实现了比TensorFlow更快的收敛和更高的资源利用率。

英文摘要:

The widely-adopted practice is to train deep learning models with specialized hardware accelerators, e.g., GPUs or TPUs, due to their superior performance on linear algebra operations. However, this strategy does not employ effectively the extensive CPU and memory resources -- which are used only for preprocessing, data transfer, and scheduling -- available by default on the accelerated servers. In this paper, we study training algorithms for deep learning on heterogeneous CPU+GPU architectures. Our two-fold objective -- maximize convergence rate and resource utilization simultaneously -- makes the problem challenging. In order to allow for a principled exploration of the design space, we first introduce a generic deep learning framework that exploits the difference in computational power and memory hierarchy between CPU and GPU through asynchronous message passing. Based on insights gained through experimentation with the framework, we design two heterogeneous asynchronous stochastic gradient descent (SGD) algorithms. The first algorithm -- CPU+GPU Hogbatch -- combines small batches on CPU with large batches on GPU in order to maximize the utilization of both resources. However, this generates an unbalanced model update distribution which hinders the statistical convergence. The second algorithm -- Adaptive Hogbatch -- assigns batches with continuously evolving size based on the relative speed of CPU and GPU. This balances the model updates ratio at the expense of a customizable decrease in utilization. We show that the implementation of these algorithms in the proposed CPU+GPU framework achieves both faster convergence and higher resource utilization than TensorFlow on several real datasets and on two computing architectures -- an on-premises server and a cloud instance.

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

↑