reshape_and_cache_turbo4k_turbo3v

Function reshape_and_cache_turbo4k_turbo3v 

Source
pub fn reshape_and_cache_turbo4k_turbo3v(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    key: DevicePtr,
    value: DevicePtr,
    k_cache: DevicePtr,
    v_cache: DevicePtr,
    slot_mapping: DevicePtr,
    num_tokens: u32,
    num_kv_heads: u32,
    head_dim: u32,
    block_size: u32,
    key_stride: u32,
    value_stride: u32,
    k_block_stride_bytes: u64,
    k_data_section_bytes: u64,
    v_block_stride_bytes: u64,
    v_data_section_bytes: u64,
    stream: u64,
) -> Result<()>
Expand description

Write K/V to paged Turbo4K + Turbo3V cache.

K written as turbo4 (4-bit packed + FP8 group scale, matched-norm L2) and V as turbo3 (3-bit packed + FP8 group scale, matched-norm L2). The pools have distinct byte strides — passed independently.