gdn_verify_fused_norm_k2

Function gdn_verify_fused_norm_k2 

Source
pub fn gdn_verify_fused_norm_k2(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    gdn_out: DevicePtr,
    deint: DevicePtr,
    weight: &DenseWeight,
    output: DevicePtr,
    num_v_heads: u32,
    hidden_size: u32,
    eps: f32,
    deint_stride: u32,
    z_offset: u32,
    out_stride: u32,
    stream: u64,
) -> Result<()>
Expand description

STAGE 1 fused K=2 MTP-verify gated-RMS-norm: both draft positions in one launch (replaces the per-token gated_rms_norm ×2). The Z gate is read from the deinterleaved [Q|K|V|Z] buffer at z_offset per position.

Bit-identical to the per-token path (proven by gdn_verify_fused_microtest, cos == 1.0).

Kernel: gdn_verify_fused_norm_k2(gdn_out, deint, weight, output, hidden_size, eps, deint_stride, z_offset, out_stride) Grid: (num_v_heads, 2, 1) Block: (hidden_size, 1, 1)