Distributed Training Integration
Background
Distributed training allows accelerators to scale workloads across multiple devices and nodes by coordinating collective communication (e.g., allreduce, broadcast, allgather) through a ProcessGroup backend. PyTorch ships built-in backends such as NCCL for CUDA and Gloo for CPU, but the framework exposes a registration mechanism that allows out-of-tree accelerator vendors to plug in their own collective communication library without modifying upstream code.
The integration surface can be broken down into three layers:
C++ Backend implementation – A subclass of
c10d::Backendthat implements the collective, point-to-point, and synchronization operations.