mindspore.communication

Collective communication interface.

Note that the APIs in the following list need to preset communication environment variables.

For Ascend/GPU/CPU devices, it is recommended to use the msrun startup method without any third-party or configuration file dependencies. Please see the msrun startup for more details.

mindspore.communication.GlobalComm

World communication information.

mindspore.communication.init

Initialize distributed backends required by communication services, e.g. "hccl" / "nccl" / "mccl".

mindspore.communication.release

Release distributed resource.

mindspore.communication.create_group

Create a user collective communication group.

mindspore.communication.destroy_group

Destroy the user collective communication group.

mindspore.communication.get_comm_name

Get the communicator name of the specified collective communication group.

mindspore.communication.get_group_size

Get the rank size of the specified collective communication group.

mindspore.communication.get_group_rank_from_world_rank

Get the rank ID in the specified user communication group corresponding to the rank ID in the world communication group.

mindspore.communication.get_local_rank

Gets local rank ID for current device in specified collective communication group.

mindspore.communication.get_local_rank_size

Gets local rank size of the specified collective communication group.

mindspore.communication.get_process_group_ranks

Gets the ranks of the specific group and returns the process ranks in the communication group as a list.

mindspore.communication.get_rank

Get the rank ID for the current device in the specified collective communication group.

mindspore.communication.get_world_rank_from_group_rank

Get the rank ID in the world communication group corresponding to the rank ID in the specified user communication group.

mindspore.communication.HCCL_WORLD_COMM_GROUP

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

mindspore.communication.NCCL_WORLD_COMM_GROUP

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

mindspore.communication.MCCL_WORLD_COMM_GROUP

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

mindspore.communication.comm_func

Collection communication functional interface

mindspore.communication.comm_func.all_gather_into_tensor

mindspore.communication.comm_func.comm_func.comm_func.all_gather_into_tensor is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.all_reduce

mindspore.communication.comm_func.all_reduce is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.all_to_all_single_with_output_shape

mindspore.communication.comm_func.all_to_all_single_with_output_shape is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.all_to_all_v_c

mindspore.communication.comm_func.all_to_all_v_c is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.all_to_all_with_output_shape

mindspore.communication.comm_func.all_to_all_with_output_shape is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.barrier

mindspore.communication.comm_func.barrier is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.batch_isend_irecv

mindspore.communication.comm_func.batch_isend_irecv is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.broadcast

mindspore.communication.comm_func.broadcast is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.gather_into_tensor

mindspore.communication.comm_func.gather_into_tensor is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.irecv

mindspore.communication.comm_func.irecv is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.isend

mindspore.communication.comm_func.isend is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.recv

mindspore.communication.comm_func.recv is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.send

mindspore.communication.comm_func.send is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.P2POp

mindspore.communication.comm_func.P2POp is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.reduce

mindspore.communication.comm_func.reduce is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.reduce_scatter_tensor

mindspore.communication.comm_func.reduce_scatter_tensor is deprecated from version 2.9.0 and will be removed in a future version.

mindspore.communication.comm_func.scatter_tensor

mindspore.communication.comm_func.scatter_tensor is deprecated from version 2.9.0 and will be removed in a future version.