-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: asyncio-friendly nccl operations (#52)
NCCL operation in PyTorch's distributed package needs to set up NCCL communicator so that ranks can talk to one another. To set up the communicator, c10d key-value store needs to be consulted. This is a blocking call, which blocks asyncio's loop. This prevents the loop from scheduling different coroutines. The issue is mitigated by using run_in_executor(). Note that this doesn't seem to be a permanent fix. Depending on timing, blocking appears from time to time and leads to an exception whose example may looks like "torch.distributed.DistBackendError: [1] is setting up NCCL communicator and retrieving ncclUniqueId from [0] via c10d key-value store by key '0:1', but store->get('0:1') got error: Socket Timeout".
- Loading branch information
Showing
1 changed file
with
92 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters