pub fn silu_mul_quant_fp8(
gpu: &dyn GpuBackend,
kernel: KernelHandle,
gate: DevicePtr,
up: DevicePtr,
out_fp8: DevicePtr,
a_scale: DevicePtr,
out_bf16: DevicePtr,
m: u32,
k: u32,
stream: u64,
) -> Result<()>Expand description
2026-09-25: SiLU(gate) * up quantized to FP8 E4M3 with one scale per 128-element
group of each row, in one kernel (silu_mul_quant_fp8); the FP8 MoE prefill uses it
before the down projection (moe/forward_prefill_fp8.rs).
out_bf16 may be DevicePtr::NULL; when it is not, the kernel also writes the
post-SiLU BF16 values there. The caller must ensure k % 128 == 0 and
k / 128 <= 16 (the kernel’s SILU_QUANT_MAX_GROUPS).