prefill_attention_paged_bf16k_turbo3v_64

Function prefill_attention_paged_bf16k_turbo3v_64 

Source
pub fn prefill_attention_paged_bf16k_turbo3v_64(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    q: DevicePtr,
    k_cache: DevicePtr,
    v_cache: DevicePtr,
    output: DevicePtr,
    block_table: DevicePtr,
    q_len: u32,
    kv_len: u32,
    q_offset: u32,
    num_q_heads: u32,
    num_kv_heads: u32,
    head_dim: u32,
    cache_block_size: u32,
    sliding_window: u32,
    inv_sqrt_d: f32,
    v_block_stride_bytes: u64,
    v_data_section_bytes: u64,
    stream: u64,
) -> Result<()>
Expand description

Paged prefill (BR=64) for Bf16K + Turbo3V asymmetric KV cache.

Reads K as BF16 (NHD contiguous) and V as 3-bit Lloyd-Max packed bytes with FP8 per-group scale. Uses the asym prefill compute template (prefill_paged_compute_asym.cuh) which takes separate LOAD_K_TILE + LOAD_V_TILE macros — bf16 cp.async for K, sync dequant for V.

Kernel: inferspark_prefill_paged_bf16k_turbo3v_64(Q, K_cache, V_cache, O, block_table, q_len, kv_len, q_offset, num_q_heads, num_kv_heads, head_dim, cache_block_size, sliding_window, causal_mask_enabled, inv_sqrt_d, v_block_stride_bytes, v_data_section_bytes) Grid: (num_q_heads, div_ceil(q_len, BR), 1) Block: (256, 1, 1)