From e417dfcce95156e5dafef197606eb41aacbfcc80 Mon Sep 17 00:00:00 2001 From: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com> Date: Tue, 6 Oct 2026 00:02:46 +0800 Subject: [PATCH] [Kernel] Bound segment admission to measured Flash-Next shapes Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com> --- vllm/model_executor/layers/quantization/gguf_dense_hmma.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vllm/model_executor/layers/quantization/gguf_dense_hmma.py b/vllm/model_executor/layers/quantization/gguf_dense_hmma.py index 554845f6f..a2b3efa86 100644 --- a/vllm/model_executor/layers/quantization/gguf_dense_hmma.py +++ b/vllm/model_executor/layers/quantization/gguf_dense_hmma.py @@ -40,7 +40,10 @@ def prepare_segment_bank(projection, canonical, device): reason = "disabled_by_kernel_config" elif source not in _FORMATS: reason = "segment_format_not_supported" - elif not (k in (160, 1536, 2560) and 0 < n <= 4096 and n % 32 == 0): + elif (k, n) not in ( + {(2560, width) for width in (128, 160, 256, 320, 1536, 2560, 3072, 3328, 4096)} + | {(160, 2560), (1536, 2560)} + ): reason = "segment_shape_has_no_calibration" elif projection.output_padding: reason = "segment_output_padding_not_qualified"