[AMD][CI][BugFix] Fix Distributed Compile Unit Tests (2xH100-2xMI300) group (#43120)
Signed-off-by: Randall Smith <Randall.Smith@amd.com>
This commit is contained in:
@@ -29,6 +29,7 @@ from vllm.distributed.parallel_state import (
|
||||
initialize_model_parallel,
|
||||
)
|
||||
from vllm.platforms import current_platform
|
||||
from vllm.utils.network_utils import get_open_port
|
||||
from vllm.utils.system_utils import update_environment_variables
|
||||
from vllm.utils.torch_utils import set_random_seed
|
||||
|
||||
@@ -234,8 +235,20 @@ class TestAGCutlassScaledMMModel(_BaseScaledMMModel):
|
||||
TestAGMMModel,
|
||||
TestScaledMMRSModel,
|
||||
TestAGScaledMMModel,
|
||||
TestCutlassScaledMMRSModel,
|
||||
TestAGCutlassScaledMMModel,
|
||||
pytest.param(
|
||||
TestCutlassScaledMMRSModel,
|
||||
marks=pytest.mark.skipif(
|
||||
not hasattr(torch.ops._C, "cutlass_scaled_mm"),
|
||||
reason="Requires cutlass_scaled_mm",
|
||||
),
|
||||
),
|
||||
pytest.param(
|
||||
TestAGCutlassScaledMMModel,
|
||||
marks=pytest.mark.skipif(
|
||||
not hasattr(torch.ops._C, "cutlass_scaled_mm"),
|
||||
reason="Requires cutlass_scaled_mm",
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
@pytest.mark.parametrize("batch_size", [8])
|
||||
@@ -268,6 +281,7 @@ def test_async_tp_pass_replace(
|
||||
)
|
||||
|
||||
num_processes = 2
|
||||
master_port = str(get_open_port())
|
||||
|
||||
def run_torch_spawn(fn, nprocs):
|
||||
# need to use torch.mp.spawn otherwise will have problems with
|
||||
@@ -282,6 +296,7 @@ def test_async_tp_pass_replace(
|
||||
hidden_size,
|
||||
dtype,
|
||||
dynamic,
|
||||
master_port,
|
||||
),
|
||||
nprocs=nprocs,
|
||||
)
|
||||
@@ -314,6 +329,7 @@ def async_tp_pass_on_test_model(
|
||||
hidden_size: int,
|
||||
dtype: torch.dtype,
|
||||
dynamic: bool,
|
||||
master_port: str = "0",
|
||||
):
|
||||
set_random_seed(0)
|
||||
|
||||
@@ -328,7 +344,7 @@ def async_tp_pass_on_test_model(
|
||||
"LOCAL_RANK": str(local_rank),
|
||||
"WORLD_SIZE": str(world_size),
|
||||
"MASTER_ADDR": "localhost",
|
||||
"MASTER_PORT": "12345",
|
||||
"MASTER_PORT": master_port,
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user