pub struct ClientGroup { /* private fields */ }Expand description
The clients of distinct devices of one runtime that run collectives together, for a caller holding every member’s buffers.
Member i is rank i, in ascending device order. Work queued after a collective reads its
result, but per-device all_reduce calls are not ordered against it, and on a device both use
the two can hang. A member whose part fails, such as one whose source an earlier failure left
stale, leaves the others waiting in it and runs no later collective over the group. Buffers
move as bytes, so a pitched handle’s row padding counts toward its chunks.
Implementations§
Source§impl ClientGroup
impl ClientGroup
Sourcepub fn new(clients: Vec<Client>) -> Result<ClientGroup, ClientGroupError>
pub fn new(clients: Vec<Client>) -> Result<ClientGroup, ClientGroupError>
A group of clients, one per member.
§Errors
When there are none, when the device handle blocks, when they mix runtimes, when their devices are not in strictly ascending order, and when their runtime has no device transport.
Sourcepub fn reduces(&self, dtype: ElemType) -> bool
pub fn reduces(&self, dtype: ElemType) -> bool
Whether the members reduce elements of dtype together. Every other collective moves bytes,
whatever their type.
Sourcepub fn all_reduce(
&self,
buffers: Vec<MemberBuffers>,
dtype: ElemType,
op: ReduceOperation,
)
pub fn all_reduce( &self, buffers: Vec<MemberBuffers>, dtype: ElemType, op: ReduceOperation, )
Every member’s dst receives every member’s src reduced by op. A member’s src may be
its dst.
Sourcepub fn all_gather(&self, buffers: Vec<MemberBuffers>)
pub fn all_gather(&self, buffers: Vec<MemberBuffers>)
Every member’s dst receives every member’s src, concatenated in member order.
Sourcepub fn reduce_scatter(
&self,
buffers: Vec<MemberBuffers>,
dtype: ElemType,
op: ReduceOperation,
)
pub fn reduce_scatter( &self, buffers: Vec<MemberBuffers>, dtype: ElemType, op: ReduceOperation, )
Member i’s dst receives chunk i of every member’s src reduced by op.
Sourcepub fn broadcast(&self, src: Handle, dst: Vec<Handle>)
pub fn broadcast(&self, src: Handle, dst: Vec<Handle>)
Every member’s dst receives src, sent by the member whose device holds it. That
member’s dst may be src.
Sourcepub fn all_to_all(&self, buffers: Vec<MemberBuffers>)
pub fn all_to_all(&self, buffers: Vec<MemberBuffers>)
Member i’s dst receives chunk i of every member’s src, concatenated in member
order.
Trait Implementations§
Source§impl Clone for ClientGroup
impl Clone for ClientGroup
Source§fn clone(&self) -> ClientGroup
fn clone(&self) -> ClientGroup
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ClientGroup
impl !UnwindSafe for ClientGroup
impl Freeze for ClientGroup
impl Send for ClientGroup
impl Sync for ClientGroup
impl Unpin for ClientGroup
impl UnsafeUnpin for ClientGroup
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneExpand for Twhere
T: Clone,
impl<T> CloneExpand for Twhere
T: Clone,
fn __expand_clone_method(&self, _: &Scope) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more