ReduceScatter¶
-
event
reduce_scatter
(const void *send_buf, void *recv_buf, size_t recv_count, datatype dtype, reduction rtype, const communicator &comm, const stream &stream, const reduce_scatter_attr &attr = default_reduce_scatter_attr, const vector_class<event> &deps = {}) Reduce-scatter is a collective communication operation that performs the global reduction operation on values from all ranks of the communicator and scatters the result in blocks back to all ranks.
- Return
ccl::event an object to track the progress of the operation
- Parameters
send_buf
: the buffer withcomm_size
*count
elements ofdtype
that stores local data to be reducedrecv_buf
: [out] the buffer to store result block containingrecv_count
elements of typedtype
recv_count
: the number of elements of typedtype
in receive blockdtype
: the datatype of elements insend_buf
andrecv_buf
rtype
: the type of the reduction operation to be appliedcomm
: the communicator for which the operation will be performedstream
: a stream associated with the operationattr
: optional attributes to customize operationdeps
: an optional vector of the events that the operation should depend on
-
event
reduce_scatter
(const void *send_buf, void *recv_buf, size_t recv_count, datatype dtype, reduction rtype, const communicator &comm, const reduce_scatter_attr &attr = default_reduce_scatter_attr, const vector_class<event> &deps = {}) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
template<class
BufferType
, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type>
eventreduce_scatter
(const BufferType *send_buf, BufferType *recv_buf, size_t recv_count, reduction rtype, const communicator &comm, const stream &stream, const reduce_scatter_attr &attr = default_reduce_scatter_attr, const vector_class<event> &deps = {}) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
template<class
BufferType
, class = typename std::enable_if<is_native_type_supported<BufferType>(), event>::type>
eventreduce_scatter
(const BufferType *send_buf, BufferType *recv_buf, size_t recv_count, reduction rtype, const communicator &comm, const reduce_scatter_attr &attr = default_reduce_scatter_attr, const vector_class<event> &deps = {}) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
template<class
BufferObjectType
, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type>
eventreduce_scatter
(const BufferObjectType &send_buf, BufferObjectType &recv_buf, size_t recv_count, reduction rtype, const communicator &comm, const stream &stream, const reduce_scatter_attr &attr = default_reduce_scatter_attr, const vector_class<event> &deps = {}) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
-
template<class
BufferObjectType
, class = typename std::enable_if<is_class_supported<BufferObjectType>(), event>::type>
eventreduce_scatter
(const BufferObjectType &send_buf, BufferObjectType &recv_buf, size_t recv_count, reduction rtype, const communicator &comm, const reduce_scatter_attr &attr = default_reduce_scatter_attr, const vector_class<event> &deps = {}) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.