diff --git a/python/sglang/srt/layers/quantization/fp8_kernel.py b/python/sglang/srt/layers/quantization/fp8_kernel.py index f9eb59aa4..2c5f06b62 100644 --- a/python/sglang/srt/layers/quantization/fp8_kernel.py +++ b/python/sglang/srt/layers/quantization/fp8_kernel.py @@ -1166,7 +1166,9 @@ def get_w8a8_block_fp8_configs( sanitized = {} clamped_ms = [] for m_key, cfg in raw.items(): - if cfg["BLOCK_SIZE_K"] < block_k: + if cfg["BLOCK_SIZE_K"] < block_k and ( + not _is_cuda or block_k % cfg["BLOCK_SIZE_K"] != 0 + ): clamped_ms.append((m_key, cfg["BLOCK_SIZE_K"])) cfg = {**cfg, "BLOCK_SIZE_K": block_k} sanitized[m_key] = cfg