Skip to content

Commit 2d4f7d4

Browse files
authored
set disable custom gather by default (#908)
1 parent 058eb80 commit 2d4f7d4

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

lightllm/common/basemodel/basemodel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def _init_kv_move_buffer(self):
169169

170170
def _check_mem_size(self):
171171
self.max_total_token_num = self.mem_manager.size
172-
assert self.max_seq_length < self.max_total_token_num
172+
assert self.max_seq_length <= self.max_total_token_num
173173
return
174174

175175
def _init_req_manager(self):

lightllm/distributed/communication_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def init_custom_gather(self) -> None:
7979
return
8080

8181
args = get_env_start_args()
82-
if args.disable_custom_allgather:
82+
if not args.enable_custom_allgather:
8383
return
8484

8585
cpu_group = create_new_group_for_current_dp("gloo")

lightllm/distributed/custom_all_gather.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,11 @@
3131
from lightllm.common.basemodel.layer_infer.cache_tensor_manager import g_cache_manager
3232

3333

34-
if light_ops is not None:
35-
light_ops.meta_size()
34+
try:
35+
if light_ops is not None:
36+
light_ops.meta_size()
37+
except:
38+
pass
3639

3740
logger = init_logger(__name__)
3841

lightllm/server/api_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def make_argument_parser() -> argparse.ArgumentParser:
234234
"--enable_mps", action="store_true", help="Whether to enable nvidia mps for multimodal service."
235235
)
236236
parser.add_argument("--disable_custom_allreduce", action="store_true", help="Whether to disable cutom allreduce.")
237-
parser.add_argument("--disable_custom_allgather", action="store_true", help="Whether to enable cutom allgather.")
237+
parser.add_argument("--enable_custom_allgather", action="store_true", help="Whether to enable cutom allgather.")
238238
parser.add_argument(
239239
"--enable_tpsp_mix_mode",
240240
action="store_true",

0 commit comments

Comments
 (0)