SparseAllreduce¶
-
ccl::event
sparse_allreduce
(const void *send_ind_buf, size_t send_ind_count, const void *send_val_buf, size_t send_val_count, void *recv_ind_buf, size_t recv_ind_count, void *recv_val_buf, size_t recv_val_count, ccl::datatype ind_dtype, ccl::datatype val_dtype, ccl::reduction rtype, const ccl::communicator &comm, const ccl::stream &stream, const ccl::sparse_allreduce_attr &attr = ccl::default_sparse_allreduce_attr, const ccl::vector_class<ccl::event> &deps = {}) Sparse allreduce is a collective communication operation that makes global reduction operation on sparse buffers from all ranks of communicator and distributes result back to all ranks. Sparse buffers are defined by separate index and value buffers.
- Return
ccl::event an object to track the progress of the operation
- Parameters
send_ind_buf
: the buffer of indices withsend_ind_count
elements of typeind_dtype
send_ind_count
: the number of elements of typeind_type
send_ind_buf
send_val_buf
: the buffer of values withsend_val_count
elements of typeval_dtype
send_val_count
: the number of elements of typeval_type
send_val_buf
recv_ind_buf
: [out] the buffer to store reduced indices, unusedrecv_ind_count
: [out] the number of elements inrecv_ind_buf
, unusedrecv_val_buf
: [out] the buffer to store reduced values, unusedrecv_val_count
: [out] the number of elements inrecv_val_buf
, unusedind_dtype
: the datatype of elements insend_ind_buf
andrecv_ind_buf
val_dtype
: the datatype of elements insend_val_buf
andrecv_val_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
-
ccl::event
sparse_allreduce
(const void *send_ind_buf, size_t send_ind_count, const void *send_val_buf, size_t send_val_count, void *recv_ind_buf, size_t recv_ind_count, void *recv_val_buf, size_t recv_val_count, ccl::datatype ind_dtype, ccl::datatype val_dtype, ccl::reduction rtype, const ccl::communicator &comm, const ccl::sparse_allreduce_attr &attr = ccl::default_sparse_allreduce_attr, const ccl::vector_class<ccl::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
IndexBufferType
, classValueBufferType
, class = typename std::enable_if<ccl::is_native_type_supported<ValueBufferType>(), ccl::event>::type>
ccl::eventsparse_allreduce
(const IndexBufferType *send_ind_buf, size_t send_ind_count, const ValueBufferType *send_val_buf, size_t send_val_count, IndexBufferType *recv_ind_buf, size_t recv_ind_count, ValueBufferType *recv_val_buf, size_t recv_val_count, ccl::reduction rtype, const ccl::communicator &comm, const ccl::stream &stream, const ccl::sparse_allreduce_attr &attr = ccl::default_sparse_allreduce_attr, const ccl::vector_class<ccl::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
IndexBufferType
, classValueBufferType
, class = typename std::enable_if<ccl::is_native_type_supported<ValueBufferType>(), ccl::event>::type>
ccl::eventsparse_allreduce
(const IndexBufferType *send_ind_buf, size_t send_ind_count, const ValueBufferType *send_val_buf, size_t send_val_count, IndexBufferType *recv_ind_buf, size_t recv_ind_count, ValueBufferType *recv_val_buf, size_t recv_val_count, ccl::reduction rtype, const ccl::communicator &comm, const ccl::sparse_allreduce_attr &attr = ccl::default_sparse_allreduce_attr, const ccl::vector_class<ccl::event> &deps = {}) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.