pub struct MoeOffloadState {
pub pools: Vec<ExpertPool>,
pub refresh: ExpertRefreshPolicy,
pub info: PredictiveOffloadInfo,
pub predictive_enabled: bool,
pub jump_steps: usize,
pub collect_stats: bool,
}Expand description
Per-layer TIDE expert pools (one per MoE FFN in trunk order).
Fields§
§pools: Vec<ExpertPool>§refresh: ExpertRefreshPolicy§info: PredictiveOffloadInfo§predictive_enabled: bool§jump_steps: usize§collect_stats: boolImplementations§
Source§impl MoeOffloadState
impl MoeOffloadState
pub fn num_layers(&self) -> usize
pub fn merged_resident_mask(&self) -> Vec<bool>
pub fn per_layer_resident_masks(&self) -> Vec<Vec<bool>>
Sourcepub fn should_refresh_forward(
&self,
denoise_step: usize,
is_prefill_block: bool,
) -> bool
pub fn should_refresh_forward( &self, denoise_step: usize, is_prefill_block: bool, ) -> bool
AR prefill or block-diffusion prefill block → always refresh; else step % jump_steps == 0.
Sourcepub fn should_refresh_block(
&self,
num_block: usize,
prefill_blocks: usize,
denoise_step: usize,
) -> bool
pub fn should_refresh_block( &self, num_block: usize, prefill_blocks: usize, denoise_step: usize, ) -> bool
Block diffusion: TIDE generate refresh line.
Sourcepub fn refresh_from_capture(
&mut self,
layer_indices: &[Vec<u32>],
denoise_step: usize,
is_prefill_block: bool,
) -> bool
pub fn refresh_from_capture( &mut self, layer_indices: &[Vec<u32>], denoise_step: usize, is_prefill_block: bool, ) -> bool
Apply captured TopK indices per layer; returns true if any layer refreshed.
pub fn refresh_from_capture_with_store( &mut self, store: &MoeExpertStore, captured: &[Vec<u32>], denoise_step: usize, is_prefill_block: bool, ) -> bool
pub fn tide_offload_stats( &self, residency: Option<&MoeResidencyStats>, ) -> TideOffloadStats
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MoeOffloadState
impl RefUnwindSafe for MoeOffloadState
impl Send for MoeOffloadState
impl Sync for MoeOffloadState
impl Unpin for MoeOffloadState
impl UnsafeUnpin for MoeOffloadState
impl UnwindSafe for MoeOffloadState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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