vllm.model_executor.kernels.linear.mxfp4.rdna3_hip
¶
MXFP4 linear kernel for RDNA3/RDNA3.5 (gfx11) with an int8-activation decode path.
Routes on the number of activation rows M
1 <= M <= MAX_W4A8_BATCH_SIZE (decode, speculative verify):
HIP W4A8 GEMV (_rocm_C.mxfp4_w4a8_gemv_rdna3). Activations are quantized
to int8 per 32-element group and reduced with int8 dot instructions.
otherwise (prefill, profiling):
dequantize the weight and run a high-precision GEMM on the unquantized
activations (weight-only).
Both paths read the checkpoint layout directly ([N, K/2] uint8 E2M1 codes, [N, K/32] uint8 E8M0 scales), so there is no weight repack.
Selected when int8 activations are requested, e.g. with
--quantization-config.linear.activation int8_per_group_32. For W4A4
checkpoints this replaces the MXFP4 activation QDQ: decode uses int8
activations and prefill uses the model dtype, which kept accuracy where mixing
MXFP4-QDQ prefill with int8 decode did not.
Classes:
-
Rdna3W4A8MxFp4LinearKernel–MXFP4 GEMM for RDNA3/RDNA3.5: W4A8 int8-dot GEMV for M <= 8, dequant +
Rdna3W4A8MxFp4LinearKernel
¶
Bases: MxFp4LinearKernel
MXFP4 GEMM for RDNA3/RDNA3.5: W4A8 int8-dot GEMV for M <= 8, dequant + high-precision GEMM above.