Commit 7c7daaf
Handling sequence embedding table-wise sharding onto subset of world size
Summary:
While doing table wise sharding, we may have input cases where we don't have enough tables to shard them across all the ranks. In those cases, some embedding modules may not have any embeddings placed onto a few ranks. For table-wise sequence sharding using usharding approach it fails correctly as we modified the split boundary for usharding.
Handling empty ranks for those emedding modules where we can just skip those ranks while collecting the results from all the shards
Differential Revision: D80360860
fbshipit-source-id: 50fd076b194e3426f1ecdcb6e0e8cc5e9ddab43c1 parent 51be4ea commit 7c7daaf
File tree
3 files changed
+56
-30
lines changed- torchrec/distributed
- sharding
3 files changed
+56
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1240 | 1240 | | |
1241 | 1241 | | |
1242 | 1242 | | |
1243 | | - | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
1244 | 1246 | | |
1245 | 1247 | | |
1246 | 1248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
308 | 309 | | |
309 | | - | |
310 | | - | |
311 | | - | |
312 | | - | |
313 | | - | |
314 | | - | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
331 | 319 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
338 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
339 | 351 | | |
340 | 352 | | |
341 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
178 | 179 | | |
179 | 180 | | |
180 | | - | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
| 192 | + | |
184 | 193 | | |
185 | 194 | | |
186 | 195 | | |
| |||
216 | 225 | | |
217 | 226 | | |
218 | 227 | | |
| 228 | + | |
| 229 | + | |
219 | 230 | | |
220 | 231 | | |
221 | 232 | | |
| |||
269 | 280 | | |
270 | 281 | | |
271 | 282 | | |
| 283 | + | |
272 | 284 | | |
0 commit comments