Introduction
As Large Language Models (LLMs) continue to scale, they increasingly outpace the memory and compute capabilities of individual GPUs. Modern AI training and inference now rely on massive clusters where GPUs must constantly exchange data. The "holy grail" of distributed performance is overlapping: executing computation (math) and communication (data transfer) simultaneously.
Currently, achieving fine-grained overlap is a significant engineering hurdle. Standard frameworks like PyTorch and NCCL often treat these as sequential steps, leading to "bubbles" where the GPU sits idle. While low-level CUDA or C++ can mitigate this, it creates a productivity gap for AI researchers. Triton-distributed addresses this by extending the Triton compiler to support high-performance, distributed kernel programming directly in Python.
Methods and Architecture
Triton-distributed treats distributed communication as a first-class citizen within the Triton compilation pipeline. It adopts a "Multiple Programs Multiple Data" (MPMD) programming model where each GPU rank runs its own logic while coordinating through shared "Symmetric Memory."
The system integrates several key technical components:
- Integrated Primitives: Support for OpenSHMEM (one-sided communication like
putandget) and custom synchronization primitives (wait,notify). - Compiler-Assisted Overlapping: Instead of manual stream management, programmers use signals to define data dependencies, allowing the compiler to handle asynchronous task scheduling.
- Tile Swizzling: The system reorders the sequence of data tile processing to maximize overlap, ensuring the GPU works on local data while remote data is in transit.
- Spatial Resource Partitioning: The compiler can split a GPU's Streaming Multiprocessors (SMs), dedicating specific hardware resources to computation and others to communication in parallel.
Evaluation and Workloads
The authors evaluated Triton-distributed using critical building blocks of modern AI across NVIDIA H800 and AMD MI308X clusters (8 to 64 GPUs). The workloads included:
- Collective Operations: AllGather + GEMM, GEMM + ReduceScatter, and AllToAll.
- Model-Specific Kernels: Mixture-of-Experts (MoE) group GEMMs and FlashDecode for long-context inference.
Key Results
Triton-distributed demonstrates that Python productivity can achieve C++ levels of performance. By using one-sided communication, the system provides finer control over execution compared to traditional collective communication (like NCCL), which requires global synchronization.
Key performance highlights include:
- NVIDIA Performance: An average speedup of 1.42x for intra-node AllGather GEMM and up to 44.97x for specific MoE kernels compared to PyTorch+NCCL baselines.
- Latency Reduction: Communication time for inference-heavy tasks was reduced from ~25µs to 13.5µs using custom low-latency protocols.
- Cross-Platform Parity: The system showed strong results on AMD hardware (MI308X), proving the effectiveness of the Triton abstraction in hiding hardware-specific complexities.
- Scaling: FlashDecode tests showed excellent "strong scaling," maintaining high memory bandwidth as the GPU count increased to 32.
Limitations and Future Work
While the current implementation shows significant promise, limitations remain. The system currently uses the IBRC protocol; moving to IBGDA (GPU Direct Async) could further improve performance but is limited by current bitcode library support. Additionally, while AllGather MoE scales linearly, ReduceScatter MoE scaling requires further kernel optimization. Future work will focus on migrating these methods to other emerging AI accelerators (NPUs).
Summary updated