From 070c811d6f74c55302557878f5982411a3346b4d Mon Sep 17 00:00:00 2001 From: Ryan Rock Date: Thu, 29 Jan 2026 23:39:53 -0600 Subject: [PATCH] [CI][AMD] Skip 4 GPUs testgroup ray tests (#33305) Signed-off-by: Ryan Rock Co-authored-by: TJian --- examples/offline_inference/rlhf_colocate.py | 5 +++++ tests/distributed/test_utils.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/examples/offline_inference/rlhf_colocate.py b/examples/offline_inference/rlhf_colocate.py index 360fd79b55..241aa0ad8a 100644 --- a/examples/offline_inference/rlhf_colocate.py +++ b/examples/offline_inference/rlhf_colocate.py @@ -30,6 +30,7 @@ https://docs.ray.io/en/latest/placement-groups.html import gc import os +import sys import ray import torch @@ -40,6 +41,10 @@ from torch.multiprocessing.reductions import reduce_tensor from vllm import LLM +if torch.version.hip is not None: + print("Skipping test for ROCm. Ray is unsupported on vLLM ROCm.") + sys.exit(0) + class MyLLM(LLM): """Configure the vLLM worker for Ray placement group execution. diff --git a/tests/distributed/test_utils.py b/tests/distributed/test_utils.py index 8289f697fe..526b6749d1 100644 --- a/tests/distributed/test_utils.py +++ b/tests/distributed/test_utils.py @@ -10,6 +10,7 @@ import torch import vllm.envs as envs from vllm.distributed.device_communicators.pynccl import PyNcclCommunicator from vllm.distributed.utils import StatelessProcessGroup +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 cuda_device_count_stateless @@ -32,6 +33,8 @@ class _CUDADeviceCountStatelessTestActor: def test_cuda_device_count_stateless(): """Test that cuda_device_count_stateless changes return value if CUDA_VISIBLE_DEVICES is changed.""" + if current_platform.is_rocm(): + pytest.skip("Skip for ROCm because Ray uses HIP_VISIBLE_DEVICES.") actor = _CUDADeviceCountStatelessTestActor.options( # type: ignore num_gpus=2 ).remote()