Skip to content

Commit e898b28

Browse files
committed
Fix number of rounds in Segmented Ring
1 parent 8e9cfa2 commit e898b28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

notes/cost-model/allreduce-ring-segmented.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ const int phase_count = block_count / num_phases;
100100
*
101101
* phase_count ADDs
102102
*
103-
* P rounds
103+
* P - 1 rounds
104104
*
105105
* o + L + (block_count * 8 - 1) * G + g
106106
*/
@@ -305,7 +305,7 @@ int allreduce_ring_segmented(const void *sbuf, void *rbuf, int count) {
305305
/* Distribution loop - variation of ring allgather */
306306
send_to = (rank + 1) % size;
307307
recv_from = (rank + size - 1) % size;
308-
// #### P rounds
308+
// #### P -1 rounds
309309
for (k = 0; k < size - 1; k++) {
310310
const int recv_data_from = (rank + size - k) % size;
311311
const int send_data_from = (rank + 1 + size - k) % size;

0 commit comments

Comments
 (0)