[Hardware][Power] Enable W4A16 (AWQ & GPTQ) quantization on POWER10 using VSX (#59149)

Signed-off-by: Rukhaiya <bibirukhaiya123@gmail.com>
Co-authored-by: Li, Jiang <jiang1.li@intel.com>
This commit is contained in:
Rukhaiya2004
2026-09-30 19:44:48 +08:00
committed by GitHub
co-authored by Li, Jiang <jiang1.li@intel.com>
parent 863475eb9c
commit 72e7874fa6
7 changed files with 99 additions and 9 deletions
+12 -2
View File
@@ -3,7 +3,7 @@
import pytest
import torch
from vllm.platforms import current_platform
from vllm.platforms import CpuArchEnum, current_platform
if not current_platform.is_cpu():
pytest.skip("skipping CPU-only tests", allow_module_level=True)
@@ -54,7 +54,7 @@ def test_cpu_gemm_wna16_3d_input():
MODELS = [
"TheBloke/TinyLlama-1.1B-Chat-v1.0-AWQ",
"Qwen/Qwen1.5-0.5B-Chat-GPTQ-Int4",
"Qwen/Qwen1.5-0.5B-Chat-GPTQ-Int4", # without g_idx
"RedHatAI/Qwen3-1.7B-quantized.w4a16", # with zp
"OPEA/Qwen2.5-0.5B-Instruct-int4-sym-inc",
"Qwen/Qwen3-0.6B-FP8", # FP8 W8A16 block-quantized linear
@@ -67,6 +67,16 @@ MODELS = [
DTYPE = ["bfloat16"]
@pytest.mark.skipif(
current_platform.get_cpu_architecture() != CpuArchEnum.POWERPC,
reason="PowerPC-only test",
)
def test_cpu_wna16_power_bf16_uses_vsx():
"""Use the POWER10 BF16 MMA microkernel instead of generic vectors."""
assert _get_isa_hint(torch.bfloat16) == "vsx"
assert _get_isa_hint(torch.float16) == "vec"
@pytest.mark.parametrize("model", MODELS)
@pytest.mark.parametrize("dtype", DTYPE)
def test_cpu_quant(vllm_runner, model, dtype):