Skip to content

Commit bc605a9

Browse files
authored
fix
1 parent 7e45d78 commit bc605a9

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lightllm/distributed/communication_op.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030

3131
try:
3232
HAS_VLLM = True
33-
# import vllm.distributed.device_communicators.custom_all_reduce_utils as tgt
34-
# setattr(tgt, "gpu_p2p_access_check", lambda *arg, **kwargs: True)
3533
from .custom_all_reduce import CustomAllreduce
3634
except:
3735
HAS_VLLM = False

lightllm/server/router/model_infer/mode_backend/base_backend.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@
3939
from lightllm.server.router.model_infer.infer_batch import InferBatch, InferReq, InferSamplingParams, requests_mapping
4040
from lightllm.server.router.token_load import TokenLoad
4141
from lightllm.common.basemodel.infer_lock import g_infer_state_lock, InferStateLock
42-
from lightllm.distributed import (
43-
set_custom_reduce,
44-
)
42+
4543
import torch.distributed as dist
4644

4745

@@ -87,6 +85,9 @@ def init_model(self, kvargs):
8785
rank=self.tp_rank,
8886
world_size=self.world_size,
8987
)
88+
89+
from lightllm.distributed import set_custom_reduce
90+
9091
set_custom_reduce()
9192

9293
# 为 p d 分离模式添加的全局锁管理,用于做一些同步操作。 一定需要在

0 commit comments

Comments
 (0)