pub struct AttnV41LayerState { /* private fields */ }Expand description
One layer’s device state across prefill and decode.
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
The window ring, bf16 [window, hd]: a pointer a captured decode step bakes.
Sourcepub fn free(&mut self, gpu: &dyn GpuBackend) -> Result<()>
pub fn free(&mut self, gpu: &dyn GpuBackend) -> Result<()>
Free the four device buffers this sequence owns and clear the
pointers. Idempotent: gpu.free is null-safe and the taken options
stay None, so a second call frees nothing. Takes &mut self because
the state reaches release_state as &mut dyn LayerState and cannot
be moved out of the box.
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