diff --git a/vllm/distributed/parallel_state.py b/vllm/distributed/parallel_state.py index 10f87c49b..126160b09 100644 --- a/vllm/distributed/parallel_state.py +++ b/vllm/distributed/parallel_state.py @@ -938,6 +938,13 @@ def init_distributed_environment( assert distributed_init_method is not None, ( "distributed_init_method must be provided when initializing " "distributed environment") + if not torch.distributed.is_backend_available(backend): + logger.warning( + "Distributed backend %s is not available; " + "falling back to gloo.", backend) + assert torch.distributed.is_gloo_available(), ( + "Fallback Gloo backend is not available.") + backend = "gloo" # this backend is used for WORLD torch.distributed.init_process_group( backend=backend,