Skip to main content
QUICK REVIEW

[论文解读] NetReduce: RDMA-Compatible In-Network Reduction for Distributed DNN Training Acceleration

Shuo Liu, Qiaoling Wang|arXiv (Cornell University)|Sep 21, 2020
Advanced Memory and Neural Computing参考文献 32被引用 13
一句话总结

NetReduce 是一种兼容 RDMA 的网络内归约架构,通过将梯度聚合卸载到交换机来加速分布式 DNN 训练,同时在端主机之间保持可靠的 RoCE v2 连接。它通过基于 FPGA 的网络内聚合与基于消息的信用流控机制,仅需极少的硬件修改,实现了对基于 CNN 的计算机视觉工作负载最高 1.7 倍、对基于 Transformer 的自然语言处理工作负载最高 1.5 倍的加速。

ABSTRACT

We present NetReduce, a novel RDMA-compatible in-network reduction architecture to accelerate distributed DNN training. Compared to existing designs, NetReduce maintains a reliable connection between end-hosts in the Ethernet and does not terminate the connection in the network. The advantage of doing so is that we can fully reuse the designs of congestion control and reliability in RoCE. In the meanwhile, we do not need to implement a high-cost network protocol processing stack in the switch, as IB does. The prototype implemented by using FPGA is an out-of-box solution without modifying commodity devices such as NICs or switches. For the coordination between the end-host and the switch, NetReduce customizes the transport protocol only on the first packet in a data message to comply with RoCE v2. The special status monitoring module is designed to reuse the reliability mechanism of RoCE v2 for dealing with packet loss. A message-level credit-based flow control algorithm is also proposed to fully utilize bandwidth and avoid buffer overflow. We study the effects of intra bandwidth on the training performance in multi-machines multi-GPUs scenario and give sufficient conditions for hierarchical NetReduce to outperform other algorithms. We also extend the design from rack-level aggregation to more general spine-leaf topology in the data center. NetReduce accelerates the training up to 1.7x and 1.5x for CNN-based CV and transformer-based NLP tasks, respectively. Simulations on large-scale systems indicate the superior scalability of NetReduce to the state-of-the-art ring all-reduce.

研究动机与目标

  • 通过在不修改通用硬件的前提下实现高效的网络内聚合,解决分布式 DNN 训练中的通信瓶颈。
  • 通过使用 RoCE v2 维持可靠的端到端连接,避免像 InfiniBand 那样需要在交换机中使用高成本的协议栈。
  • 通过最小化端到端延迟和缓冲区溢出风险,提升大规模多机、多 GPU 训练中的可扩展性和吞吐量。
  • 设计一种即插即用的 FPGA 解决方案,完全重用现有的 RoCE v2 拥塞控制和可靠性机制。
  • 在不同带宽和张量大小条件下,评估分层 NetReduce 在脊叶数据中心拓扑中的性能与可扩展性。

提出的方法

  • NetReduce 通过不在交换机中终止传输层,维持端到端的 RoCE v2 连接,从而重用现有的拥塞控制和可靠性机制。
  • 仅对每条消息的第一个分组进行自定义,添加特殊传输协议头以符合 RoCE v2 要求,最大限度减少协议修改。
  • 通过专用状态监控模块重用 RoCE v2 的可靠性机制,检测并恢复分组丢失,无需增加复杂的网络栈逻辑。
  • 引入基于消息的信用流控算法,防止缓冲区溢出,并在高速网络中最大化链路利用率。
  • 通过将大环划分为更小的机内环,支持分层聚合,降低端到端延迟并提升可扩展性。
  • 原型基于 FPGA 实现,实现网络内归约而无需修改通用网卡或交换机,确保兼容性与部署便捷性。

实验结果

研究问题

  • RQ1是否可以使用像 RoCE v2 这类兼容 RDMA 的协议,在不依赖交换机中专用硬件或协议栈修改的前提下,将网络内聚合高效集成到现有以太网中?
  • RQ2在不同张量大小和 GPU 数量下,分层网络内归约与平面环 all-reduce 相比,在可扩展性和性能方面表现如何?
  • RQ3在大规模多机、多 GPU 训练环境中,分层 NetReduce 相较于平面环 all-reduce 的性能优势在何种条件下充分显现?
  • RQ4与 SwitchML 或 SHARP 等现有方案相比,基于 FPGA 的网络内聚合在多大程度上提升了端到端吞吐量?
  • RQ5在使用定点数进行梯度聚合时,NetReduce 是否仍能保持训练收敛性和模型精度?

主要发现

  • 与基线 all-reduce 方法相比,NetReduce 在基于 CNN 的计算机视觉任务中最高实现 1.7 倍加速,在基于 Transformer 的自然语言处理任务中最高实现 1.5 倍加速。
  • 即使在使用定点数进行网络内归约时,系统仍能保持训练收敛性,表明对模型精度无显著影响。
  • 当机内带宽足够高时,分层 NetReduce 优于平面环 all-reduce,其性能最优的阈值比率为 B_intra/B_inter ≥ 2.3。
  • 在仿真中,NetReduce 的通信开销与 GPU 数量(P)无关,而平面环 all-reduce 的延迟因 2(P-1) 的传输因子随 P 线性增加。
  • 当 B_intra = 150 GB/s(NVLink)且 B_inter = 12.5 GB/s(100GbE)时,NetReduce 的 B_intra/B_inter 比率为 12,远超 2.3 的阈值,可在各种张量大小下实现一致的性能提升。
  • 由于端到端延迟更低且流控稳定,系统在大规模仿真中表现出卓越的可扩展性,尤其在高延迟或高 GPU 数量场景下。

更好的研究,从现在开始

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

无需绑定信用卡

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