[dist] fix communicator patch (#58)

### What this PR does / why we need it?
fix communicator patch so parallel could work.
see #52

Signed-off-by: MengqingCao <cmq0113@163.com>
This commit is contained in:
Mengqing Cao
2025-02-14 10:45:49 +08:00
committed by GitHub
parent e264987af2
commit b88443b6c6
4 changed files with 7 additions and 6 deletions

View File

@@ -457,6 +457,8 @@ def init_worker_distributed_environment(
backend: str = "hccl") -> None:
"""Initialize the distributed environment."""
set_custom_all_reduce(not parallel_config.disable_custom_all_reduce)
# register communicator patch before init dist env
from vllm_ascend import patch # noqa: F401
init_distributed_environment(parallel_config.world_size, rank,
distributed_init_method, local_rank, backend)