[XPU] fix online fp8_per_channel quantization (#56027)
Signed-off-by: Yan Ma <yan.ma@intel.com>
This commit is contained in:
@@ -25,5 +25,7 @@ steps:
|
||||
- >-
|
||||
bash .buildkite/scripts/hardware_ci/run-intel-test.sh
|
||||
'VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s tests/quantization/test_per_token_kv_cache.py --deselect="tests/quantization/test_per_token_kv_cache.py::test_triton_unified_attention_per_token_head_scale[int4-16-128-num_heads0-seq_lens1]"
|
||||
&& VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s tests/quantization/test_auto_awq.py'
|
||||
&& VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s tests/quantization/test_auto_awq.py
|
||||
&& VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s tests/quantization/test_fp8_per_channel.py
|
||||
&& VLLM_TEST_FORCE_LOAD_FORMAT=auto pytest -v -s tests/models/quantization/test_fp8_per_channel.py --deselect="tests/models/quantization/test_fp8_per_channel.py::test_fp8_per_channel_logprobs[moe]"'
|
||||
|
||||
|
||||
@@ -61,7 +61,9 @@ def test_scaled_fp8_quant_per_channel_shape() -> None:
|
||||
weight to `ops.scaled_fp8_quant` with `use_per_token_if_dynamic=True`
|
||||
yields one scale per output row -- a [N, 1] fp32 tensor.
|
||||
"""
|
||||
x = (torch.randn(size=(96, 256), device="cuda") * 13).to(torch.bfloat16)
|
||||
x = (torch.randn(size=(96, 256), device=current_platform.device_type) * 13).to(
|
||||
torch.bfloat16
|
||||
)
|
||||
y, s = ops.scaled_fp8_quant(x, scale=None, use_per_token_if_dynamic=True)
|
||||
assert y.shape == (96, 256)
|
||||
assert y.dtype == current_platform.fp8_dtype()
|
||||
|
||||
@@ -123,6 +123,7 @@ class XPUPlatform(Platform):
|
||||
"mxfp8",
|
||||
"fp8_per_tensor",
|
||||
"fp8_per_block",
|
||||
"fp8_per_channel",
|
||||
"online",
|
||||
"gpt_oss_mxfp4",
|
||||
"modelopt",
|
||||
|
||||
Reference in New Issue
Block a user