From 4cfcc0866f233c0f223b78eaa205f936d5522324 Mon Sep 17 00:00:00 2001 From: Charlie Fu Date: Thu, 14 May 2026 16:37:18 -0500 Subject: [PATCH] [CI][ROCm] Remove unsupported cases in test_fusion.py (#38680) Signed-off-by: charlifu --- tests/compile/passes/test_fuse_act_padding.py | 8 +++----- tests/compile/passes/test_fusion.py | 2 -- .../model_executor/layers/quantization/utils/fp8_utils.py | 6 +++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/compile/passes/test_fuse_act_padding.py b/tests/compile/passes/test_fuse_act_padding.py index bfbe762abd..41ae22501d 100644 --- a/tests/compile/passes/test_fuse_act_padding.py +++ b/tests/compile/passes/test_fuse_act_padding.py @@ -7,7 +7,7 @@ import torch import vllm.config from tests.compile.backend import TestBackend -from vllm._aiter_ops import is_aiter_found_and_supported, rocm_aiter_ops +from vllm._aiter_ops import rocm_aiter_ops from vllm.compilation.passes.utility.noop_elimination import NoOpEliminationPass from vllm.compilation.passes.utility.post_cleanup import PostCleanupPass from vllm.config import ( @@ -72,9 +72,8 @@ class TestModel(torch.nn.Module): @pytest.mark.parametrize("hidden_size", [2880]) @pytest.mark.parametrize("num_local_experts", [128]) @pytest.mark.parametrize("x_pad_to_multiple", [256]) -@pytest.mark.skipif( - not is_aiter_found_and_supported(), - reason="Only test on ROCm with AITER installed and supported", +@pytest.mark.skip( + reason="Skipping for now because of the accuracy issue. See: https://github.com/ROCm/aiter/issues/2614" ) def test_fuse_act_padding( dtype: torch.dtype, @@ -116,7 +115,6 @@ def test_fuse_act_padding( x = torch.rand(1, hidden_size) torch._dynamo.mark_dynamic(x, 0) - outputs_unfused = model(x) model_fused = torch.compile(model, backend=backend) diff --git a/tests/compile/passes/test_fusion.py b/tests/compile/passes/test_fusion.py index 40f07549f0..a13ee94f61 100644 --- a/tests/compile/passes/test_fusion.py +++ b/tests/compile/passes/test_fusion.py @@ -99,8 +99,6 @@ KERNEL_GROUPSHAPE_COMBINATIONS = ( # For Aiter tests we toggle use_aiter_quant_op AITER_KERNEL_GROUPSHAPE_COMBINATIONS = [ - # Per-token with ROCmFP8ScaledMMLinearKernel - (ROCmFP8ScaledMMLinearKernel, GroupShape.PER_TENSOR, False), # Per-token with RowWiseTorchFP8ScaledMMLinearKernel (RowWiseTorchFP8ScaledMMLinearKernel, GroupShape.PER_TOKEN, True), (RowWiseTorchFP8ScaledMMLinearKernel, GroupShape.PER_TOKEN, False), diff --git a/vllm/model_executor/layers/quantization/utils/fp8_utils.py b/vllm/model_executor/layers/quantization/utils/fp8_utils.py index 7a54620c25..a5029a3ae6 100644 --- a/vllm/model_executor/layers/quantization/utils/fp8_utils.py +++ b/vllm/model_executor/layers/quantization/utils/fp8_utils.py @@ -1245,7 +1245,7 @@ def process_fp8_weight_tensor_strategy( requantize_with_max_scale, ) - if current_platform.is_fp8_fnuz(): + if current_platform.is_fp8_fnuz() and weight.dtype == torch.float8_e4m3fn: weight, weight_scale, input_scale = normalize_e4m3fn_to_e4m3fnuz( weight=weight, weight_scale=weight_scale, input_scale=input_scale ) @@ -1271,7 +1271,7 @@ def process_fp8_weight_channel_strategy( normalize_e4m3fn_to_e4m3fnuz, ) - if current_platform.is_fp8_fnuz(): + if current_platform.is_fp8_fnuz() and weight.dtype == torch.float8_e4m3fn: weight, weight_scale, input_scale = normalize_e4m3fn_to_e4m3fnuz( weight=weight, weight_scale=weight_scale, input_scale=input_scale ) @@ -1288,7 +1288,7 @@ def process_fp8_weight_block_strategy( normalize_e4m3fn_to_e4m3fnuz, ) - if current_platform.is_fp8_fnuz(): + if current_platform.is_fp8_fnuz() and weight.dtype == torch.float8_e4m3fn: weight, weight_scale, _ = normalize_e4m3fn_to_e4m3fnuz( weight=weight, weight_scale=weight_scale )