gated_rms_norm_prefill

Function gated_rms_norm_prefill 

Source
pub fn gated_rms_norm_prefill(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    input: DevicePtr,
    gate: DevicePtr,
    weight: &DenseWeight,
    output: DevicePtr,
    heads_per_token: u32,
    head_dim: u32,
    eps: f32,
    num_actual_tokens: u32,
    input_token_stride: u32,
    gate_token_stride: u32,
    stream: u64,
) -> Result<()>
Expand description

Batched gated RMS norm for prefill: all (head, actual_token) pairs in one launch.

Grid: (heads_per_token, num_actual_tokens, 1) Block: (min(head_dim, 1024), 1, 1)