npu-smi 是华为提供的一个命令行工具,专门用于管理和监控华为昇腾(Ascend)系列神经网络处理器(NPU)的状态和性能,似于 NVIDIA 的 nvidia-smi。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
npu-smi info --help
Usage: npu-smi info <watch|proc|-h|-m|-l|-t type> [Options...]

Commands:
       watch          Show all device's status in scrolling format
       proc           Show device's matrix process status in scrolling format
       -h, --help     Show this help text and exit
       -m             Show all device's mapping information
       -l             Show all device's topology information
       -t type        Show information for type
                      type: board, flash, memory, usages, sensors, temp, power, volt, mac-addr,
                            common, health, product, ecc, ip, sys-time, i2c_check, work-mode,
                            ecc-enable, p2p-enable, ssh-enable, license, customized-info,
                            device-share, nve-level, aicpu-config, pcie-err, mcu-monitor,
                            err-count, boot-area, vnpu-mode, info-vnpu, vnpu-svm, cpu-num-cfg,
                            first-power-on-date, proc-mem, phyid-remap, vnpu-cfg-recover, key-manage,
                            template-info, pkcs-enable, p2p-mem-cfg, pwm-mode, pwm-duty-ratio,
                            boot-select, topo.

Options:
       -i %d          Card ID
       -c %d          Chip ID
       -p %d          Chip Physical ID
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
npu-smi set --help
Usage: npu-smi set <-h|-t type> [Options...]

Commands:
       -h, --help     Show this help text and exit
       -t type        The set type for device
                      type: ecc-enable, collect-log, reset, device-share, nve-level, clear-ecc-info,
                            license, ssh-enable, customized-info, clear-pcie-err, revocate, mac-addr,
                            mcu-monitor, boot-area, aicpu-config, disk-power, ip, errcount-clear,
                            vnpu-mode, create-vnpu, destroy-vnpu, vnpu-svm, cpu-num-cfg, vnpu-cfg-recover,
                            key-manage, pkcs-enable, p2p-mem-cfg, pwm-mode, pwm-duty-ratio, power-state,
                            boot-select, reset-vnpu.

Options:
       -i %d          Card ID
       -c %d          Chip ID
       -d %d          Config value
       -s             String format configuration
       -f             License (1-255) or path of SoC certificate files
       -m             By in-band reset, only can input 1