Skip to content

Commit

Permalink
[Core][Distributed] improve logging for init dist (vllm-project#4042)
Browse files Browse the repository at this point in the history
  • Loading branch information
youkaichao authored Apr 13, 2024
1 parent 5c2e66e commit 98afde1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions vllm/distributed/parallel_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

import torch

from vllm.logger import init_logger

logger = init_logger(__name__)

# Tensor model parallel group that the current rank belongs to.
_TENSOR_MODEL_PARALLEL_GROUP = None
# Pipeline model parallel group that the current rank belongs to.
Expand Down Expand Up @@ -45,6 +49,8 @@ def init_distributed_environment(
local_rank: int = -1,
backend: str = "nccl",
):
logger.debug(f"{world_size=} {rank=} {local_rank=} "
f"{distributed_init_method=} {backend=}")
if not torch.distributed.is_initialized():
assert distributed_init_method is not None, (
"distributed_init_method must be provided when initializing "
Expand Down

0 comments on commit 98afde1

Please sign in to comment.