#[non_exhaustive]pub enum WeightResidency {
Layers(LayerWeightResidency),
#[non_exhaustive] IndependentParameterBanks {
ordinary: OrdinaryWeightResidency,
cache: ParameterBankLoadOptions,
},
}Expand description
Composable ordinary-unit and independently addressable bank placement.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Layers(LayerWeightResidency)
All parameters share the ordinary unit residency allocation.
#[non_exhaustive]IndependentParameterBanks
Addressable bank members are independent units beside bounded ordinary units.
Fields
This variant is marked as non-exhaustive
ordinary: OrdinaryWeightResidencyBounded ordinary-unit policy.
cache: ParameterBankLoadOptionsBank-member-granular cache controls.
Implementations§
Source§impl WeightResidency
impl WeightResidency
Sourcepub const fn fully_resident() -> Self
pub const fn fully_resident() -> Self
Keeps every rank-owned parameter on the execution device.
Sourcepub const fn layerwise_host(options: LayerwiseLoadOptions) -> Self
pub const fn layerwise_host(options: LayerwiseLoadOptions) -> Self
Eagerly materializes ordinary units on host behind a bounded device window.
Sourcepub const fn dense_disk_stream(options: DenseDiskStreamLoadOptions) -> Self
pub const fn dense_disk_stream(options: DenseDiskStreamLoadOptions) -> Self
Leaves ordinary units cold on disk behind finite host/device caches.
Sourcepub const fn with_layers(layers: LayerWeightResidency) -> Self
pub const fn with_layers(layers: LayerWeightResidency) -> Self
Keeps every owned parameter in its ordinary unit residency allocation.
Sourcepub const fn with_independent_parameter_banks(
ordinary: OrdinaryWeightResidency,
cache: ParameterBankLoadOptions,
) -> Self
pub const fn with_independent_parameter_banks( ordinary: OrdinaryWeightResidency, cache: ParameterBankLoadOptions, ) -> Self
Gives addressable parameter banks an independent cache beside ordinary units.
Sourcepub const fn layers(self) -> LayerWeightResidency
pub const fn layers(self) -> LayerWeightResidency
Returns ordinary-unit placement.
Sourcepub const fn parameter_banks(self) -> ParameterBankResidency
pub const fn parameter_banks(self) -> ParameterBankResidency
Returns independently addressable bank placement relative to ordinary units.
Sourcepub const fn parameter_bank_cache(self) -> Option<ParameterBankLoadOptions>
pub const fn parameter_bank_cache(self) -> Option<ParameterBankLoadOptions>
Returns independently cached parameter-bank controls, when selected.
Sourcepub const fn ordinary_residency(self) -> Option<OrdinaryWeightResidency>
pub const fn ordinary_residency(self) -> Option<OrdinaryWeightResidency>
Returns ordinary placement paired with an independent parameter-bank cache.
Sourcepub const fn ordinary_is_fully_resident(self) -> bool
pub const fn ordinary_is_fully_resident(self) -> bool
Returns whether every ordinary parameter remains resident.
Sourcepub const fn is_fully_resident(self) -> bool
pub const fn is_fully_resident(self) -> bool
Returns whether every ordinary unit remains resident.
Sourcepub const fn max_cached_shards(self) -> usize
pub const fn max_cached_shards(self) -> usize
Returns the common checkpoint shard/reader cache bound.
Trait Implementations§
Source§impl Clone for WeightResidency
impl Clone for WeightResidency
Source§fn clone(&self) -> WeightResidency
fn clone(&self) -> WeightResidency
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more