Repository navigation
Commit a53d9a6
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 5eda13c commit a53d9a6
3 files changed
Lines changed: 7 additions & 11 deletions
File tree
- miles
- backends/training_utils/loss/hub
- utils
- 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 | | |
| |||
439 | 440 | | |
440 | 441 | | |
441 | 442 | | |
442 | | - | |
443 | | - | |
444 | 443 | | |
445 | 444 | | |
446 | 445 | | |
447 | | - | |
| 446 | + | |
448 | 447 | | |
449 | 448 | | |
450 | 449 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2456 | 2456 | | |
2457 | 2457 | | |
2458 | 2458 | | |
2459 | | - | |
2460 | | - | |
2461 | | - | |
| 2459 | + | |
| 2460 | + | |
2462 | 2461 | | |
2463 | 2462 | | |
2464 | 2463 | | |
| |||
| 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