Skip to content

Commit 51f7128

Browse files
committed
support ray
Signed-off-by: Kunshang Ji <kunshang.ji@intel.com>
1 parent 07064cb commit 51f7128

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vllm/v1/engine/async_llm.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from vllm.v1.engine.detokenizer import Detokenizer
2424
from vllm.v1.engine.processor import Processor
2525
from vllm.v1.executor.abstract import Executor
26+
from vllm.v1.executor.ray_utils import initialize_ray_cluster
2627

2728
logger = init_logger(__name__)
2829

@@ -150,7 +151,11 @@ def _get_executor_cls(cls, vllm_config: VllmConfig) -> Type[Executor]:
150151
executor_class: Type[Executor]
151152
distributed_executor_backend = (
152153
vllm_config.parallel_config.distributed_executor_backend)
153-
if distributed_executor_backend == "mp":
154+
if distributed_executor_backend == "ray":
155+
initialize_ray_cluster(vllm_config.parallel_config)
156+
from vllm.v1.executor.ray_executor import RayExecutor
157+
executor_class = RayExecutor
158+
elif distributed_executor_backend == "mp":
154159
from vllm.v1.executor.multiproc_executor import MultiprocExecutor
155160
executor_class = MultiprocExecutor
156161
else:

0 commit comments

Comments
 (0)