-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error for PT backend when pytorch.distributed is not available (#…
…3652) By default, `pytorch.distributed` is not enabled on macOS by default (see [`pytorch.distributed.is_available()`](https://pytorch.org/docs/stable/distributed.html#torch.distributed.is_available)). In this case, * Testing `pytorch.distributed.is_initialized()` will fail. To fix this issue, `pytorch.distributed.is_available()` needs to be tested first. * Distributed dataloader is not available. This pull request allows passing the unittests while `distributed` is disabled. `USE_DISTRIBUTED=1` to manually enable distributed training / dataloading on macOS. Set it to `0` to disable it on other platforms. Maybe this behavior needs to be documented somewhere? --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
ea98506
commit e71085c
Showing
4 changed files
with
49 additions
and
16 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
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
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
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