From 04d6fb4d6c5ea9a2fe2ab27d8ccfb8f16e9e678e Mon Sep 17 00:00:00 2001 From: YC Yen-Ching Tseng Date: Thu, 30 Jul 2026 17:43:27 +0800 Subject: [PATCH] [AMD] Minimax-M3 : unblock mxfp8 block convert on gfx950 (#32036) --- python/sglang/srt/layers/quantization/fp8.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/python/sglang/srt/layers/quantization/fp8.py b/python/sglang/srt/layers/quantization/fp8.py index 1472a76fe..8852ed38a 100644 --- a/python/sglang/srt/layers/quantization/fp8.py +++ b/python/sglang/srt/layers/quantization/fp8.py @@ -117,7 +117,13 @@ _is_fp8_fnuz = is_fp8_fnuz() _is_gfx95_supported = is_gfx95_supported() # gfx942 (MI300) has no MX matmul HW; MXFP8 checkpoints are converted to # block-fp8 [128,128] at load and run through the native block-fp8 kernels. -_mxfp8_to_block_fp8_required = mxfp8_block_convert_required() +# SGLANG_FORCE_MXFP8_BLOCK_CONVERT=1 opts into that same block-fp8 path on +# gfx950 (MI35x): it routes the fp8 GEMMs / fused MoE through the mature aiter +# block-scale kernels instead of the native MX dot_scaled path (measured +20% +# throughput at equal accuracy on MiniMax-M3, GSM8K 0.9719 vs 0.9689). +_mxfp8_to_block_fp8_required = mxfp8_block_convert_required() or get_bool_env_var( + "SGLANG_FORCE_MXFP8_BLOCK_CONVERT" +) _use_hip_int4 = get_bool_env_var("SGLANG_INT4_WEIGHT") and _is_hip _use_aiter = envs.SGLANG_USE_AITER.get() and _is_hip _is_shuffle_moe_mxfp4 = is_gfx95_supported()