[Feature] add disable-custom-all-reduce (#1148)

Co-authored-by: chenxu02 <chenxu02@zhihu.com>
Co-authored-by: Yineng Zhang <me@zhyncs.com>
This commit is contained in:
Xu-Chen
2024-08-20 23:44:12 +08:00
committed by GitHub
parent a8ae640328
commit ff2cfdb1a2
2 changed files with 9 additions and 0 deletions

View File

@@ -37,6 +37,7 @@ from vllm.distributed import (
get_tp_group,
init_distributed_environment,
initialize_model_parallel,
set_custom_all_reduce,
)
from vllm.distributed.parallel_state import in_the_same_node_as
from vllm.model_executor.model_loader import get_model
@@ -105,6 +106,7 @@ class ModelRunner:
nccl_init_method = f"tcp://{server_args.nccl_init_addr}"
else:
nccl_init_method = f"tcp://127.0.0.1:{self.nccl_port}"
set_custom_all_reduce(not server_args.disable_custom_all_reduce)
init_distributed_environment(
backend="nccl",
world_size=self.tp_size,