mindscience.distributed.mappings.copy_to_all

mindscience.distributed.mappings.copy_to_all(x, group)[source]

Forwards the input to all ranks in the specified group.

Parameters
  • x (Tensor) – Input tensor to be copied to all ranks.

  • group (Union[CommGroup, CommGroupBase]) – Communication group for the operation.

Returns

The input tensor (copied to all ranks).