(grid)
| 29 | #initializes adjacent process groups |
| 30 | #run this only after deepspeed.init_distributed() has been called |
| 31 | def init_process_groups(grid): |
| 32 | global _groups, _grid |
| 33 | _grid = grid |
| 34 | |
| 35 | assert _grid.pipe_parallel_size > 1, "There is no pipeline parallelism" |
| 36 | |
| 37 | if not can_send_recv(): |
| 38 | _groups = [dist.new_group(ranks=group) for group in _grid.p2p_groups] |
| 39 | |
| 40 | |
| 41 | def _is_valid_send_recv(src_stage, dest_stage): |
nothing calls this directly
no test coverage detected