vllm.models.deepseek_v4.amd.silu_and_mul_mxfp8
¶
SiLU-and-mul (optionally clamped) fused with the MXFP8 quant of its output.
On gfx950 the MXFP8 linear after the shared expert's activation quantizes the
bf16 activation in a separate launch; this writes the e4m3 values and row-major
[M, D / 32] E8M0 scales directly, bit-identical to SiluAndMul /
SiluAndMulWithClamp followed by mxfp8_e4m3_quantize.
Functions:
-
silu_and_mul_mxfp8–[M, 2 * D]gate/up -> MXFP8[M, D]e4m3 values and[M, D / 32]
_config(num_tokens, d)
¶
(BLOCK_M, BLOCK_N, num_warps), tuned on MI355X for d = 2304.
Source code in vllm/models/deepseek_v4/amd/silu_and_mul_mxfp8.py
silu_and_mul_mxfp8(x, swiglu_limit)
¶
[M, 2 * D] gate/up -> MXFP8 [M, D] e4m3 values and [M, D / 32]
uint8 E8M0 scales of silu(clamp(gate)) * clamp(up).