mindscience.distributed.mappings.reduce_from_all

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

Performs an all-reduce operation across all ranks in the group.

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

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

Returns

Reduced tensor from all ranks.