conv1d_update_l2norm_strided

Function conv1d_update_l2norm_strided 

Source
pub fn conv1d_update_l2norm_strided(
    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,
    input_stride: u32,
    output_stride: u32,
    stream: u64,
) -> Result<()>
Expand description

conv1d_update_l2norm with INDEPENDENT input/output row strides, so N concurrent decode sequences go in ONE launch instead of N.

Identical math to conv1d_update_l2norm; the only difference is that the input and output row strides are passed explicitly instead of both being assumed equal to d_inner. The concurrent-decode path feeds this straight from the QKVZ projection, whose rows are qkvz_size apart, while the conv output is d_inner-strided — so the non-strided kernel would read sequence b>=1 from the previous sequence’s Z-gate region (correct at n=1, silently corrupt at n>=2). See causal_conv1d_update_l2norm_f32_strided.

conv_state keeps the (b * d_inner + ch) * d_conv layout, so the caller must have verified the per-sequence pool slots are contiguous.