conv1d_update_l2norm

Function conv1d_update_l2norm 

Source
pub fn conv1d_update_l2norm(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    conv_state: DevicePtr,
    input: DevicePtr,
    weight: &DenseWeight,
    output: DevicePtr,
    d_inner: u32,
    d_conv: u32,
    batch_size: u32,
    qk_channels: u32,
    head_dim: u32,
    l2_eps: f32,
    stream: u64,
) -> Result<()>
Expand description

Fused conv1d update + SiLU + L2 normalization for Q/K channels.

Combines causal_conv1d_update and l2_norm_bf16 into a single kernel. Q+K channels (0..qk_channels) get L2-normalized per head after SiLU. V channels (qk_channels..d_inner) get SiLU only.

Saves 1 kernel launch per SSM layer (36 launches/step for 35B/80B).