前置条件
| 需要安装的软件包 | 使用场景 | 是否可选安装 | 说明 |
|---|---|---|---|
| npu-driver | 推理和训练场景 | 必选 | - |
| npu-firmware | 推理和训练场景 | 必选 | - |
| Toolkit | 推理和训练场景 | 必选 | - |
| Ascend-cann-ops | 训练场景 | 必选 | 需要安装至开发套件包目录下。安装时需已安装同一版本的开发套件包,请选择运行设备对应的ops软件包。 CANN 8.5.0之前版本该包名为Ascend-cann-kernels。 |
参考链接:
固件、驱动、ops: https://www.hiascend.com/cann/download
MindeCluster ToolBox:https://www.hiascend.com/developer/download/community/result?module=dl%2Bcann
安装
./Ascend-mindx-toolbox_{version}_linux-{arch}.run --install --quiet
source /usr/local/Ascend/ascend-toolkit/set_env.sh
source /usr/local/Ascend/toolbox/set_env.sh
测试项总览
| 测试分类 | 测试内容 | 工具命令关键字 | 测试目的 |
|---|---|---|---|
| 算力测试 | FP16/INT8 理论算力 | _--flops_ |
校验 AI Core 实际算力是否达标 |
| 带宽测试 | Host↔Device 带宽 | _--bw -t h2d / d2h_ |
校验 PCIe 总线吞吐 |
| Device‑Device P2P 带宽 | _--bw -t p2p_ |
校验板间 HCCS/PCIe 通信带宽 | |
| 信号质量诊断 | HCCS/PCIe 眼图质量 | _--sq_ |
排查硬件链路信号劣化 |
| 压力压测 | 片上内存压测 | _--stress_ |
长时间稳定性验证 |
| 功耗测试 | 满负载功耗采集 | -**p** |
获取满负载功耗基线 |
步骤
参考链接:
https://www.hiascend.com/document/detail/zh/mindcluster/latest/toolbox/toolboxug/toolboxug_0015.html
https://support.huawei.com/enterprise/zh/doc/EDOC1100543808/e749d136
https://hwcomputing.csdn.net/6a9fb415790f037e6e399734.html
算力测试
# 算力测试命令的可用参数查询
ascend-dmi -f -h
# 单设备测试,‑d指定device id,默认0
ascend-dmi --flops -d -0
# 全部设备批量测试
ascend-dmi --flops --all
# quiet静默输出,便于脚本采集结果
ascend-dmi --flops --all --quiet
# 指定Device,指定算子运算类型为int8,和执行次数 6000万次
ascend-dmi -f -t int8 -d 2 --et 60
# 测试整机算力
ascend-dmi -f -t int8 --all -q
#常用
ascend-dmi -f -d 0
ascend-dmi -f -d 1
ascend-dmi -f -d 2
ascend-dmi -f -d 3
ascend-dmi -f -d 4
ascend-dmi -f -d 5
ascend-dmi -f -d 6
ascend-dmi -f -d 7
ascend-dmi -f -t int8 -d 0
ascend-dmi -f -t int8 -d 1
ascend-dmi -f -t int8 -d 2
ascend-dmi -f -t int8 -d 3
ascend-dmi -f -t int8 -d 4
ascend-dmi -f -t int8 -d 5
ascend-dmi -f -t int8 -d 6
ascend-dmi -f -t int8 -d 7
带宽测试
# 查看带宽测试命令的可用参数
ascend-dmi --bw -h
# 基础命令,不带参数则默认查询在Device 0,以h2d、d2h、d2d三个数据流向和步长模式显示的带宽耗时信息
ascend-dmi --bw -q
# 指定 Device 定长模式迭代100次,指定size为128M为例 h2d模式
ascend-dmi --bw -t h2d -d 0 --et 100 -s 134217728 -q
# 测试数据从Device0侧传输到同一Device0侧的带宽与总耗时为例
ascend-dmi --bw -t d2d -d 0 -q
# 测试数据从源头Device 0传输到目标Device 1,执行次数为100,size为128M的p2p测试为例
ascend-dmi --bw -t p2p --dd 0 --ds 1 --et 100 -s 134217728 -q
# 测试不指定源头Device和目标Device的p2p样例
ascend-dmi --bw -t p2p -q
# 测试超节点在p2p模式下,不指定源头Card和目标Card,指定了卡粒度的p2p样例
ascend-dmi --bw -t p2p -q --mode card
#常用
ascend-dmi --bw -q
眼图测试(信号质量)
ascend-dmi --sq
#查看Device 0和Device 1的PCIe、HCCS和RoCE信号质量为例。
ascend-dmi --sq -t hccs,pcie,roce -d 0,1
#查看Device 1和Device 3的UB信号质量为例。
ascend-dmi --sq -t ub -d 1,3
片上内存诊断
ascend-dmi -dg -i hbm -s --auto-test -q
功耗测试
# 功耗测试命令的可用参数查询
ascend-dmi -p -h
# 以默认参数执行功耗测试为例(此时算子运算类型为fp16)
ascend-dmi -p
# 以算子运算类型为int8
ascend-dmi -p -t int8
# 以执行时间为60s,信息的打印间隔时间为5s,屏幕的输出模式为清除历史记录为例。
ascend-dmi -p --dur 60 --it 5 --pm refresh
# 以执行功耗测试,且指定压测类型为edp为例
ascend-dmi -p -pt edp -q
#常用
ascend-dmi -p
ascend-dmi -p -t int8
ascend-dmi -p --dur 60 --it 5 --pm refresh
码流测试
#Atlas 800T A2训练服务器在Device 2和Device 3上进行码流测试
ascend-dmi --prbs-check -d 2,3 -dur 5
提供CDN加速/云存储服务