Skip to main content

TlDistributedExecutor

Trait TlDistributedExecutor 

Source
pub trait TlDistributedExecutor {
    // Required methods
    fn distributed_executor(&self) -> Option<&DistributedExecutor>;
    fn enable_distributed(
        &mut self,
        config: DistributedConfig,
    ) -> Result<(), ExecutorError>;
    fn disable_distributed(&mut self);
    fn is_distributed(&self) -> bool;

    // Provided methods
    fn rank(&self) -> usize { ... }
    fn world_size(&self) -> usize { ... }
}
Expand description

Trait for executors that support distributed execution.

Required Methods§

Source

fn distributed_executor(&self) -> Option<&DistributedExecutor>

Get the distributed executor.

Source

fn enable_distributed( &mut self, config: DistributedConfig, ) -> Result<(), ExecutorError>

Enable distributed execution.

Source

fn disable_distributed(&mut self)

Disable distributed execution.

Source

fn is_distributed(&self) -> bool

Check if distributed execution is enabled.

Provided Methods§

Source

fn rank(&self) -> usize

Get the current rank.

Source

fn world_size(&self) -> usize

Get the world size.

Implementors§