pub struct CheckpointingConfig {
pub policy: CheckpointPolicy,
pub recompute_on_backward: bool,
pub save_rng_state: bool,
pub enable_statistics: bool,
pub max_checkpoints: Option<usize>,
}Expand description
Configuration for activation checkpointing
Fields§
§policy: CheckpointPolicyPolicy for selecting checkpoint locations
recompute_on_backward: boolWhether to recompute activations during backward pass
save_rng_state: boolSave and restore RNG state for deterministic dropout.
Note: the current scirs2_core RNG (a rand 0.10 ChaCha-backed
generator) does not expose serializable PRNG state. Enabling this makes
CheckpointManager::save_checkpoint return an honest
UnsupportedOperation error instead of fabricating state, so it is
disabled by default.
enable_statistics: boolEnable gradient checkpointing statistics tracking
max_checkpoints: Option<usize>Maximum number of checkpoints to store
Trait Implementations§
Source§impl Clone for CheckpointingConfig
impl Clone for CheckpointingConfig
Source§impl Debug for CheckpointingConfig
impl Debug for CheckpointingConfig
Auto Trait Implementations§
impl Freeze for CheckpointingConfig
impl RefUnwindSafe for CheckpointingConfig
impl Send for CheckpointingConfig
impl Sync for CheckpointingConfig
impl Unpin for CheckpointingConfig
impl UnsafeUnpin for CheckpointingConfig
impl UnwindSafe for CheckpointingConfig
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