From 8c011da6d0a45f2c9316ea3c658da754f770a178 Mon Sep 17 00:00:00 2001 From: Chaojun Zhang Date: Wed, 12 Aug 2026 16:57:22 +0800 Subject: [PATCH] [XPU] Route block-quantized FP8 weights to the W8A8 kernel (#50787) Signed-off-by: Chaojun Zhang --- .buildkite/intel_jobs/test-intel.yaml | 3 ++- .../compressed_tensors/compressed_tensors.py | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.buildkite/intel_jobs/test-intel.yaml b/.buildkite/intel_jobs/test-intel.yaml index 22b6d46cb8..d421e53eae 100644 --- a/.buildkite/intel_jobs/test-intel.yaml +++ b/.buildkite/intel_jobs/test-intel.yaml @@ -196,7 +196,8 @@ steps: - >- bash .buildkite/scripts/hardware_ci/run-intel-test.sh 'cd tests && - pytest -v -s quantization/test_compressed_tensors.py::test_compressed_tensors_fp8' + pytest -v -s quantization/test_compressed_tensors.py::test_compressed_tensors_fp8 && + pytest -v -s quantization/test_compressed_tensors.py::test_compressed_tensors_fp8_block_enabled' - label: "XPU Graph" depends_on: - image-build-xpu diff --git a/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py b/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py index 473cad8741..9be801225a 100644 --- a/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py +++ b/vllm/model_executor/layers/quantization/compressed_tensors/compressed_tensors.py @@ -817,6 +817,15 @@ class CompressedTensorsConfig(QuantizationConfig): is_fp8_w8a8_supported = config is not None and ( config.kernel_config.linear_backend in ("xpu", "torch") ) + weight_quant_is_block_strategy = ( + weight_quant + and weight_quant.strategy == QuantizationStrategy.BLOCK + ) + if weight_quant_is_block_strategy and not is_fp8_w8a8_supported: + # On XPU, block quantized weights always use the + # W8A8 kernel, due to lack of w8a16 support. + is_fp8_w8a8_supported = True + else: is_fp8_w8a8_supported = self._check_scheme_supported( CompressedTensorsW8A8Fp8.get_min_capability(), error=False