mla_cache_assemble_batched

Function mla_cache_assemble_batched 

Source
pub fn mla_cache_assemble_batched(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    kv_latent: DevicePtr,
    k_rope: DevicePtr,
    k_cache: DevicePtr,
    v_cache: DevicePtr,
    num_tokens: u32,
    kv_lora: u32,
    rope: u32,
    mla_cache_dim: u32,
    stream: u64,
) -> Result<()>
Expand description

Batched MLA cache assembly for N tokens: K=[latent|rope], V=[latent|zeros]. 1 kernel replaces N*4 D2D copies+memsets per layer.