pub struct LinearAttentionScratch {Show 16 fields
pub x_norm: DevicePtr,
pub dt_raw: DevicePtr,
pub b_raw: DevicePtr,
pub qkv: DevicePtr,
pub qkv_smooth: DevicePtr,
pub z: DevicePtr,
pub gate: DevicePtr,
pub beta: DevicePtr,
pub y: DevicePtr,
pub y_norm: DevicePtr,
pub out: DevicePtr,
pub x_resid: DevicePtr,
pub x_norm2: DevicePtr,
pub gate_act: DevicePtr,
pub up_act: DevicePtr,
pub x_final: DevicePtr,
}Expand description
Per-call scratch buffers for the linear-attention forward.
Fields§
§x_norm: DevicePtr§dt_raw: DevicePtr§b_raw: DevicePtr§qkv: DevicePtr§qkv_smooth: DevicePtr§z: DevicePtr§gate: DevicePtrFP32 [num_state_heads].
beta: DevicePtrFP32 [num_state_heads].
y: DevicePtr§y_norm: DevicePtr§out: DevicePtr§x_resid: DevicePtr§x_norm2: DevicePtr§gate_act: DevicePtr§up_act: DevicePtr§x_final: DevicePtrAuto Trait Implementations§
impl Freeze for LinearAttentionScratch
impl RefUnwindSafe for LinearAttentionScratch
impl Send for LinearAttentionScratch
impl Sync for LinearAttentionScratch
impl Unpin for LinearAttentionScratch
impl UnwindSafe for LinearAttentionScratch
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