[Paper Review] TACCL: Guiding Collective Algorithm Synthesis using Communication Sketches
TACCL is a novel tool that guides automated synthesis of efficient GPU collective communication algorithms using human-provided communication sketches, significantly reducing search space and enabling scalable, high-performance algorithm generation for multi-node GPU topologies. It outperforms NCCL by up to 6.7× and accelerates BERT and Transformer-XL training by 11%–2.3×.
Machine learning models are increasingly being trained across multiple GPUs and servers. In this setting, data is transferred between GPUs using communication collectives such as AlltoAll and AllReduce, which can become a significant bottleneck in training large models. Thus, it is important to use efficient algorithms for collective communication. We develop TACCL, a tool that enables algorithm designers to guide a synthesizer into automatically generating algorithms for a given hardware configuration and communication collective. TACCL uses a novel communication sketch abstraction to get crucial information from the designer to significantly reduce the search space and guide the synthesizer towards better algorithms. TACCL also uses a novel encoding of the problem that allows it to scale beyond single-node topologies. We use TACCL to synthesize algorithms for three collectives and two hardware topologies: DGX-2 and NDv2. We demonstrate that the algorithms synthesized by TACCL outperform the Nvidia Collective Communication Library (NCCL) by up to 6.7x. We also show that TACCL can speed up end-to-end training of Transformer-XL and BERT models by 11%--2.3x for different batch sizes.
Motivation & Objective
- Address the challenge of designing efficient collective communication algorithms for large-scale, heterogeneous GPU topologies with mixed bandwidth and latency characteristics.
- Overcome the computational infeasibility of exploring the full search space of routing and scheduling options for collective algorithms in multi-node systems.
- Reduce synthesis time and improve scalability by incorporating high-level intuition from algorithm designers via a novel abstraction: communication sketches.
- Enable automatic generation of optimized Allreduce, Allgather, and Alltoall algorithms tailored to specific hardware configurations such as DGX-2 and NDv2.
- Achieve superior performance compared to existing libraries like NCCL by combining sketch-guided search with a relaxed MILP formulation and heuristic optimization techniques.
Proposed method
- Introduce communication sketches—a high-level abstraction inspired by program sketching—that allow algorithm designers to express structural intuition about data routing and scheduling in collectives.
- Encode the collective communication synthesis problem as a mixed-integer linear program (MILP) with relaxed routing and continuous-time scheduling to improve scalability.
- Apply a three-phase synthesis pipeline: relaxed routing to explore feasible paths, heuristic ordering to prioritize high-bandwidth links, and exact scheduling with contiguity constraints to minimize idle time.
- Leverage symmetry and topology-aware encoding to reduce state space, enabling synthesis on complex topologies like 2D-tori and hierarchical clusters (e.g., DGX-2, Azure NDv2).
- Use profiled network topologies and input size information as inputs to guide the synthesizer toward hardware-aware, latency- and bandwidth-optimized algorithms.
- Implement the synthesized algorithms via a backend that maps them to low-level GPU communication primitives, ensuring compatibility with existing distributed deep learning frameworks.
Experimental results
Research questions
- RQ1Can communication sketches effectively guide automated synthesis of collective communication algorithms while reducing the search space in large-scale GPU topologies?
- RQ2How can the synthesis of efficient collective algorithms be scaled beyond single-node systems and heterogeneous network topologies with varying link speeds?
- RQ3To what extent can a human-in-the-loop approach using intuitive sketches outperform purely automated or heuristic-based methods in generating high-performance communication algorithms?
- RQ4Can the proposed MILP formulation with relaxation and heuristic optimization achieve near-optimal performance while remaining tractable for large-scale GPU clusters?
- RQ5How do the synthesized algorithms compare in practice to state-of-the-art libraries like NCCL across diverse workloads and hardware configurations?
Key findings
- TACCL synthesized an Allgather algorithm for 8 Azure NDv2 nodes (64 GPUs) in under 5 minutes, achieving up to 1.7× higher algorithm bandwidth than NCCL across various data sizes.
- For 8 DGX-2 nodes (128 GPUs), TACCL generated a valid Allgather algorithm in approximately 11 hours, demonstrating scalability to large-scale multi-node systems.
- The synthesized algorithms outperformed NCCL by up to 6.7× in end-to-end communication performance on the tested collectives and topologies.
- End-to-end training of BERT and Transformer-XL models was accelerated by 11% to 2.3× depending on batch size, due to reduced communication bottlenecks.
- TACCL successfully generated efficient algorithms for non-hierarchical topologies such as a 2D $6\times8$ torus by exploiting symmetry in communication sketches.
- The use of communication sketches enabled exploration of multiple algorithm variants optimized for different input size ranges, reflecting the design intuition of developers.
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.