[论文解读] Scaling GRPC Tensorflow on 512 nodes of Cori Supercomputer
本论文评估了在Cori超算系统最多512个Intel Xeon Phi节点上,基于gRPC的分布式TensorFlow的可扩展性,使用ResNet-50和HEP-CNN模型。研究发现,由于gRPC使用效率低下、参数服务器负载不均以及互连网络利用不充分,导致通信成为瓶颈,尽管采用了高带宽互连,但在512个工作者节点时仅实现23%的可扩展性效率。
We explore scaling of the standard distributed Tensorflow with GRPC primitives on up to 512 Intel Xeon Phi (KNL) nodes of Cori supercomputer with synchronous stochastic gradient descent (SGD), and identify causes of scaling inefficiency at higher node counts. To our knowledge, this is the first exploration of distributed GRPC Tensorflow scalability on a HPC supercomputer at such large scale with synchronous SGD. We studied scaling of two convolution neural networks - ResNet-50, a state-of-the-art deep network for classification with roughly 25.5 million parameters, and HEP-CNN, a shallow topology with less than 1 million parameters for common scientific usages. For ResNet-50, we achieve >80% scaling efficiency on up to 128 workers, using 32 parameter servers (PS tasks) with a steep decline down to 23% for 512 workers using 64 PS tasks. Our analysis of the efficiency drop points to low network bandwidth utilization due to combined effect of three factors. (a) Heterogeneous distributed parallelization algorithm which uses PS tasks as centralized servers for gradient averaging is suboptimal for utilizing interconnect bandwidth. (b) Load imbalance among PS tasks hinders their efficient scaling. (c) Underlying communication primitive GRPC is currently inefficient on Cori high-speed interconnect. The HEP-CNN demands less interconnect bandwidth, and shows >80% weak scaling efficiency for up to 256 nodes with only 1 PS task. Our findings are applicable to other deep learning networks. Big networks with millions of parameters stumble upon the issues discussed here. Shallower networks like HEP-CNN with relatively lower number of parameters can efficiently enjoy weak scaling even with a single parameter server.
研究动机与目标
- 评估基于gRPC的分布式TensorFlow在Cori超算等大规模HPC系统上的弱可扩展性行为。
- 识别大规模分布式训练中与通信协议和参数服务器架构相关的性能瓶颈。
- 在相同条件下,比较深度网络(ResNet-50)与轻量级网络(HEP-CNN)的可扩展性差异。
- 分析参数服务器数量及负载不均对互连网络利用率和训练效率的影响。
提出的方法
- 使用tf_cnn_benchmarking脚本进行ResNet-50训练,并修改代码以使用tf.train.Supervisor API,实现在Cori上的分布式训练。
- 将所有工作者和参数服务器(PS)配置在独立的KNL节点上,优化线程亲和性,并从源码编译MKL优化的TensorFlow。
- 使用虚拟数据以消除I/O瓶颈,仅关注通信和同步开销。
- 采用同步随机梯度下降,每个工作者固定小批量大小(128),以评估弱可扩展性效率。
- 相对于单节点性能测量可扩展性效率,通过调整工作者数量和PS任务数进行评估。
- 分析通信模式、PS任务间的负载分布以及互连网络利用率,以定位性能瓶颈。
实验结果
研究问题
- RQ1在512节点的Cori超算系统上,基于gRPC的分布式TensorFlow在同步SGD下的弱可扩展性效率如何?
- RQ2参数服务器数量和负载不均如何影响通信效率及大规模下的整体可扩展性?
- RQ3为何在ResNet-50模型中,尽管互连带宽很高,可扩展性效率在超过128个工作者后仍显著下降?
- RQ4为何HEP-CNN在仅使用一个参数服务器的情况下,即使在256个工作者时仍能保持高效率?
- RQ5与最优的all-reduce实现相比,gRPC通信协议在带宽利用方面存在多大程度的限制?
主要发现
- ResNet-50在使用32个参数服务器时,最多可扩展至128个工作者,效率超过80%;但在512个工作者、64个PS任务时,效率下降至23%。
- 大规模性能下降主要源于gRPC在Cori高速互连上的效率低下,导致网络带宽利用率低。
- 当PS数量超过54个时,参数服务器之间的负载不均成为主要瓶颈,因为ResNet-50的99%参数集中在54个大张量中。
- 由于通信量较低,HEP-CNN在仅使用一个参数服务器的情况下,可扩展至256个工作者,效率仍保持在80%以上。
- 将PS数量从32增加到64对ResNet-50的性能提升微乎其微,表明由于负载不均和协议限制,已出现收益递减现象。
- 粗略估算表明,ResNet-50的实际通信性能与峰值性能之间存在5至6倍的差距,表明通信栈仍有显著优化空间。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。