(torch_dist)
| 137 | |
| 138 | |
| 139 | def _dist_init(torch_dist) -> None: |
| 140 | if "RANK" not in os.environ: |
| 141 | warnings.warn("RANK not set. Skipping distributed initialization.") |
| 142 | return |
| 143 | torch_dist.init_process_group(backend="nccl", init_method="env://") |
| 144 | |
| 145 | |
| 146 | def _dist_size() -> int: |