recv_multigpu#

ray.util.collective.collective.recv_multigpu(tensor: Any, src_rank: int, src_gpu_index: int, group_name: str = 'default', n_elements: int = 0)[source]#

Receive a tensor from a remote GPU synchronously.

The function asssume each process owns >1 GPUs, and the sender process and receiver process has equal nubmer of GPUs.

Parameters:
  • tensor (Any) – The received tensor, located on a GPU.

  • src_rank (int) – The rank of the source process.

  • src_gpu_index (int) – The index of the source GPU on the src process.

  • group_name (str) – The name of the collective group.

  • n_elements (int) – if specified, receive the next n elements from the starting address of tensor.