[XPU] Route block-quantized FP8 weights to the W8A8 kernel (#50787)

Signed-off-by: Chaojun Zhang <chaojun.zhang@intel.com>
This commit is contained in:
Chaojun Zhang
2026-08-12 16:57:22 +08:00
committed by GitHub
parent aeece10c06
commit 8c011da6d0
2 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -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
@@ -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