mla_paged_decode_fp8

Function mla_paged_decode_fp8 

Source
pub fn mla_paged_decode_fp8(
    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,
    k_scale: f32,
    v_scale: f32,
    cache_stride: u64,
    num_seqs: u32,
    sliding_window: u32,
    sinks: DevicePtr,
    comp_pool: DevicePtr,
    comp_block_count: u32,
    stream: u64,
) -> Result<()>
Expand description

MLA Paged Decode — FP8 variant for DeepSeek-V4-Flash with FP8 KV cache.

Kernel: mla_paged_decode_fp8(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, k_scale, v_scale, cache_stride) Grid: (num_q_heads, num_seqs, 1) Block: (256, 1, 1)

V4-Flash uses compressed KV cache (576 dims: 512 latent + 64 rope) and FP8 quantization with per-layer scales.