Don't use cupy NCCL for AMD backends (#2855)

This commit is contained in:
Woosuk Kwon
2024-02-14 12:30:44 -08:00
committed by GitHub
parent 4efbac6d35
commit 25e86b6a61
3 changed files with 23 additions and 7 deletions
+3 -1
View File
@@ -19,6 +19,7 @@ from vllm.sequence import SamplerOutput, SequenceGroupMetadata
from vllm.worker.cache_engine import CacheEngine
from vllm.worker.model_runner import ModelRunner
from vllm.lora.request import LoRARequest
from vllm.utils import is_hip
class Worker:
@@ -268,7 +269,8 @@ def init_distributed_environment(
"cupy.distributed is already initialized but the cupy world "
"size does not match parallel_config.world_size "
f"({cupy_world_size} vs. {parallel_config.world_size}).")
elif parallel_config.world_size > 1 and cupy_port is not None:
elif (parallel_config.world_size > 1 and cupy_port is not None
and not is_hip()):
# NOTE(woosuk): We don't initialize CuPy process group when world size
# is 1.
# TODO(woosuk): Support multi-node connection.