Commit 133f33b
committed
Fix 3 issues from code review: variable scoping, squeeze edge case, Gloo P2P
1. Initialize _use_cached=False at top of _generate_graph() to prevent
potential UnboundLocalError if code is refactored (escn_md.py).
2. Replace squeeze() with reshape(-1) in _balance_assignments to handle
the edge case where src_atoms has exactly 1 element (squeeze() would
produce a 0-d tensor that cannot be sliced) (graph_parallel.py).
3. Skip zero-length P2P ops in Gloo fallback for _safe_all_to_all and
start_all_to_all_collect to avoid potential hangs on some PyTorch
versions (graph_parallel.py).1 parent c1d92ee commit 133f33b
2 files changed
Lines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
| 626 | + | |
626 | 627 | | |
627 | 628 | | |
628 | 629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
49 | 50 | | |
50 | | - | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
255 | | - | |
| 258 | + | |
256 | 259 | | |
257 | 260 | | |
258 | 261 | | |
| |||
782 | 785 | | |
783 | 786 | | |
784 | 787 | | |
785 | | - | |
786 | | - | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
787 | 792 | | |
788 | 793 | | |
789 | 794 | | |
| |||
0 commit comments