YOLOX icon indicating copy to clipboard operation
YOLOX copied to clipboard

Fix issue 1721 by always initializing process group.

Open luowyang opened this issue 1 year ago • 1 comments

This pull request fixes issue #1721, where single GPU training/inference may error if the worker uses torch.dist. In summary, it makes sure the default process group is always initialized as long as world_size > 0, otherwise it raises a ValueError to indicate illegal argument(s). The existing code should not be affected, as stated in issue #1721.

Rationale: Always initializing the process group is preferred, because when launch is called, the user most likely requests distributed semantics. This fix makes the user code consistent by allowing the users to make torch.dist calls even if there is only one GPU.

luowyang avatar Sep 26 '23 08:09 luowyang

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 26 '23 08:09 CLAassistant