MPIProcessGroup#
-
class nvmath.
distributed. MPIProcessGroup(mpi_comm)[source]# ProcessGroup implemented on mpi4py.
- Parameters:
mpi_comm – mpi4py communicator.
Attributes
- nranks#
- rank#
Methods
- allreduce_buffer(
- array: ndarray,
- *,
- op: ReductionOp,
Allreduce an array.
- Parameters:
array – Input and output of the collective. The function operates in-place.
op – One of the values from
ReduceOpenum. Specifies an operation for element-wise reductions.
- allreduce_object(
- obj: T,
- *,
- op: Callable[[T, T], T],
Reduces all Python objects contributed by members of the group. The result is a single reduced object which is returned on every process.
- Parameters:
obj – object contributed by this process.
op – A Python function that takes two objects and returns a single (reduced) object.