mla_cache_assemble

Function mla_cache_assemble 

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

2026-09-25: Assemble one token’s cache entries: K = [kv_latent | k_rope] and V = [kv_latent | zeros], each mla_cache_dim wide. The block has one thread per element (max(mla_cache_dim, 256) threads).