gdn_decode_wyn

Function gdn_decode_wyn 

Source
pub fn gdn_decode_wyn(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    h_state: DevicePtr,
    query: DevicePtr,
    key: DevicePtr,
    value: DevicePtr,
    gate: DevicePtr,
    beta: DevicePtr,
    output: DevicePtr,
    h_state_inter_base: DevicePtr,
    inter_stride_floats: u32,
    batch_size: u32,
    num_k_heads: u32,
    num_v_heads: u32,
    k_dim: u32,
    v_dim: u32,
    qk_stride: u32,
    v_stride: u32,
    gb_stride: u32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: WY-chunkwise verify decode for K tokens, contiguous form: the launch for gated_delta_rule_wy5 .. wy16 (and their _f16 twins) from gated_delta_rule_wyn.cu, and for gated_delta_rule_wy17. K is compile-time in the kernel, so the kernel handle selects it. The kernel writes Hi_0..Hi_{K-2} and the final H.

Hi_t is at h_state_inter_base + t * inter_stride_floats, plus the per-(b, vh) offset; the stride is in the kernel’s h element size.