Create a new communication group.

The ranks can be set to None to create an empty group for disabling the distributed utilities.

If backend is None, select as: NCCL > MPI.

Note that this function should be called from all processes, even if they are not going to be included in this group.

  • ranks (Sequence[int], optional) – The rank of processes to be included.
  • backend ({'AUTO', 'MPI', 'NCCL'}, optional) – The optional backend.
  • verbose (bool, optional, default=False) – True to log the group info.