Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Enable NCCL_ASYNC_ERROR_HANDLING in torchelastic (#133)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #133

NCCL Async Error Handling is a new mechanism implemented in ProcessGroupNCCL to provide reliability for DDP training runs using NCCL. See here for a more detailed background and implementation details: pytorch/pytorch#46874.

At a high-level, this system was designed to ensure desynchronization, high GPU utilization, and NCCL errors don't cause indefinite hanging in distributed training runs. This system catches these errors without any perf impact and brings down the training process, and torchelastic can detect this and restart training from the previous checkpoint. The time after which stuck collectives are detected can be tuned using the `timeout` argument to `init_process_group`.

Reviewed By: kiukchung, jiayisuse

Differential Revision: D23610237

fbshipit-source-id: 7a2a496c0b781b68d76e138bd66ca0b7c04f17d0
  • Loading branch information
osalpekar authored and facebook-github-bot committed Dec 9, 2020
1 parent 8789f5e commit 766cab8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions torchelastic/agent/server/local_elastic_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def _start_workers(self, worker_group: WorkerGroup) -> Dict[int, Any]:
"TORCHELASTIC_RESTART_COUNT": str(restart_count),
"TORCHELASTIC_MAX_RESTARTS": str(spec.max_restarts),
"TORCHELASTIC_RUN_ID": spec.rdzv_handler.get_run_id(),
"NCCL_ASYNC_ERROR_HANDLING": str(1),
}
if "OMP_NUM_THREADS" in os.environ:
worker_env["OMP_NUM_THREADS"] = os.environ["OMP_NUM_THREADS"]
Expand Down

0 comments on commit 766cab8

Please sign in to comment.