prefill_attention_512_sink

Function prefill_attention_512_sink 

Source
pub fn prefill_attention_512_sink(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    q: DevicePtr,
    k: DevicePtr,
    v: DevicePtr,
    output: DevicePtr,
    seq_len: u32,
    batch: u32,
    num_q_heads: u32,
    num_kv_heads: u32,
    head_dim: u32,
    inv_sqrt_d: f32,
    causal: bool,
    sliding_window: u32,
    sinks: DevicePtr,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: prefill_attention for the deepseek-v4-flash attn_prefill_512 kernel (HDIM 512, 16 query rows per block) with a per-head sink logit: sinks is FP32 [num_q_heads], added to the softmax denominator only. DevicePtr::NULL means no sink.