pub struct VramLedger { /* private fields */ }Expand description
Zero-heap VRAM budget tracker (bytes, atomics).
Implementations§
Source§impl VramLedger
impl VramLedger
pub const KV_CACHE_CAP_BYTES: u64
pub fn budget(&self) -> u64
pub fn used_in_slot(&self, slot: VramLedgerSlot) -> u64
pub fn record_slot(&self, slot: VramLedgerSlot, bytes: u64)
pub fn universe_used_bytes(&self, universe: ComputeUniverse) -> u64
pub fn universe_pressure( &self, orchestrator: &UniverseOrchestrator, universe: ComputeUniverse, ) -> f32
pub fn can_allocate_in_universe( &self, orchestrator: &UniverseOrchestrator, universe: ComputeUniverse, extra_bytes: u64, ) -> bool
Sourcepub fn slot_byte_offset(
orchestrator: &UniverseOrchestrator,
slot: VramLedgerSlot,
) -> u64
pub fn slot_byte_offset( orchestrator: &UniverseOrchestrator, slot: VramLedgerSlot, ) -> u64
Map a ledger slot to its pinned byte offset inside the adapter ledger.
pub fn record_universe( &self, universe: ComputeUniverse, slot: VramLedgerSlot, bytes: u64, )
pub fn new(budget_bytes: u64) -> Self
pub fn set_budget(&self, bytes: u64)
pub fn record_tensor(&self, bytes: u64)
pub fn record_kv_cache(&self, bytes: u64)
pub fn record_render(&self, bytes: u64)
pub fn record_llm_staging(&self, bytes: u64)
pub fn used_bytes(&self) -> u64
pub fn pressure(&self) -> f32
pub fn mode(&self) -> OperationalMode
pub fn refresh_mode(&self)
pub fn can_allocate(&self, extra_bytes: u64) -> bool
Trait Implementations§
Source§impl Debug for VramLedger
impl Debug for VramLedger
Source§impl Default for VramLedger
impl Default for VramLedger
Source§fn default() -> VramLedger
fn default() -> VramLedger
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for VramLedger
impl RefUnwindSafe for VramLedger
impl Send for VramLedger
impl Sync for VramLedger
impl Unpin for VramLedger
impl UnsafeUnpin for VramLedger
impl UnwindSafe for VramLedger
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.