moe_w8a8_grouped_gemm

Function moe_w8a8_grouped_gemm 

Source
pub fn moe_w8a8_grouped_gemm(
    gpu: &dyn GpuBackend,
    kernel: KernelHandle,
    a_fp8: DevicePtr,
    a_scale: DevicePtr,
    weight_ptrs: DevicePtr,
    scale_ptrs: DevicePtr,
    output: DevicePtr,
    expert_offsets: DevicePtr,
    sorted_token_ids: DevicePtr,
    num_experts: u32,
    n: u32,
    k: u32,
    max_m_tiles: u32,
    stream: u64,
) -> Result<()>
Expand description

W8A8 + FP32 epilogue grouped MoE GEMM (vLLM-equivalent).

A_fp8 must be pre-quantized via per_token_group_quant_fp8. Both a_scale (per-token, FP32) and b_scale (per-block, BF16) are applied in the FP32 epilogue per K=128 block.