pub struct StateMemoryLayout {
pub hidden_size: u64,
pub allocation_granularity: u64,
pub completeness: EstimationCompleteness,
/* private fields */
}Expand description
Memory-accounting view of an executable runtime-state layout.
The ordered layer policies are copied directly from the architecture’s
executable LayerSchedule. They are intentionally not summarized into a
second scalar geometry, so execution and admission share one semantic
source for every state-bearing layer and component.
Fields§
Model hidden width used by retained media embeddings.
allocation_granularity: u64Allocation granularity for unbounded caches.
completeness: EstimationCompletenessCoverage supplied by the layout.
Implementations§
Source§impl StateMemoryLayout
impl StateMemoryLayout
Sourcepub fn new(
layer_layout: LayerSchedule<LayerCachePolicy>,
layer_prefix_offsets: Vec<i32>,
hidden_size: u64,
allocation_granularity: u64,
completeness: EstimationCompleteness,
) -> Result<Self, CapabilityError>
pub fn new( layer_layout: LayerSchedule<LayerCachePolicy>, layer_prefix_offsets: Vec<i32>, hidden_size: u64, allocation_granularity: u64, completeness: EstimationCompleteness, ) -> Result<Self, CapabilityError>
Creates accounting metadata around an exact executable layer schedule.
Sourcepub const fn layer_layout(&self) -> &LayerSchedule<LayerCachePolicy>
pub const fn layer_layout(&self) -> &LayerSchedule<LayerCachePolicy>
Borrows the exact ordered executable state policies.
Sourcepub fn layer_prefix_offsets(&self) -> &[i32]
pub fn layer_prefix_offsets(&self) -> &[i32]
Returns executable processed-token offsets in state-layer order.
Trait Implementations§
Source§impl Clone for StateMemoryLayout
impl Clone for StateMemoryLayout
Source§fn clone(&self) -> StateMemoryLayout
fn clone(&self) -> StateMemoryLayout
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 StateMemoryLayout
impl Debug for StateMemoryLayout
Source§impl<'de> Deserialize<'de> for StateMemoryLayout
impl<'de> Deserialize<'de> for StateMemoryLayout
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
impl Eq for StateMemoryLayout
Source§impl PartialEq for StateMemoryLayout
impl PartialEq for StateMemoryLayout
Source§impl Serialize for StateMemoryLayout
impl Serialize for StateMemoryLayout
impl StructuralPartialEq for StateMemoryLayout
Auto Trait Implementations§
impl Freeze for StateMemoryLayout
impl RefUnwindSafe for StateMemoryLayout
impl Send for StateMemoryLayout
impl Sync for StateMemoryLayout
impl Unpin for StateMemoryLayout
impl UnsafeUnpin for StateMemoryLayout
impl UnwindSafe for StateMemoryLayout
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