pub struct DistributedExecutor { /* private fields */ }Expand description
Distributed executor that coordinates multi-device execution.
Implementations§
Source§impl DistributedExecutor
impl DistributedExecutor
Sourcepub fn new(
config: DistributedConfig,
backend: Arc<RwLock<dyn CommunicationBackend>>,
) -> Result<Self, ExecutorError>
pub fn new( config: DistributedConfig, backend: Arc<RwLock<dyn CommunicationBackend>>, ) -> Result<Self, ExecutorError>
Create a new distributed executor.
Sourcepub fn strategy(&self) -> ParallelismStrategy
pub fn strategy(&self) -> ParallelismStrategy
Get the parallelism strategy.
Sourcepub fn world_size(&self) -> usize
pub fn world_size(&self) -> usize
Get the world size.
Sourcepub fn barrier(&self) -> Result<(), ExecutorError>
pub fn barrier(&self) -> Result<(), ExecutorError>
Synchronize all processes.
Sourcepub fn data_parallel(&self) -> Option<&DataParallelCoordinator>
pub fn data_parallel(&self) -> Option<&DataParallelCoordinator>
Get data parallel coordinator.
Sourcepub fn model_parallel(&self) -> Option<&ModelParallelCoordinator>
pub fn model_parallel(&self) -> Option<&ModelParallelCoordinator>
Get model parallel coordinator.
Sourcepub fn pipeline_parallel(&self) -> Option<&PipelineParallelCoordinator>
pub fn pipeline_parallel(&self) -> Option<&PipelineParallelCoordinator>
Get pipeline parallel coordinator.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DistributedExecutor
impl RefUnwindSafe for DistributedExecutor
impl Send for DistributedExecutor
impl Sync for DistributedExecutor
impl Unpin for DistributedExecutor
impl UnwindSafe for DistributedExecutor
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