pub struct CommunicationManager { /* private fields */ }Expand description
Communication manager for distributed operations
Implementations§
Source§impl CommunicationManager
impl CommunicationManager
pub fn new(config: &DistributedConfig) -> Result<Self, DistributedError>
Sourcepub fn num_workers(&self) -> usize
pub fn num_workers(&self) -> usize
Get the number of workers
pub fn all_reduce(&mut self, data: &[f32]) -> Result<Vec<f32>, DistributedError>
pub fn all_reduce_sum( &mut self, data: &[f32], ) -> Result<Vec<f32>, DistributedError>
pub fn send_to( &mut self, _target_rank: usize, _data: &[Tensor], ) -> Result<(), DistributedError>
pub fn receive_from( &mut self, _source_rank: usize, ) -> Result<Vec<Tensor>, DistributedError>
pub fn request_boundary_features( &mut self, _target_worker: usize, ) -> Result<Tensor, DistributedError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommunicationManager
impl RefUnwindSafe for CommunicationManager
impl Send for CommunicationManager
impl Sync for CommunicationManager
impl Unpin for CommunicationManager
impl UnsafeUnpin for CommunicationManager
impl UnwindSafe for CommunicationManager
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
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>
Converts
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>
Converts
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