Skip to main content
QUICK REVIEW

[论文解读] TACOS

William Won|arXiv (Cornell University)|Apr 11, 2023
Ferroelectric and Negative Capacitance DevicesEngineering被引用 3
一句话总结

Tacos 是一种完全自动化的、拓扑感知的集合通信算法合成器,利用时间展开网络(TEN)为任意网络拓扑生成最优或近似最优的集合通信算法。与基线方法相比,其 All-Reduce 性能提升 3.73 倍,并在 6.1 分钟内为 512-NPU 系统生成了算法,采用贪心匹配方法实现。

ABSTRACT

The surge of artificial intelligence, particularly large language models, has driven the rapid development of large-scale machine learning clusters. Executing distributed models on these clusters is often constrained by communication overhead, making efficient utilization of available network resources crucial. As a result, the routing algorithm employed for collective communications (i.e., collective algorithms) plays a pivotal role in determining overall performance. Unfortunately, existing collective communication libraries for distributed machine learning are limited by a fixed set of basic collective algorithms. This limitation hinders communication optimization, especially in modern clusters with heterogeneous and asymmetric topologies. Furthermore, manually designing collective algorithms for all possible combinations of network topologies and collective patterns requires heavy engineering and validation efforts. To address these challenges, this paper presents TACOS, an autonomous synthesizer capable of automatically generating topology-aware collective algorithms tailored to specific collective patterns and network topologies. TACOS is highly flexible, synthesizing an All-Reduce algorithm for a heterogeneous 128-NPU system in just 1.08 seconds, while achieving up to a 4.27x performance improvement over state-of-the-art synthesizers. Additionally, TACOS demonstrates better scalability with polynomial synthesis times, in contrast to NP-hard approaches which only scale to systems with tens of NPUs. TACOS can synthesize for 40K NPUs in just 2.52 hours.

研究动机与目标

  • 解决分布式深度学习系统中针对任意网络拓扑缺乏可扩展、自动化且拥塞感知的集合通信算法合成的问题。
  • 消除对耗时且在网络故障下易失效的手动、拓扑特定算法设计的需求。
  • 通过统一框架建模网络拥塞与拓扑结构,实现最优或近似最优的集合通信性能。
  • 支持大规模系统(如 512-NPU)并在可接受的合成时间内完成,实现真实训练集群中的实际部署。
  • 提供灵活的框架,通过整数线性规划(ILP)和贪心变体支持最优性与合成速度之间的权衡。

提出的方法

  • 将网络拓扑和集合通信模式表示为时间展开网络(TEN),其中时间被离散化,链路在时间步上被复制以建模消息流动。
  • 将集合通信合成问题形式化为 TEN 上的最小费用流问题,同时捕捉拓扑结构和拥塞感知的路由。
  • 使用整数线性规划(ILP)公式(Tacos-ILP)以最小化总通信时间,实现可证明最优的解。
  • 在 TEN 上实现贪心匹配算法(Tacos-Greedy),以实现快速、可扩展的合成,获得次优但实用的性能。
  • 应用搜索空间缩减和时间聚类技术,提升 ILP 的可扩展性并减少合成时间。
  • 通过为每种集合操作定义(NPU, 块)对的先决条件和后置条件集合,支持多种集合模式(如 All-Reduce、Broadcast、Gather)。

实验结果

研究问题

  • RQ1一个完全自动化的框架能否在考虑网络拥塞的前提下,为任意网络拓扑生成拓扑感知的集合通信算法?
  • RQ2自动合成的集合通信算法在通信时间和可扩展性方面与手工编写或基线算法相比表现如何?
  • RQ3在大规模系统中,使用 ILP 与基于贪心的合成时,合成时间与通信性能之间的权衡如何?
  • RQ4该框架能否在不降低性能的前提下处理并发的多租户集合通信?
  • RQ5时间展开网络(TEN)表示在多大程度上能够实现复杂集合操作的高效且可扩展的合成?

主要发现

  • Tacos-ILP 合成的 All-Reduce 算法在目标拓扑上的性能比基线方法快 3.73 倍,显著提升了性能。
  • Tacos-Greedy 仅用 6.1 分钟就为 512-NPU 系统合成了完整的 All-Reduce 算法,展示了在大规模系统中的可扩展性。
  • 该框架成功为 6×6 网格上的复杂模式(如 All-Reduce 和多租户集合)生成了拓扑感知算法,性能优于直接方法和 TACCL 类基线。
  • Tacos-ILP 的合成时间随问题复杂度增长,Gather 比 Broadcast 长 561.3 倍,原因在于更高的块数和 NP-hard 的 ILP 求解。
  • Tacos-ILP 实现了具有可证明保证的最优解,而 Tacos-Greedy 提供了一种快速、可扩展的替代方案,适用于大规模部署。
  • TEN 的使用有效建模了拥塞和时变消息路由,使得可将交通网络优化技术应用于分布式训练。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。