Commit 8751cff
Add input argument
Summary:
By leveraging the fixed API `distributed.new_subrgoups(group=)` introduced in pytorch/pytorch#152765, this diff adds an input argument `dist_group` for enabling `DDPDistributor` to operate under `dist_group` instead of always default to the whole world of ranks.
This new input argument will also be used to simplfiy `HSDPDistributor` and `HybridShardDistributor` by passing in each replicate group into this new `DDPDistributor`.
Reviewed By: wz337
Differential Revision: D74971276
fbshipit-source-id: 0f0a62abc354806859fe64a886f89457fed5607edist_group into DDPDistributor
1 parent af62244 commit 8751cff
File tree
2 files changed
+31
-13
lines changed- distributed_shampoo/distributor
- gpu_tests
2 files changed
+31
-13
lines changedLines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
833 | 834 | | |
834 | 835 | | |
835 | 836 | | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
836 | 847 | | |
837 | 848 | | |
838 | 849 | | |
| |||
Lines changed: 20 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
| 136 | + | |
134 | 137 | | |
135 | 138 | | |
136 | 139 | | |
137 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
138 | 145 | | |
139 | 146 | | |
140 | 147 | | |
| |||
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
148 | | - | |
| 155 | + | |
149 | 156 | | |
150 | 157 | | |
151 | 158 | | |
| |||
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
164 | | - | |
165 | | - | |
| 171 | + | |
| 172 | + | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
| |||
494 | 501 | | |
495 | 502 | | |
496 | 503 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
503 | 509 | | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
504 | 513 | | |
505 | 514 | | |
506 | 515 | | |
507 | 516 | | |
508 | | - | |
509 | | - | |
510 | | - | |
| 517 | + | |
511 | 518 | | |
512 | 519 | | |
0 commit comments