NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

TACOS: Topology-Aware Collective Algorithm Synthesizer for Distributed Machine Learning

William Won, Midhilesh Elavazhagan, Sudarshan Srinivasan, Swati Gupta, Tushar Krishna

TACOS: Smarter Communication for AI Supercomputers

TL;DR

This paper introduces TACOS, an automated system that designs highly efficient communication algorithms for distributed machine learning. By intelligently considering the specific network layout of AI supercomputers, TACOS significantly speeds up training and utilizes network resources much better than existing methods, even for massive, complex systems.

What Problem Does This Paper Address?

Modern AI, especially large language models (LLMs), relies on massive clusters of specialized processors (NPUs like GPUs or TPUs) working together. The biggest bottleneck in these systems isn't just the processing power, but how quickly these NPUs can communicate with each other. Existing software libraries offer a limited set of pre-designed communication patterns (called collective algorithms) that are often a poor fit for the diverse and complex network architectures found in today's AI hardware. These architectures can be "heterogeneous" (different types of connections) and "asymmetric" (connections aren't balanced everywhere). Manually creating optimized communication strategies for every possible network and task combination is incredibly time-consuming and complex. TACOS aims to solve this by automatically generating the best communication algorithm for a given network and task, eliminating the need for manual tuning and improving overall performance.

Methods

TACOS tackles this challenge by framing collective algorithm synthesis as a "link-chunk matching" problem within a "Time-Expanded Network" (TEN).

  • Time-Expanded Network (TEN): Imagine the network not just as a static map, but as a dynamic graph that evolves over time. A TEN represents the network's topology across multiple time steps, showing how data chunks move from one NPU to another over time. This allows TACOS to consider both the physical connections and the timing of data transfers.
  • Link-Chunk Matching: For each time step in the TEN, TACOS uses a "Network Utilization Maximizing Matching" algorithm. This algorithm tries to assign data chunks to specific network links in a way that maximizes the use of each link and avoids congestion. It does this by iteratively finding potential sources for needed data chunks and "matching" them to available links.
  • Iterative Synthesis: TACOS builds the collective algorithm step-by-step. It starts with the initial state (precondition) and iteratively expands the TEN, performing link-chunk matching at each step until the final state (postcondition) is met, meaning all data has been successfully communicated.

This approach is novel because it integrates temporal and spatial network information and focuses on maximizing utilization at each step, rather than treating it as a global optimization problem.

Datasets

Not discussed in the paper. The paper focuses on synthesizing algorithms for given network topologies and collective patterns, rather than training models on specific datasets.

Key Insights and Ideas

  • The Network Matters (A Lot): The paper strongly demonstrates that a "one-size-fits-all" approach to collective communication is inefficient. The performance gains from matching communication patterns to network topology are substantial.
  • Time is a Dimension: By using a Time-Expanded Network, TACOS can capture the dynamic nature of communication, which is crucial for optimizing performance in complex, multi-hop networks.
  • Congestion is the Enemy: TACOS's core innovation is its ability to actively avoid network congestion during synthesis. This leads to more balanced link utilization and significantly better performance.
  • Automation is Key: The manual effort required to optimize communication for modern AI hardware is unsustainable. TACOS's automated synthesis offers a scalable solution.
  • Scalability is Achievable: Unlike previous NP-hard approaches, TACOS scales polynomially, allowing it to handle massive AI clusters with tens of thousands of NPUs.

Key Results

  • Significant Speedups: TACOS achieved up to a 4.27x performance improvement over state-of-the-art synthesizers and an average speedup of 2.56x over baseline algorithms.
  • High Efficiency: TACOS consistently achieved over 90% efficiency compared to the theoretical ideal, demonstrating its ability to extract near-optimal performance.
  • Exceptional Scalability: TACOS synthesized an algorithm for a 40K NPU topology in just 2.52 hours, a feat impossible for previous NP-hard methods. Synthesis time scales quadratically with the number of NPUs (O(n²)).
  • Handles Heterogeneity and Asymmetry: TACOS effectively synthesized algorithms for complex, asymmetric, and heterogeneous networks, outperforming existing methods that struggle with such configurations.
  • End-to-End Performance Gains: In real-world ML workloads (GNMT, ResNet-50, Turing-NLG), TACOS led to 1.58x faster end-to-end training compared to the baseline Ring algorithm.

Limitations and Future Work

  • Current Focus on All-Reduce: While TACOS can synthesize other collectives by composing basic patterns (e.g., All-Reduce from Reduce-Scatter and All-Gather), its primary focus and evaluation are on All-Reduce. Future work could explore direct synthesis of more complex collectives.
  • NPU/Memory Performance Not Explicitly Modeled: The current model primarily focuses on network communication. While link costs can be adjusted to indirectly account for these, explicitly modeling NPU and memory performance during synthesis could lead to further optimizations.
  • Switch Network Unwinding: The paper proposes a method for unwinding switch networks into point-to-point connections but notes that this scheme doesn't cover all configurations and dynamic switch connectivity. Developing a more flexible switch unwinding methodology is suggested for future work.
  • Randomized Algorithm: The artifact uses a randomized algorithm, meaning results may vary slightly between runs. However, the paper assures that the trend of the target metric remains consistent.

Summary updated

BibTeX
@inproceedings{won2024tacos,
  author = {William Won and Midhilesh Elavazhagan and Sudarshan Srinivasan and Swati Gupta and Tushar Krishna},
  title = {{TACOS: Topology-Aware Collective Algorithm Synthesizer for Distributed Machine Learning}},
  booktitle = {MICRO},
  year = {2024},
  url = {https://openreview.net/forum?id=I61nY1FYRN},
}
Figure