[ROCm][Test] Use platform FP8 dtype in ModelOpt FP8_PB_WO test (#53268)

Signed-off-by: Djordje Ramic <djoramic@amd.com>

djramic committed Aug 21, 2026 at 22:06 UTC f15ea66b3006ac3b6ea1571248c07f7b35916dd2
1 file changed +5 -4
tests/quantization/test_modelopt.py
+5 -4
@@ -508,10 +508,11 @@ def test_modelopt_fp8_pb_wo_checkpoint_setup(default_vllm_config, vllm_runner):
508 assert isinstance(gate_up_proj.quant_method, ModelOptFp8PbWoLinearMethod)
509 assert isinstance(down_proj.quant_method, ModelOptFp8PbWoLinearMethod)
510
511 - assert qkv_proj.weight.dtype == torch.float8_e4m3fn
512 - assert o_proj.weight.dtype == torch.float8_e4m3fn
513 - assert gate_up_proj.weight.dtype == torch.float8_e4m3fn
514 - assert down_proj.weight.dtype == torch.float8_e4m3fn
511 + fp8_dtype = current_platform.fp8_dtype()
512 + assert qkv_proj.weight.dtype == fp8_dtype
513 + assert o_proj.weight.dtype == fp8_dtype
514 + assert gate_up_proj.weight.dtype == fp8_dtype
515 + assert down_proj.weight.dtype == fp8_dtype
516
517 # Block scales; should be materialized as a 2D [out_blk, in_blk] tensor.
518 assert hasattr(qkv_proj, "weight_scale")