pub struct PipelineMemoryStats {
pub num_stages: usize,
pub num_microbatches: usize,
pub peak_activations_per_stage: usize,
pub schedule: PipelineSchedule,
}Expand description
Memory statistics for pipeline parallelism.
Fields§
§num_stages: usizeNumber of stages
num_microbatches: usizeNumber of microbatches
peak_activations_per_stage: usizePeak activations stored (per stage)
schedule: PipelineScheduleSchedule used
Implementations§
Source§impl PipelineMemoryStats
impl PipelineMemoryStats
Sourcepub fn gpipe_peak_activations(
num_stages: usize,
num_microbatches: usize,
) -> usize
pub fn gpipe_peak_activations( num_stages: usize, num_microbatches: usize, ) -> usize
Estimates peak activation memory for GPipe.
Sourcepub fn one_f_one_b_peak_activations(
num_stages: usize,
num_microbatches: usize,
) -> usize
pub fn one_f_one_b_peak_activations( num_stages: usize, num_microbatches: usize, ) -> usize
Estimates peak activation memory for 1F1B.
Trait Implementations§
Source§impl Clone for PipelineMemoryStats
impl Clone for PipelineMemoryStats
Source§fn clone(&self) -> PipelineMemoryStats
fn clone(&self) -> PipelineMemoryStats
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 moreAuto Trait Implementations§
impl Freeze for PipelineMemoryStats
impl RefUnwindSafe for PipelineMemoryStats
impl Send for PipelineMemoryStats
impl Sync for PipelineMemoryStats
impl Unpin for PipelineMemoryStats
impl UnwindSafe for PipelineMemoryStats
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> 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