pub fn moe_router_gemm(
gpu: &dyn GpuBackend,
kernel: KernelHandle,
input: DevicePtr,
weight: &DenseWeight,
output: DevicePtr,
m: u32,
n: u32,
k: u32,
stream: u64,
) -> Result<()>Expand description
2026-09-26: The MoE router gate GEMM, C = A @ B^T with the operands of
dense_gemm and its bits (kernel moe_router_gemm_bf16): each output
keeps one FP32 accumulator over k = 0..K-1 in order, but a block stages a
512-wide K slice of 4 weight rows and up to 16 activation rows in shared
memory at once instead of waiting on every 16-wide tile. k must be a
multiple of 16 (below that dense_gemm adds zero padding terms).