Skip to content

Datatypes and Operators ​

Reductions take +, *, max, min, &, |, xor, or one of the operators below. Unsupported (type, operator) pairs throw an ArgumentError.

UCC.avg Constant
julia
UCC.avg

Perform an average operation, i.e. a sum across all ranks, divided by the number of ranks.

source
UCC.land Constant
julia
UCC.land, UCC.lor, UCC.lxor

Logical and, or and exclusive-or reductions (nonzero is true).

source
UCC.GenericDatatype Type
julia
UCC.GenericDatatype(T; op=nothing) :: GenericDatatype

Register the isbits type T with UCC as a contiguous user-defined datatype, so that arrays of T can be used in collectives. If op is given (a binary function op(a::T, b::T)::T), the datatype can also be used in reductions (Allreduce!, Reduce!, ReduceScatter!, …), in which case the op argument of those collectives is ignored. Reductions run on the host, so only host buffers can be reduced.

Call UCC.destroy to unregister the type.

External links

  • ucc_dt_create_generic, ucc_dt_destroy
source