pub struct TcpComm { /* private fields */ }Expand description
TCP communicator for multi-node ring communication.
Implementations§
Trait Implementations§
Source§impl Communicator for TcpComm
impl Communicator for TcpComm
Source§fn world_size(&self) -> usize
fn world_size(&self) -> usize
Get the total number of participants.
Source§fn send(&self, data: &TensorData) -> CommResult<()>
fn send(&self, data: &TensorData) -> CommResult<()>
Send data to the next rank in the ring.
Source§fn recv(&self) -> CommResult<TensorData>
fn recv(&self) -> CommResult<TensorData>
Receive data from the previous rank in the ring.
Source§fn barrier(&self) -> CommResult<()>
fn barrier(&self) -> CommResult<()>
Barrier synchronization across all ranks.
Source§fn send_recv(&self, send_data: &TensorData) -> CommResult<TensorData>
fn send_recv(&self, send_data: &TensorData) -> CommResult<TensorData>
Send to next and receive from previous simultaneously.
Auto Trait Implementations§
impl !Freeze for TcpComm
impl RefUnwindSafe for TcpComm
impl Send for TcpComm
impl Sync for TcpComm
impl Unpin for TcpComm
impl UnwindSafe for TcpComm
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