pub struct AttnV41LayerState { /* private fields */ }Expand description
2026-09-25: One sequence’s attention state for one layer, across prefill
and decode: the bf16 window ring [window, hd]; on kv sources also the
compressor’s partial group (f32 kv and score, [ratio, hd] each, used at
ratio > 1), the bf16 latent cache [max_seq / ratio, hd] and the bf16
index-key cache [max_seq / ratio, index_hd].
Implementations§
Source§impl AttnV41LayerState
impl AttnV41LayerState
pub fn new( gpu: &dyn GpuBackend, c: &AttnV41Cfg, role: LayerRole, ) -> Result<Self>
Sourcepub fn window(&self) -> DevicePtr
pub fn window(&self) -> DevicePtr
2026-09-25: The window ring, bf16 [window, hd]: a pointer the captured
decode steps bake.
Sourcepub fn free(&mut self, gpu: &dyn GpuBackend) -> Result<()>
pub fn free(&mut self, gpu: &dyn GpuBackend) -> Result<()>
2026-09-25: Free this sequence’s device buffers (the window ring and,
on kv sources, the two compressor-state buffers and both caches) and
clear the pointers. A second call frees nothing: the window is NULL
(GpuBackend::free ignores NULL) and the options are None.
Auto Trait Implementations§
impl Freeze for AttnV41LayerState
impl RefUnwindSafe for AttnV41LayerState
impl Send for AttnV41LayerState
impl Sync for AttnV41LayerState
impl Unpin for AttnV41LayerState
impl UnwindSafe for AttnV41LayerState
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