mlx.core.distributed.recv

目录

mlx.core.distributed.recv#

recv(shape: Sequence[int], dtype: Dtype, src: int, *, group: Group | None = None, stream: None | Stream | Device = None) array#

从秩为 src 的进程接收形状为 shape、数据类型为 dtype 的数组。

参数:
  • shape (Tuple[int]) – 要接收的数组的形状。

  • dtype (Dtype) – 要接收的数组的数据类型。

  • src (int) – 组中源进程的秩。

  • group (Group) – 将参与接收的进程组。如果设置为 None,则使用全局组。默认值: None

  • stream (Stream, optional) – 流或设备。默认为 None,此时使用默认设备的默认流。

返回值:

src 接收到的数组。

返回类型:

array