Commit d9bb6c4
fix: add divisibility guard and clarify WORLD_SIZE fallback
Address review feedback:
- Add ValueError if world_size is not divisible by dp_shard_size * cp_size
- Comment that torch.cuda.device_count() is per-node, not world_size
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Ye Yu <yeyu@nvidia.com>1 parent 83226f4 commit d9bb6c4
1 file changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
219 | 227 | | |
220 | 228 | | |
221 | 229 | | |
| |||
0 commit comments