[CI][ROCm] Remove unsupported cases in test_fusion.py (#38680)
Signed-off-by: charlifu <charlifu@amd.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user