diff --git a/lightllm/common/basemodel/layer_weights/meta_weights/fused_moe/impl/deepgemm_impl.py b/lightllm/common/basemodel/layer_weights/meta_weights/fused_moe/impl/deepgemm_impl.py index aa080a19f..cfc82face 100644 --- a/lightllm/common/basemodel/layer_weights/meta_weights/fused_moe/impl/deepgemm_impl.py +++ b/lightllm/common/basemodel/layer_weights/meta_weights/fused_moe/impl/deepgemm_impl.py @@ -146,7 +146,7 @@ def select_experts_and_quant_input( n_group: int, scoring_func: str, ): - topk_weights, topk_idx = self._select_experts( + topk_weights, topk_idx, _ = self._select_experts( input_tensor=hidden_states, router_logits=router_logits, correction_bias=e_score_correction_bias, diff --git a/lightllm/distributed/communication_op.py b/lightllm/distributed/communication_op.py index f15badde2..07a69db0f 100644 --- a/lightllm/distributed/communication_op.py +++ b/lightllm/distributed/communication_op.py @@ -152,6 +152,13 @@ def new_deepep_group( global_world_size = get_global_world_size() deepep_group = dist.new_group(list(range(global_world_size))) + # DeepEP reuses this group's NCCL communicator via _comm_ptr(). Because the + # group is created without device_id, warm it up first to avoid reading a null + # communicator. The default process group's warmup does not cover this group. + dist.barrier( + group=deepep_group, + device_ids=[torch.cuda.current_device()], + ) self.ll_num_tokens = prefill_num_max_dispatch_tokens_per_rank self.ll_decode_num_tokens = decode_num_max_dispatch_tokens_per_rank self.ll_hidden = hidden_size