Skip to main content
QUICK REVIEW

[论文解读] Performance Modeling and Evaluation of Distributed Deep Learning Frameworks on GPUs

Shaohuai Shi, Qiang Wang|arXiv (Cornell University)|Nov 16, 2017
Advanced Neural Network Applications参考文献 31被引用 16
一句话总结

该论文在配备Tesla P40 GPU的4节点GPU集群上,评估了四种主流分布式深度学习框架(Caffe-MPI、CNTK、MXNet和TensorFlow)在单GPU、多GPU和多节点配置下的同步SGD性能。通过建模与基准测试,识别出通信开销、cuDNN调优以及梯度聚合隐藏是主要性能瓶颈,由于网络延迟和次优的节点间通信模式,其扩展效率在35.6%至77.7%之间。

ABSTRACT

Deep learning frameworks have been widely deployed on GPU servers for deep learning applications in both academia and industry. In training deep neural networks (DNNs), there are many standard processes or algorithms, such as convolution and stochastic gradient descent (SGD), but the running performance of different frameworks might be different even running the same deep model on the same GPU hardware. In this study, we evaluate the running performance of four state-of-the-art distributed deep learning frameworks (i.e., Caffe-MPI, CNTK, MXNet, and TensorFlow) over single-GPU, multi-GPU, and multi-node environments. We first build performance models of standard processes in training DNNs with SGD, and then we benchmark the running performance of these frameworks with three popular convolutional neural networks (i.e., AlexNet, GoogleNet and ResNet-50), after that, we analyze what factors that result in the performance gap among these four frameworks. Through both analytical and experimental analysis, we identify bottlenecks and overheads which could be further optimized. The main contribution is that the proposed performance models and the analysis provide further optimization directions in both algorithmic design and system configuration.

研究动机与目标

  • 分析并建模在不同硬件配置(单GPU、多GPU、多节点)下分布式深度学习框架的性能。
  • 识别在相同硬件上训练标准CNN时,最先进框架(Caffe-MPI、CNTK、MXNet、TensorFlow)之间的性能差距。
  • 研究数据I/O、cuDNN调优以及节点间通信对训练吞吐量和扩展效率的影响。
  • 提供性能模型与可操作的见解,以优化分布式DNN训练中的框架设计与系统配置。

提出的方法

  • 为同步SGD的关键组件(包括梯度计算、通信和聚合)开发了分析性性能模型。
  • 在单GPU、多GPU和多节点环境中,使用三种标准CNN(AlexNet、GoogleNet和ResNet-50)对四种框架进行基准测试。
  • 使用NCCL2.0(CNTK)、TCP套接字(MXNet)和gRPC(TensorFlow)测量并分析所有减少操作的通信开销。
  • 通过比较实际训练时间与理论加速比,量化扩展效率,使用$E_{allreduce}$和$t_{comm}$等指标。
  • 通过测量反向传播与所有减少操作之间的重叠程度,评估梯度通信隐藏的有效性。
  • 在配备56Gbps InfiniBand和每节点4块Tesla P40 GPU的4节点集群上进行实验,使用受控的mini-batch大小和输入布局。

实验结果

研究问题

  • RQ1在单GPU、多GPU和多节点设置下,四种框架(Caffe-MPI、CNTK、MXNet、TensorFlow)在训练吞吐量和扩展效率方面如何比较?
  • RQ2尽管使用相同硬件和DNN模型,框架间性能差异的主要成因是什么?
  • RQ3在多GPU和多节点环境中,梯度通信开销在多大程度上可以被隐藏?这对扩展性能有何影响?
  • RQ4cuDNN自动调优和输入数据布局(如NCWH与NWHC)对前向和反向传播性能有何影响?
  • RQ5网络带宽和延迟(如56Gbps InfiniBand)在多台机器间扩展性方面起到什么作用?

主要发现

  • 对于AlexNet等浅层网络,即使使用高性能GPU,较大的mini-batch大小也可能使数据加载成为瓶颈,凸显高效数据预处理的必要性。
  • CNTK和MXNet通过cuDNN自动调优和最优输入布局(NCWH)实现更优性能;而TensorFlow和Caffe-MPI由于配置次优,效率较低。
  • MXNet和TensorFlow通过将梯度通信与反向传播计算重叠,实现了更好的扩展性;而CNTK未采用此机制,导致效率较低。
  • 由于节点间通信延迟,扩展效率在四台机器上显著下降;CNTK在AlexNet、GoogleNet和ResNet-50上的效率分别为55%、67.5%和77.7%。
  • MXNet在四台机器上通信开销过高(GoogleNet中为0.4505秒,反向传播为0.1819秒),导致扩展效率仅为35.6%。
  • 由于gRPC延迟较高且RDMA使用不理想,TensorFlow在AlexNet、GoogleNet和ResNet-50上的扩展效率分别为50.6%、75.6%和52.2%。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。