reshape_and_cache_bf16k_turbo3v

Function reshape_and_cache_bf16k_turbo3v 

Source
pub fn reshape_and_cache_bf16k_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,
    v_block_stride_bytes: u64,
    v_data_section_bytes: u64,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: Write K and V to the BF16-K / Turbo3V cache (kernel reshape_and_cache_flash_bf16k_turbo3v): K as raw BF16, V as 3-bit Lloyd-Max codes (3/8 byte per element) plus one FP8 scale per 16 elements. v_data_section_bytes is the size of a V block’s code section, after which its scales start.