Repository navigation
Commit 9022cb2
Fail loudly on a None group; drop the last Megatron import from the log-prob path
- The torch kernel took dist.get_rank(None), i.e. the world group, where
callers elsewhere mean no tensor parallelism by None: with 8 ranks and no
TP every rank but 0 masked its targets and the SUM mixed data-parallel
ranks. It now takes group.rank(), as Megatron's kernel did, so None or a
non-member group raises. Every caller passes a group.
- The tensor-parallel true-on-policy gather imported Megatron's
dist_all_gather_func, which is torch.distributed.all_gather_into_tensor;
call that directly, so a wheel install can use it.
- --debug-unified-grad-fused-logprob's help no longer mentions a fused kernel.
Found by an adversarial review of this PR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 46c51b2 commit 9022cb2
3 files changed
Lines changed: 7 additions & 11 deletions
File tree
- miles
- backends/training_utils/loss/hub
- utils/args/configs
- tests/fast/backends/training_utils/loss_hub
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
326 | | - | |
| 326 | + | |
| 327 | + | |
327 | 328 | | |
328 | 329 | | |
329 | 330 | | |
| |||
347 | 348 | | |
348 | 349 | | |
349 | 350 | | |
350 | | - | |
| 351 | + | |
351 | 352 | | |
352 | 353 | | |
353 | 354 | | |
| |||
453 | 454 | | |
454 | 455 | | |
455 | 456 | | |
456 | | - | |
457 | | - | |
458 | 457 | | |
459 | 458 | | |
460 | 459 | | |
461 | | - | |
| 460 | + | |
462 | 461 | | |
463 | 462 | | |
464 | 463 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | | - | |
| 268 | + | |
| 269 | + | |
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
78 | | - | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
| |||
0 commit comments