pub struct KdaDeviceState {
pub conv: DevicePtr,
pub recurrent: DevicePtr,
/* private fields */
}Expand description
2026-09-25: One sequence’s KDA conv and recurrent state on the device.
launch_k3_kda_decode_token_on_device updates it in place and copies
only the output back; download copies it to a host KdaState.
launch_k3_kda_decode_token instead uploads and downloads the state
every token; at KdaConfig::production the recurrent state alone is
96 x 128 x 128 FP32, 6.3 MB per layer.
Fields§
§conv: DevicePtr§recurrent: DevicePtrImplementations§
Source§impl KdaDeviceState
impl KdaDeviceState
pub fn alloc_and_upload(gpu: &dyn GpuBackend, host: &KdaState) -> Result<Self>
pub fn download(&self, gpu: &dyn GpuBackend, host: &mut KdaState) -> Result<()>
pub fn free(self, gpu: &dyn GpuBackend) -> Result<()>
Auto Trait Implementations§
impl Freeze for KdaDeviceState
impl RefUnwindSafe for KdaDeviceState
impl Send for KdaDeviceState
impl Sync for KdaDeviceState
impl Unpin for KdaDeviceState
impl UnwindSafe for KdaDeviceState
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