多机无法拉起DeepSeek-R1模型,服务器NPU通信问题
2025/03/07
816
问题信息
问题来源 | 产品大类 | 关键字 |
---|---|---|
现网 | 模型推理 | TLS,HCCL,AllReduce,通信,DeepSeek,推理 |
问题现象描述
- 启动任务时,任务无法拉起。
- 任务执行时,突然中断或服务突然终止。
原因分析
NPU网络通信存在问题。
解决措施
- 检测卡状态。
- 检测多节点的每个卡TLS开关是否一致。
for i in {0..7}; do hccn_tool -i $i -tls -g ; done | grep switch
- 本机卡间通信检测。
- 进入任意目录创建一个 test.py文件
- 文件加入如下脚本:
import subprocess ip_list = [] for i in range(8): try: cmd = ['hccn_tool', '-i', str(i), '-ip', '-g'] res = subprocess.run(cmd, capture_output=True, text=True, check=True) res_str = res.stdout.strip() if 'ipaddr' in res_str: ip_list.append(res_str.split('\n')[0].split(':')[1]) except subprocess.CalledProcessError as e: print(e) for i in range(8): for other_ip in ip_list: try: cmd = ['hccn_tool', '-i', str(i), '-ping', '-g', 'address', str(other_ip), 'pkt', '3'] res = subprocess.run(cmd, capture_output=True, text=True, check=True) print(ip_list[i], '==>', res.stdout.strip()) except subprocess.CalledProcessError as e: print(e) print(f'========{ip_list[i]} is OK========') print(f'========ALL is OK========')
- 在当前目录执行脚本
python test.py
- 出现ALL is OK 代表本机所有卡通讯正常
- 检测无误后,重新执行AI任务。