pub struct DummyCommunicationBackend { /* private fields */ }Expand description
Dummy communication backend for testing.
Implementations§
Trait Implementations§
Source§impl CommunicationBackend for DummyCommunicationBackend
impl CommunicationBackend for DummyCommunicationBackend
Source§fn initialize(
&mut self,
config: &DistributedConfig,
) -> Result<(), ExecutorError>
fn initialize( &mut self, config: &DistributedConfig, ) -> Result<(), ExecutorError>
Initialize the communication backend.
Source§fn world_size(&self) -> usize
fn world_size(&self) -> usize
Get the world size (total number of processes).
Source§fn all_reduce(
&self,
_tensor_id: &str,
_reduction: ReductionOp,
) -> Result<(), ExecutorError>
fn all_reduce( &self, _tensor_id: &str, _reduction: ReductionOp, ) -> Result<(), ExecutorError>
Perform an all-reduce operation.
Source§fn broadcast(
&self,
_tensor_id: &str,
_src_rank: usize,
) -> Result<(), ExecutorError>
fn broadcast( &self, _tensor_id: &str, _src_rank: usize, ) -> Result<(), ExecutorError>
Broadcast from source rank to all ranks.
Source§fn scatter(
&self,
_tensor_id: &str,
_src_rank: usize,
) -> Result<(), ExecutorError>
fn scatter( &self, _tensor_id: &str, _src_rank: usize, ) -> Result<(), ExecutorError>
Scatter data from source rank to all ranks.
Source§fn gather(
&self,
_tensor_id: &str,
_dst_rank: usize,
) -> Result<(), ExecutorError>
fn gather( &self, _tensor_id: &str, _dst_rank: usize, ) -> Result<(), ExecutorError>
Gather data from all ranks to destination rank.
Source§fn all_gather(&self, _tensor_id: &str) -> Result<(), ExecutorError>
fn all_gather(&self, _tensor_id: &str) -> Result<(), ExecutorError>
All-gather operation.
Source§fn reduce_scatter(
&self,
_tensor_id: &str,
_reduction: ReductionOp,
) -> Result<(), ExecutorError>
fn reduce_scatter( &self, _tensor_id: &str, _reduction: ReductionOp, ) -> Result<(), ExecutorError>
Reduce-scatter operation.
Source§fn send(&self, _tensor_id: &str, _dst_rank: usize) -> Result<(), ExecutorError>
fn send(&self, _tensor_id: &str, _dst_rank: usize) -> Result<(), ExecutorError>
Point-to-point send.
Auto Trait Implementations§
impl Freeze for DummyCommunicationBackend
impl RefUnwindSafe for DummyCommunicationBackend
impl Send for DummyCommunicationBackend
impl Sync for DummyCommunicationBackend
impl Unpin for DummyCommunicationBackend
impl UnwindSafe for DummyCommunicationBackend
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