pub struct ReduceRequest<T: NcclReduceSupported> {
pub send: GpuRef<T>,
pub recv: Option<GpuRef<T>>,
pub op: ReduceOp,
pub root: i32,
pub reply: Sender<Result<(), GpuError>>,
}Expand description
Reduce: each rank contributes send; the result lands in recv
on root. On non-root ranks, recv may be None.
Fields§
§send: GpuRef<T>§recv: Option<GpuRef<T>>§op: ReduceOp§root: i32§reply: Sender<Result<(), GpuError>>Trait Implementations§
Source§impl<T: NcclReduceSupported> CollectiveDispatch for ReduceRequest<T>
impl<T: NcclReduceSupported> CollectiveDispatch for ReduceRequest<T>
fn dtype_kind(&self) -> DispatchDType
fn device_id(&self) -> Option<u32>
fn dispatch(self: Box<Self>, ctx: &CollectiveDispatchCtx<'_>)
Auto Trait Implementations§
impl<T> Freeze for ReduceRequest<T>
impl<T> !RefUnwindSafe for ReduceRequest<T>
impl<T> Send for ReduceRequest<T>
impl<T> Sync for ReduceRequest<T>
impl<T> Unpin for ReduceRequest<T>
impl<T> UnsafeUnpin for ReduceRequest<T>
impl<T> !UnwindSafe for ReduceRequest<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more