ple_gate

Function ple_gate 

Source
pub fn ple_gate(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    hidden: DevicePtr,
    key: DevicePtr,
    value: DevicePtr,
    norm_query_w: DevicePtr,
    norm_key_w: DevicePtr,
    norm_conv_w: DevicePtr,
    gated_out: DevicePtr,
    gated_normed: DevicePtr,
    num_tokens: u32,
    hidden_size: u32,
    hc_mult: u32,
    norm_eps: f32,
    stream: u64,
) -> Result<()>
Expand description

2026-09-25: Gate the n-gram value by the highway, and write both the gated value and its norm_conv output. hidden is the FP32 highway [T, hc*H]; key and value are BF16 projection outputs. Both outputs are FP32, because the chain ends on the FP32 highway (the precision note in ple.cu). One block per token.