pub struct TcpProcessGroup { /* private fields */ }
Expand description
TCP-based process group implementation
Implementations§
Source§impl TcpProcessGroup
impl TcpProcessGroup
Sourcepub fn new(config: &DistributedConfig) -> Result<Self>
pub fn new(config: &DistributedConfig) -> Result<Self>
Create a new TCP process group
Trait Implementations§
Source§impl ProcessGroup for TcpProcessGroup
impl ProcessGroup for TcpProcessGroup
Source§fn all_reduce(&self, tensor: &mut ArrayD<f32>) -> Result<()>
fn all_reduce(&self, tensor: &mut ArrayD<f32>) -> Result<()>
Perform all-reduce operation on tensor across all processes
Source§fn broadcast(&self, _tensor: &mut ArrayD<f32>, _root: usize) -> Result<()>
fn broadcast(&self, _tensor: &mut ArrayD<f32>, _root: usize) -> Result<()>
Broadcast tensor from root process to all others
Source§fn get_world_size(&self) -> usize
fn get_world_size(&self) -> usize
Get the total number of processes
Auto Trait Implementations§
impl Freeze for TcpProcessGroup
impl RefUnwindSafe for TcpProcessGroup
impl Send for TcpProcessGroup
impl Sync for TcpProcessGroup
impl Unpin for TcpProcessGroup
impl UnwindSafe for TcpProcessGroup
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