Asynchronous (coroutine) interface to coll::AllReduce.
More...
#include <allreduce.hpp>
Public Member Functions | |
| AllReduce (std::shared_ptr< Context > ctx, std::shared_ptr< Communicator > comm, std::unique_ptr< Buffer > input, std::unique_ptr< Buffer > output, OpID op_id, coll::ReduceOperator reduce_operator) | |
| Construct an asynchronous allreduce. More... | |
| AllReduce (AllReduce const &)=delete | |
| AllReduce & | operator= (AllReduce const &)=delete |
| AllReduce (AllReduce &&)=delete | |
| AllReduce & | operator= (AllReduce &&)=delete |
| std::shared_ptr< Context > const & | ctx () const noexcept |
| Gets the streaming context associated with this AllReduce object. More... | |
| std::shared_ptr< Communicator > const & | comm () const noexcept |
| Gets the communicator associated with this AllReduce. More... | |
| coro::task< std::pair< std::unique_ptr< Buffer >, std::unique_ptr< Buffer > > > | extract () |
| Wait for completion and extract the reduced data. More... | |
Asynchronous (coroutine) interface to coll::AllReduce.
A single extraction task must await extract() to obtain the result and ensure that the reduction completes.
Definition at line 25 of file allreduce.hpp.
| rapidsmpf::streaming::AllReduce::AllReduce | ( | std::shared_ptr< Context > | ctx, |
| std::shared_ptr< Communicator > | comm, | ||
| std::unique_ptr< Buffer > | input, | ||
| std::unique_ptr< Buffer > | output, | ||
| OpID | op_id, | ||
| coll::ReduceOperator | reduce_operator | ||
| ) |
Construct an asynchronous allreduce.
| ctx | Streaming context |
| comm | The communicator for communication. |
| input | Local data to contribute to the reduction. |
| output | Allocated buffer in which to place reduction result. Must be the same size and memory type as input. Overwritten with the reduction result (values already in the buffer are ignored). |
| op_id | Unique operation identifier for this allreduce. |
| reduce_operator | Type-erased reduction operator to use. See ReduceOperator. |
|
noexcept |
Gets the communicator associated with this AllReduce.
|
noexcept |
Gets the streaming context associated with this AllReduce object.