pub struct KdaDeviceState {
pub conv: DevicePtr,
pub recurrent: DevicePtr,
}Expand description
Device-resident conv + recurrent. Seed once; decode does not D2H them.
Host KdaState remains the CPU oracle. Certified tok/s must use this,
not launch_k3_kda_decode_token (that path uploads ~6.3 MB/layer/token
at production width).
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