Commit 642a9d2
Warn when zero.Init silently falls back to a single rank (#8084)
When a multi-process launcher sets WORLD_SIZE>1 but the distributed
process group is not initialized before zero.Init runs (e.g.
from_pretrained before deepspeed.init_distributed()), the resolved group
collapses to a single rank. zero.Init then materializes every parameter
whole on every rank instead of partitioning, so each rank loads the full
model and OOMs with no diagnostic. Detect this case and emit an
actionable warning pointing at the missing init_distributed() call.
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: FNU AKSHANSH <105249360+akshansh47@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 3a47d1d commit 642a9d2
2 files changed
Lines changed: 74 additions & 0 deletions
File tree
- deepspeed/runtime/zero
- tests/unit/runtime/zero
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
883 | 912 | | |
884 | 913 | | |
885 | 914 | | |
| |||
1035 | 1064 | | |
1036 | 1065 | | |
1037 | 1066 | | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
1038 | 1071 | | |
1039 | 1072 | | |
1040 | 1073 | | |
| |||
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
0 commit comments