dense_gemv_ba_gates

Function dense_gemv_ba_gates 

Source
pub fn dense_gemv_ba_gates(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    input: DevicePtr,
    ba_weight: &DenseWeight,
    a_log: DevicePtr,
    dt_bias: DevicePtr,
    gate_out: DevicePtr,
    beta_out: DevicePtr,
    n: u32,
    k: u32,
    vheads_per_group: u32,
    stream: u64,
) -> Result<()>
Expand description

Fused BA projection + GDN gates: dense GEMV + gate/beta transforms.

Combines dense_gemv(input, ba_weight, ba_out, N, K) and compute_gdn_gates(ba_out, a_log, dt_bias, gate, beta) into a single kernel, eliminating the intermediate ba_out buffer and one graph node.

Kernel: dense_gemv_ba_gates(A, B, A_log, dt_bias, gate, beta, N, K, vpg) Grid: (ceil(N/4), 1, 1) Block: (256, 1, 1)