[Paper Review] TACOS
Tacos is a fully automated, topology-aware collective communication algorithm synthesizer that uses time-expanded networks (TENs) to generate optimal or near-optimal collective algorithms for arbitrary network topologies. It achieves 3.73× faster All-Reduce performance than baselines and synthesizes algorithms for 512-NPU systems in 6.1 minutes using a greedy matching approach.
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.
Motivation & Objective
- To address the lack of scalable, automated, and congestion-aware collective communication algorithm synthesis for arbitrary network topologies in distributed deep learning systems.
- To eliminate the need for manual, topology-specific algorithm design, which is time-consuming and fragile under network failures.
- To enable optimal or near-optimal collective communication performance by modeling network congestion and topology structure in a unified framework.
- To support large-scale systems (e.g., 512-NPU) with tractable synthesis times, enabling practical deployment in real-world training clusters.
- To provide a flexible framework that supports trade-offs between optimality and synthesis speed via ILP and greedy variants.
Proposed method
- Representing the network topology and collective communication patterns as a time-expanded network (TEN), where time is discretized and links are duplicated across time steps to model message flow.
- Formulating the collective communication synthesis problem as a minimum-cost flow problem over the TEN, capturing both topology and congestion-aware routing.
- Using an Integer Linear Programming (ILP) formulation (Tacos-ILP) to achieve provably optimal solutions by minimizing total communication time.
- Implementing a greedy-matching algorithm (Tacos-Greedy) over the TEN to enable fast, scalable synthesis with sub-optimal but practical performance.
- Applying search space reduction and time clustering techniques to improve ILP scalability and reduce synthesis time.
- Supporting multiple collective patterns (e.g., All-Reduce, Broadcast, Gather) by defining precondition and postcondition sets of (NPU, chunk) pairs for each collective.
Experimental results
Research questions
- RQ1Can a fully automated framework generate topology-aware collective communication algorithms for arbitrary network topologies while accounting for network congestion?
- RQ2How does the performance of automatically synthesized collective algorithms compare to hand-crafted or baseline algorithms in terms of communication time and scalability?
- RQ3What is the trade-off between synthesis time and communication performance when using ILP versus greedy-based synthesis in large-scale systems?
- RQ4Can the framework handle concurrent, multi-tenant collective communications without performance degradation?
- RQ5To what extent can the time-expanded network (TEN) representation enable efficient and scalable synthesis of complex collective operations?
Key findings
- Tacos-ILP synthesized All-Reduce algorithms that were 3.73× faster than baseline methods on target topologies, demonstrating significant performance gains.
- Tacos-Greedy synthesized a complete All-Reduce algorithm for a 512-NPU system in just 6.1 minutes, showing scalability to large-scale systems.
- The framework successfully generated topology-aware algorithms for complex patterns like All-Reduce and multi-tenant collectives on a 6×6 mesh, outperforming direct and TACCL-like baselines.
- Synthesis time for Tacos-ILP scaled with problem complexity, with Gather taking 561.3× longer than Broadcast due to higher chunk count and NP-hard ILP solving.
- Tacos-ILP achieved optimal solutions with provable guarantees, while Tacos-Greedy offered a fast, scalable alternative suitable for large-scale deployments.
- The use of TENs enabled effective modeling of congestion and time-dependent message routing, making it feasible to apply transportation network optimization techniques to distributed training.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.