#[non_exhaustive]pub enum LayerWeightResidency {
FullyResident,
LayerwiseHost(LayerwiseLoadOptions),
DenseDiskStream(DenseDiskStreamLoadOptions),
}Expand description
Placement policy for ordinary architecture execution units.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
FullyResident
Construct every rank-local module once and retain it on the execution device.
LayerwiseHost(LayerwiseLoadOptions)
Eagerly materialize units on a host stream and use a bounded device window.
DenseDiskStream(DenseDiskStreamLoadOptions)
Leave units cold on disk and use finite host and device caches.
Implementations§
Source§impl LayerWeightResidency
impl LayerWeightResidency
Sourcepub const fn max_cached_shards(self) -> usize
pub const fn max_cached_shards(self) -> usize
Returns the checkpoint shard/reader cache bound carried by this policy.
Sourcepub const fn sample_backend_memory(self) -> bool
pub const fn sample_backend_memory(self) -> bool
Returns whether backend allocator memory should be sampled.
Sourcepub const fn sample_process_memory(self) -> bool
pub const fn sample_process_memory(self) -> bool
Returns whether process memory should be sampled.
Sourcepub fn device_depth(self, unit_count: usize) -> usize
pub fn device_depth(self, unit_count: usize) -> usize
Returns the maximum execution-device unit window.
Sourcepub fn offload(self) -> Result<OffloadConfig, WeightResidencyPolicyError>
pub fn offload(self) -> Result<OffloadConfig, WeightResidencyPolicyError>
Resolves this policy into the shared offload configuration.
Sourcepub const fn dense(self) -> Option<DenseDiskStreamLoadOptions>
pub const fn dense(self) -> Option<DenseDiskStreamLoadOptions>
Returns dense-stream controls when this policy streams from disk.
Sourcepub const fn is_fully_resident(self) -> bool
pub const fn is_fully_resident(self) -> bool
Returns whether every ordinary execution unit remains device-resident.
Sourcepub const fn execution_residency(self) -> ExecutionResidency
pub const fn execution_residency(self) -> ExecutionResidency
Returns the stable physical execution classification.
Trait Implementations§
Source§impl Clone for LayerWeightResidency
impl Clone for LayerWeightResidency
Source§fn clone(&self) -> LayerWeightResidency
fn clone(&self) -> LayerWeightResidency
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 moreimpl Copy for LayerWeightResidency
Source§impl Debug for LayerWeightResidency
impl Debug for LayerWeightResidency
Source§impl Default for LayerWeightResidency
impl Default for LayerWeightResidency
Source§fn default() -> LayerWeightResidency
fn default() -> LayerWeightResidency
Returns the “default value” for a type. Read more
impl Eq for LayerWeightResidency
Source§impl From<DenseDiskStreamLoadOptions> for LayerWeightResidency
impl From<DenseDiskStreamLoadOptions> for LayerWeightResidency
Source§fn from(value: DenseDiskStreamLoadOptions) -> Self
fn from(value: DenseDiskStreamLoadOptions) -> Self
Converts to this type from the input type.
Source§impl From<LayerwiseLoadOptions> for LayerWeightResidency
impl From<LayerwiseLoadOptions> for LayerWeightResidency
Source§fn from(value: LayerwiseLoadOptions) -> Self
fn from(value: LayerwiseLoadOptions) -> Self
Converts to this type from the input type.
Source§impl From<OrdinaryWeightResidency> for LayerWeightResidency
impl From<OrdinaryWeightResidency> for LayerWeightResidency
Source§fn from(value: OrdinaryWeightResidency) -> Self
fn from(value: OrdinaryWeightResidency) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LayerWeightResidency
impl PartialEq for LayerWeightResidency
impl StructuralPartialEq for LayerWeightResidency
Auto Trait Implementations§
impl Freeze for LayerWeightResidency
impl RefUnwindSafe for LayerWeightResidency
impl Send for LayerWeightResidency
impl Sync for LayerWeightResidency
impl Unpin for LayerWeightResidency
impl UnsafeUnpin for LayerWeightResidency
impl UnwindSafe for LayerWeightResidency
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