In collective communication, the number of communication steps of the Ring algorithm is
, where N indicates the number of ranks involved in collective communication. As the network scale increases, the communication overhead increases significantly. Although the RHD algorithm reduces the number of communication steps to
, data merging is required when the number of ranks is not a power of 2. As a result, the communication data size increases. The Nonuniform Bruck (NB) algorithm uses a multi-ring structure with dynamically adjusted steps to ensure that the number of communication steps remains
regardless of the number of ranks. In addition, this algorithm can avoid extra communication data growth.
The following figure shows the communication process of the NB algorithm when the rank size is a power of 2 (for example, 4).
The following figure shows the communication process of the NB algorithm when the rank size is not a power of 2 (for example, 5).
.
, with
data segments sent per step.
.The NB algorithm is also applicable to the star and fat-tree topologies, with the time complexity
.
|
Operation |
Time Required |
|---|---|
|
ReduceScatter |
|
|
AllGather |
|
|
AllReduce |
The implementation uses ReduceScatter+AllGather, and the time required is as follows.
|
|
Scatter |
|
|
Broadcast |
The implementation uses Scatter+AllGather, and the time required is as follows.
|