pub struct MoeOffloadManager(/* private fields */);Implementations§
Source§impl MoeOffloadManager
impl MoeOffloadManager
pub fn new(slots: usize, bytes_per_expert: usize) -> Self
pub fn with_tier( slots: usize, bytes_per_expert: usize, tier: PersonalHardwareTier, ) -> Self
pub fn from_residency_profile( profile: ExpertResidencyProfile, ) -> (Self, PersonalHardwareTier)
Methods from Deref<Target = CoreManager>§
pub fn hardware_tier(&self) -> PersonalHardwareTier
pub fn hardware_tier(&self) -> PersonalHardwareTier
Active hardware tier of this offload manager.
pub fn query_vram_status(
&self,
available_accelerator_bytes: u64,
) -> DynamicVramStatus
pub fn query_vram_status( &self, available_accelerator_bytes: u64, ) -> DynamicVramStatus
Query current dynamic VRAM status and cache efficiency.
pub fn resolve_expert(
&mut self,
expert_id: u16,
allow_cpu_hybrid: bool,
estimated_pcie_queue_depth: usize,
) -> SlotAccessOutcome
pub fn resolve_expert( &mut self, expert_id: u16, allow_cpu_hybrid: bool, estimated_pcie_queue_depth: usize, ) -> SlotAccessOutcome
Access or schedule an expert for evaluation.
Checks GPU residency. If resident, returns Hit.
If not resident and allow_cpu_hybrid is enabled and transfer queue is contested, returns MissComputeCpu.
Otherwise returns MissFetch identifying the least-recently-used slot for replacement.
pub fn pin_expert(&mut self, slot_id: usize, expert_id: u16)
pub fn pin_expert(&mut self, slot_id: usize, expert_id: u16)
Pin an expert into GPU VRAM (e.g. shared expert that must never be evicted).
pub fn prefer_cpu_hybrid_threshold(&self) -> f32
pub fn prefer_cpu_hybrid_threshold(&self) -> f32
CPU hybrid dispatch threshold (queue depth / slot capacity).
pub fn set_prefer_cpu_hybrid_threshold(&mut self, threshold: f32)
pub fn set_prefer_cpu_hybrid_threshold(&mut self, threshold: f32)
Set the CPU hybrid dispatch threshold.
pub fn set_placement_policy(&mut self, policy: ExpertPlacementPolicy)
pub fn set_placement_policy(&mut self, policy: ExpertPlacementPolicy)
Freeze the cold-path calibration for all subsequent cache-miss decisions in this run.
pub fn placement_policy(&self) -> ExpertPlacementPolicy
pub fn placement_policy(&self) -> ExpertPlacementPolicy
MoeOffloadManager::placement_policy.
Trait Implementations§
Source§impl Debug for MoeOffloadManager
impl Debug for MoeOffloadManager
Source§impl Deref for MoeOffloadManager
impl Deref for MoeOffloadManager
Auto Trait Implementations§
impl Freeze for MoeOffloadManager
impl RefUnwindSafe for MoeOffloadManager
impl Send for MoeOffloadManager
impl Sync for MoeOffloadManager
impl Unpin for MoeOffloadManager
impl UnsafeUnpin for MoeOffloadManager
impl UnwindSafe for MoeOffloadManager
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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