10 #include <coro/event.hpp>
11 #include <coro/task.hpp>
13 #include <rapidsmpf/coll/allreduce.hpp>
14 #include <rapidsmpf/communicator/communicator.hpp>
15 #include <rapidsmpf/streaming/core/context.hpp>
40 std::shared_ptr<Context>
ctx,
41 std::shared_ptr<Communicator>
comm,
42 std::unique_ptr<Buffer> input,
43 std::unique_ptr<Buffer> output,
60 [[nodiscard]] std::shared_ptr<
Context> const&
ctx() const noexcept;
82 std::shared_ptr<Context> ctx_;
Buffer representing device or host memory.
Abstract base class for a communication mechanism between nodes.
Asynchronous (coroutine) interface to coll::AllReduce.
coro::task< std::pair< std::unique_ptr< Buffer >, std::unique_ptr< Buffer > > > extract()
Wait for completion and extract the reduced data.
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.
std::shared_ptr< Communicator > const & comm() const noexcept
Gets the communicator associated with this AllReduce.
std::shared_ptr< Context > const & ctx() const noexcept
Gets the streaming context associated with this AllReduce object.
Context for actors (coroutines) in rapidsmpf.
std::function< void(Buffer const *left, Buffer *right)> ReduceOperator
Type alias for the reduction function signature.
std::int32_t OpID
Operation ID defined by the user. This allows users to concurrently execute multiple operations,...