megengine.distributed.init_process_group¶
- init_process_group(master_ip, port, world_size, rank, device, backend='auto', device_type='xpu')[source]¶
Initialize the distributed process group and specify the device used in the current process
- Parameters
master_ip (
str
) – ip address of the master node.port (
int
) – port available for all processes to communicate.world_size (
int
) – total number of processes participating in the job.rank (
int
) – rank of the current process.device (
int
) – the GPU device id to bind this process to.backend (
Optional
[str
]) – communicator backend, currently support ‘nccl’ and ‘rccl’.
- Return type