pub struct LayerwiseLoadOptions { /* private fields */ }Expand description
Loader controls for a host-backed layerwise execution engine.
Implementations§
Source§impl LayerwiseLoadOptions
impl LayerwiseLoadOptions
Sourcepub fn new(offload: OffloadConfig) -> Self
pub fn new(offload: OffloadConfig) -> Self
Creates layerwise options with the default shard-cache bound.
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 offload(self) -> OffloadConfig
pub const fn offload(self) -> OffloadConfig
Returns the exact offload limits.
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 LayerwiseLoadOptions
impl Clone for LayerwiseLoadOptions
Source§fn clone(&self) -> LayerwiseLoadOptions
fn clone(&self) -> LayerwiseLoadOptions
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 LayerwiseLoadOptions
Source§impl Debug for LayerwiseLoadOptions
impl Debug for LayerwiseLoadOptions
Source§impl Default for LayerwiseLoadOptions
impl Default for LayerwiseLoadOptions
impl Eq for LayerwiseLoadOptions
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 PartialEq for LayerwiseLoadOptions
impl PartialEq for LayerwiseLoadOptions
impl StructuralPartialEq for LayerwiseLoadOptions
Auto Trait Implementations§
impl Freeze for LayerwiseLoadOptions
impl RefUnwindSafe for LayerwiseLoadOptions
impl Send for LayerwiseLoadOptions
impl Sync for LayerwiseLoadOptions
impl Unpin for LayerwiseLoadOptions
impl UnsafeUnpin for LayerwiseLoadOptions
impl UnwindSafe for LayerwiseLoadOptions
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