pub enum MemoryAllocationStrategy {
Static {
allocation_per_node_mb: u64,
},
Dynamic {
target_utilization: f32,
adjustment_factor: f32,
},
Balanced {
rebalance_threshold: f32,
},
Priority {
priority_weights: HashMap<String, f32>,
},
Elastic {
base_allocation_mb: u64,
max_overflow_mb: u64,
},
Adaptive {
learning_rate: f32,
adaptation_window: usize,
},
}Expand description
Memory allocation strategies for distributed training
Variants§
Static
Static allocation based on model size
Dynamic
Dynamic allocation based on current memory pressure
Balanced
Balanced allocation across nodes
Priority
Priority-based allocation
Elastic
Elastic allocation with overflow handling
Adaptive
Adaptive allocation based on workload patterns
Trait Implementations§
Source§impl Clone for MemoryAllocationStrategy
impl Clone for MemoryAllocationStrategy
Source§fn clone(&self) -> MemoryAllocationStrategy
fn clone(&self) -> MemoryAllocationStrategy
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 MemoryAllocationStrategy
impl Debug for MemoryAllocationStrategy
Source§impl Default for MemoryAllocationStrategy
impl Default for MemoryAllocationStrategy
Source§impl<'de> Deserialize<'de> for MemoryAllocationStrategy
impl<'de> Deserialize<'de> for MemoryAllocationStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for MemoryAllocationStrategy
impl PartialEq for MemoryAllocationStrategy
Source§impl Serialize for MemoryAllocationStrategy
impl Serialize for MemoryAllocationStrategy
impl StructuralPartialEq for MemoryAllocationStrategy
Auto Trait Implementations§
impl Freeze for MemoryAllocationStrategy
impl RefUnwindSafe for MemoryAllocationStrategy
impl Send for MemoryAllocationStrategy
impl Sync for MemoryAllocationStrategy
impl Unpin for MemoryAllocationStrategy
impl UnsafeUnpin for MemoryAllocationStrategy
impl UnwindSafe for MemoryAllocationStrategy
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