mla_paged_decode_nvfp4

Function mla_paged_decode_nvfp4 

Source
pub fn mla_paged_decode_nvfp4(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    q: DevicePtr,
    k_cache: DevicePtr,
    v_cache: DevicePtr,
    o: DevicePtr,
    block_tables: DevicePtr,
    seq_lens: DevicePtr,
    max_blocks_per_seq: u32,
    num_q_heads: u32,
    num_kv_heads: u32,
    q_head_dim: u32,
    kv_cache_dim: u32,
    block_size: u32,
    inv_sqrt_d: f32,
    block_stride_bytes: u64,
    data_section_bytes: u64,
    num_seqs: u32,
    stream: u64,
) -> Result<()>
Expand description

MLA Paged Decode — NVFP4 variant for DeepSeek-V4-Flash.

Kernel: mla_paged_decode_nvfp4(Q, K_cache, V_cache, O, block_tables, seq_lens, max_blocks_per_seq, num_q_heads, num_kv_heads, q_head_dim, kv_cache_dim, block_size, inv_sqrt_d, block_stride_bytes, data_section_bytes) Grid: (num_q_heads, num_seqs, 1) Block: (256, 1, 1)

V4-Flash uses compressed KV cache (576 dims: 512 latent + 64 rope) and flattened Q layout (32768 dims = 64 heads × 512).