pub struct MultiNodeConfig {
pub num_nodes: usize,
pub devices_per_node: usize,
pub node_rank: usize,
pub local_rank: usize,
pub global_rank: usize,
pub zero_config: ZeROConfig,
pub gradient_compression: bool,
pub comm_backend: CommunicationBackend,
pub overlap_comm_compute: bool,
pub gradient_bucket_size_mb: usize,
}Expand description
Multi-node training configuration
Fields§
§num_nodes: usizeNumber of nodes in the cluster
devices_per_node: usizeNumber of devices per node
node_rank: usizeNode rank (0-based)
local_rank: usizeLocal device rank within node
global_rank: usizeGlobal rank across all nodes
zero_config: ZeROConfigZeRO configuration for memory optimization
gradient_compression: boolEnable gradient compression
comm_backend: CommunicationBackendCommunication backend
overlap_comm_compute: boolEnable overlap of computation and communication
gradient_bucket_size_mb: usizeBucket size for gradient synchronization (MB)
Implementations§
Source§impl MultiNodeConfig
impl MultiNodeConfig
Sourcepub fn new(
num_nodes: usize,
devices_per_node: usize,
node_rank: usize,
local_rank: usize,
) -> Self
pub fn new( num_nodes: usize, devices_per_node: usize, node_rank: usize, local_rank: usize, ) -> Self
Create configuration for multi-node training
Sourcepub fn world_size(&self) -> usize
pub fn world_size(&self) -> usize
Get total world size across all nodes
Sourcepub fn node_local_ranks(&self) -> Vec<usize>
pub fn node_local_ranks(&self) -> Vec<usize>
Get node-local ranks for this node
Trait Implementations§
Source§impl Clone for MultiNodeConfig
impl Clone for MultiNodeConfig
Source§fn clone(&self) -> MultiNodeConfig
fn clone(&self) -> MultiNodeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MultiNodeConfig
impl Debug for MultiNodeConfig
Auto Trait Implementations§
impl Freeze for MultiNodeConfig
impl RefUnwindSafe for MultiNodeConfig
impl Send for MultiNodeConfig
impl Sync for MultiNodeConfig
impl Unpin for MultiNodeConfig
impl UnwindSafe for MultiNodeConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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