pub struct K3CpuFallbackState {
pub cache: LayerCache,
pub device_kda: Option<KdaDeviceState>,
pub device_mla: Option<MlaDeviceKv>,
}Expand description
Mixer state owned by one sequence; released through the layer release hook.
Fields§
§cache: LayerCache§device_kda: Option<KdaDeviceState>Authoritative recurrence after the first CUDA token; host cache is a seed.
device_mla: Option<MlaDeviceKv>Authoritative MLA KV after the first CUDA token; host cache is a seed.
Implementations§
Source§impl K3CpuFallbackState
impl K3CpuFallbackState
pub fn new(cache: LayerCache) -> Self
pub fn ensure_device_kda(&mut self, gpu: &dyn GpuBackend) -> Result<()>
pub fn ensure_device_mla( &mut self, gpu: &dyn GpuBackend, cfg: &MlaConfig, cap: usize, ) -> Result<()>
pub fn snapshot(&self, gpu: &dyn GpuBackend, stream: u64) -> Result<Vec<u8>>
pub fn restore( &mut self, gpu: &dyn GpuBackend, bytes: &[u8], stream: u64, ) -> Result<()>
pub fn release(&mut self, gpu: &dyn GpuBackend) -> Result<()>
Trait Implementations§
Source§impl LayerState for K3CpuFallbackState
impl LayerState for K3CpuFallbackState
Auto Trait Implementations§
impl Freeze for K3CpuFallbackState
impl RefUnwindSafe for K3CpuFallbackState
impl Send for K3CpuFallbackState
impl Sync for K3CpuFallbackState
impl Unpin for K3CpuFallbackState
impl UnwindSafe for K3CpuFallbackState
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