From f15ea66b3006ac3b6ea1571248c07f7b35916dd2 Mon Sep 17 00:00:00 2001 From: djramic Date: Fri, 21 Aug 2026 22:06:19 +0200 Subject: [PATCH] [ROCm][Test] Use platform FP8 dtype in ModelOpt FP8_PB_WO test (#53268) Signed-off-by: Djordje Ramic --- tests/quantization/test_modelopt.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/quantization/test_modelopt.py b/tests/quantization/test_modelopt.py index 7225642259..052462f7f3 100644 --- a/tests/quantization/test_modelopt.py +++ b/tests/quantization/test_modelopt.py @@ -508,10 +508,11 @@ def test_modelopt_fp8_pb_wo_checkpoint_setup(default_vllm_config, vllm_runner): assert isinstance(gate_up_proj.quant_method, ModelOptFp8PbWoLinearMethod) assert isinstance(down_proj.quant_method, ModelOptFp8PbWoLinearMethod) - assert qkv_proj.weight.dtype == torch.float8_e4m3fn - assert o_proj.weight.dtype == torch.float8_e4m3fn - assert gate_up_proj.weight.dtype == torch.float8_e4m3fn - assert down_proj.weight.dtype == torch.float8_e4m3fn + fp8_dtype = current_platform.fp8_dtype() + assert qkv_proj.weight.dtype == fp8_dtype + assert o_proj.weight.dtype == fp8_dtype + assert gate_up_proj.weight.dtype == fp8_dtype + assert down_proj.weight.dtype == fp8_dtype # Block scales; should be materialized as a 2D [out_blk, in_blk] tensor. assert hasattr(qkv_proj, "weight_scale")