pub struct DenseDiskStreamLoadOptions { /* private fields */ }Expand description
Controls for bounded dense-unit streaming from checkpoint storage.
Implementations§
Source§impl DenseDiskStreamLoadOptions
impl DenseDiskStreamLoadOptions
Sourcepub fn new(
device_budget_bytes: u64,
host_budget_bytes: u64,
host_lookahead: usize,
background_queue_capacity: usize,
) -> Result<Self, WeightResidencyPolicyError>
pub fn new( device_budget_bytes: u64, host_budget_bytes: u64, host_lookahead: usize, background_queue_capacity: usize, ) -> Result<Self, WeightResidencyPolicyError>
Creates streaming options with finite tier budgets.
Sourcepub fn validate(self) -> Result<(), WeightResidencyPolicyError>
pub fn validate(self) -> Result<(), WeightResidencyPolicyError>
Revalidates the complete bounded policy.
Sourcepub const fn with_eviction_policy(self, policy: CacheEvictionPolicy) -> Self
pub const fn with_eviction_policy(self, policy: CacheEvictionPolicy) -> Self
Selects deterministic cache eviction.
Sourcepub const fn with_max_cached_shards(self, maximum: usize) -> Self
pub const fn with_max_cached_shards(self, maximum: usize) -> Self
Selects the checkpoint-reader cache bound.
Sourcepub const fn with_memory_sampling(self, backend: bool, process: bool) -> Self
pub const fn with_memory_sampling(self, backend: bool, process: bool) -> Self
Selects allocator and process memory sampling.
Sourcepub const fn device_budget_bytes(self) -> u64
pub const fn device_budget_bytes(self) -> u64
Returns the finite logical device budget.
Sourcepub const fn host_budget_bytes(self) -> u64
pub const fn host_budget_bytes(self) -> u64
Returns the finite charged host budget.
Sourcepub const fn host_lookahead(self) -> usize
pub const fn host_lookahead(self) -> usize
Returns the protected host lookahead.
Sourcepub const fn background_queue_capacity(self) -> usize
pub const fn background_queue_capacity(self) -> usize
Returns the background materialization queue bound.
Sourcepub const fn eviction_policy(self) -> CacheEvictionPolicy
pub const fn eviction_policy(self) -> CacheEvictionPolicy
Returns deterministic eviction ordering.
Sourcepub const fn max_cached_shards(self) -> usize
pub const fn max_cached_shards(self) -> usize
Returns the checkpoint-reader cache bound.
Sourcepub const fn samples_backend_memory(self) -> bool
pub const fn samples_backend_memory(self) -> bool
Returns whether backend allocator sampling is enabled.
Sourcepub const fn samples_process_memory(self) -> bool
pub const fn samples_process_memory(self) -> bool
Returns whether process memory sampling is enabled.
Trait Implementations§
Source§impl Clone for DenseDiskStreamLoadOptions
impl Clone for DenseDiskStreamLoadOptions
Source§fn clone(&self) -> DenseDiskStreamLoadOptions
fn clone(&self) -> DenseDiskStreamLoadOptions
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 DenseDiskStreamLoadOptions
Source§impl Debug for DenseDiskStreamLoadOptions
impl Debug for DenseDiskStreamLoadOptions
Source§impl Default for DenseDiskStreamLoadOptions
impl Default for DenseDiskStreamLoadOptions
impl Eq for DenseDiskStreamLoadOptions
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.
impl StructuralPartialEq for DenseDiskStreamLoadOptions
Auto Trait Implementations§
impl Freeze for DenseDiskStreamLoadOptions
impl RefUnwindSafe for DenseDiskStreamLoadOptions
impl Send for DenseDiskStreamLoadOptions
impl Sync for DenseDiskStreamLoadOptions
impl Unpin for DenseDiskStreamLoadOptions
impl UnsafeUnpin for DenseDiskStreamLoadOptions
impl UnwindSafe for DenseDiskStreamLoadOptions
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