pub enum PersistentMemory {
Enabled,
SizeMatch,
Disabled,
Enforced,
}Expand description
Configuration options for persistent memory pools in CubeCL runtimes.
Variants§
Enabled
Persistent memory is enabled but used only when explicitly specified.
SizeMatch
Like enabled, and automatic allocations whose size matches an
existing persistent bucket are also served from the persistent pool.
A good heuristic for training, where the recurring allocations are weight-shaped and updated within the same pool. Less suited to inference: activations that happen to match a weight size get pulled into exact-sized persistent slices.
Disabled
Persistent memory is disabled, allowing dynamic allocations.
Enforced
Persistent memory is enforced, preventing dynamic allocations.
§Warning
Enforcing persistent memory may cause out-of-memory errors if tensors of varying sizes are used.
Trait Implementations§
Source§impl Clone for PersistentMemory
impl Clone for PersistentMemory
Source§fn clone(&self) -> PersistentMemory
fn clone(&self) -> PersistentMemory
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PersistentMemory
impl Debug for PersistentMemory
Source§impl Default for PersistentMemory
impl Default for PersistentMemory
Source§fn default() -> PersistentMemory
fn default() -> PersistentMemory
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PersistentMemory
impl<'de> Deserialize<'de> for PersistentMemory
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
Auto Trait Implementations§
impl Freeze for PersistentMemory
impl RefUnwindSafe for PersistentMemory
impl Send for PersistentMemory
impl Sync for PersistentMemory
impl Unpin for PersistentMemory
impl UnsafeUnpin for PersistentMemory
impl UnwindSafe for PersistentMemory
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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