pub struct CheckpointStatistics {
pub forward_passes: usize,
pub backward_passes: usize,
pub recompute_count: usize,
pub memory_saved_bytes: usize,
pub additional_compute_time_us: u64,
pub active_checkpoints: usize,
}Expand description
Statistics for checkpointing performance
Fields§
§forward_passes: usizeTotal number of forward passes
backward_passes: usizeTotal number of backward passes
recompute_count: usizeNumber of recomputations performed
memory_saved_bytes: usizeTotal memory saved (estimated, in bytes)
additional_compute_time_us: u64Additional computation time due to recomputation (in microseconds)
active_checkpoints: usizeNumber of active checkpoints
Implementations§
Source§impl CheckpointStatistics
impl CheckpointStatistics
Sourcepub fn avg_recomputations(&self) -> f64
pub fn avg_recomputations(&self) -> f64
Get average recomputations per backward pass
Sourcepub fn memory_saved_mb(&self) -> f64
pub fn memory_saved_mb(&self) -> f64
Get memory saved in MB
Sourcepub fn compute_overhead_percent(&self) -> f64
pub fn compute_overhead_percent(&self) -> f64
Get overhead percentage
Trait Implementations§
Source§impl Clone for CheckpointStatistics
impl Clone for CheckpointStatistics
Source§impl Debug for CheckpointStatistics
impl Debug for CheckpointStatistics
Auto Trait Implementations§
impl Freeze for CheckpointStatistics
impl RefUnwindSafe for CheckpointStatistics
impl Send for CheckpointStatistics
impl Sync for CheckpointStatistics
impl Unpin for CheckpointStatistics
impl UnsafeUnpin for CheckpointStatistics
impl UnwindSafe for CheckpointStatistics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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