[NPU]mindspore model support moe (#15363)

This commit is contained in:
Xuhao Zhang
2026-02-02 17:52:49 +08:00
committed by GitHub
parent aa780a6258
commit 0537232b05
2 changed files with 31 additions and 19 deletions
@@ -2,6 +2,7 @@
# SPDX-FileCopyrightText: Copyright contributors to the SGLang project
"""ms_runner launch MindSpore distributed modules."""
import logging
import multiprocessing as mp
import os
import sys
@@ -14,6 +15,8 @@ from mindspore.communication import create_group
from sglang.srt.distributed.parallel_state import _groups
logger = logging.getLogger(__name__)
class _Tmp:
def __init__(self):
@@ -92,10 +95,9 @@ def reuse_hccl_comm():
hccl_comm_handle = device_group._get_backend(torch.device("npu")).get_hccl_comm(
group().local_rank
)
print(
logger.info(
f"MindSpore reuse torch group: {device_group}, group_name: {group_name}, local rank: {group().local_rank},"
f"hccl communicator handle: {hex(hccl_comm_handle)}",
flush=True,
)
# Create MS communication group by hccl comm handle to reuse Torch group.
group_options = GroupOptions()