diff --git a/vllm/executor/ray_utils.py b/vllm/executor/ray_utils.py index e6b05cd378603..0114b200e28d5 100644 --- a/vllm/executor/ray_utils.py +++ b/vllm/executor/ray_utils.py @@ -10,11 +10,7 @@ from vllm.logger import init_logger from vllm.platforms import current_platform from vllm.sequence import ExecuteModelRequest, IntermediateTensors -<<<<<<< HEAD from vllm.utils import get_ip, is_hip -======= -from vllm.utils import get_ip ->>>>>>> unify init logic for all platforms from vllm.worker.worker_base import WorkerWrapperBase logger = init_logger(__name__) @@ -234,31 +230,17 @@ def initialize_ray_cluster( """ assert_ray_available() # Connect to a ray cluster. -<<<<<<< HEAD -<<<<<<< HEAD if is_hip() or current_platform.is_xpu(): - ray.init(address=ray_address, - ignore_reinit_error=True, - num_gpus=parallel_config.world_size) -======= - if is_hip() or is_xpu(): # Try to connect existing ray instance and create a new one if not found -======= - if ray_address is None: - # Try to connect latest created ray instance and create - # a new one if not found ->>>>>>> unify init logic for all platforms try: - ray.init("auto") + ray.init('auto') except ConnectionError: logger.warning( - "Neither ray_address specified nor existing RAY instance" - " detected. A new instance will be launched with current" - " node resources.") - ray.init(address=None, + "No existing RAY instance detected. " + "A new instance will be launched with current node resources.") + ray.init(address=ray_address, ignore_reinit_error=True, num_gpus=parallel_config.world_size) ->>>>>>> Fix ray instance detect issue else: ray.init(address=ray_address, ignore_reinit_error=True)