reshape_and_cache_nvfp4

Function reshape_and_cache_nvfp4 

Source
pub fn reshape_and_cache_nvfp4(
    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,
    block_stride_bytes: u64,
    data_section_bytes: u64,
    stream: u64,
) -> Result<()>
Expand description

Write K/V to paged NVFP4 cache (E2M1 data + per-group FP8 scales).

Kernel: reshape_and_cache_flash_nvfp4(key, value, k_cache, v_cache, slot_mapping, num_kv_heads, head_dim, block_size, key_stride, value_stride, block_stride_bytes, data_section_bytes) Grid: (num_tokens, 1, 1) Block: (256, 1, 1)