gdn_decode_f32_conv_norm

Function gdn_decode_f32_conv_norm 

Source
pub fn gdn_decode_f32_conv_norm(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    h_state: DevicePtr,
    conv_state: DevicePtr,
    new_input: DevicePtr,
    conv_weight: DevicePtr,
    gate: DevicePtr,
    beta: DevicePtr,
    z_gate: DevicePtr,
    norm_weight: DevicePtr,
    output: DevicePtr,
    batch_size: u32,
    num_k_heads: u32,
    num_v_heads: u32,
    k_dim: u32,
    v_dim: u32,
    conv_dim: u32,
    d_conv: u32,
    l2_eps: f32,
    eps: f32,
    stream: u64,
) -> Result<()>
Expand description

Split-v_dim prefill: 2 CTAs per v-head, 64 threads each. FUSED conv1d_update_l2norm + recurrence + gated-RMS-norm decode.

Collapses the per-seq SSM decode chain conv1d_l2norm -> gdn -> gated_norm into one launch (shorter critical path on the chain-depth-bound decode). Race-free per-k-head grid: each block owns k-head kh and its head_repeat v-heads, conv-updating its own q/k AND v conv_state exclusively. Requires head_repeat * v_dim == block, 2*k_dim <= block, k_dim == v_dim.