mlx.core.distributed.recv_like

目录

mlx.core.distributed.recv_like#

recv_like(x: array, src: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#

Recv an array with shape and type like x from process with rank src.

It is equivalent to calling mx.distributed.recv(x.shape, x.dtype, src).

参数:
  • x (array) -- An array defining the shape and dtype of the array we are receiving.

  • src (int) -- Rank of the source process in the group.

  • group (Group) -- The group of processes that will participate in the recv. If set to None the global group is used. Default: None.

  • stream (Stream, optional) -- Stream or device. Defaults to None in which case the default stream of the default device is used.

返回:

The array that was received from src.

返回类型:

array