【昇腾310B】香橙派ai pro 设置所有cpu为control CPU
开发板使用的昇腾 SOC 总共有 4 个 CPU,这 4 个 CPU 既可以设置为 controlCPU,也可以设置为 AI CPU。如果当前环境模型中无 AI CPU 算子,且运行业务时查询 AI CPU 占用率持续为 0,则可以将 AI CPU 的数量配置为 0。当 Linux 系统跑满后,使用 htop 命令会看到有一个 CPU 的占用率始终接近 0,请注意,这是正常的。如果不需要使用 AI
·
AI CPU 和 control CPU 的设置方法
开发板使用的昇腾 SOC 总共有 4 个 CPU,这 4 个 CPU 既可以设置为 controlCPU,也可以设置为 AI CPU。默认情况下,control CPU 和 AI CPU 的分配数量为3:1。使用 npu-smi info 命令可以查看下 control CPU 和 AI CPU 的分配数量。
(base) HwHiAiUser@orangepiaipro:~$ npu-smi info -t cpu-num-cfg -i 0 -c 0
Current AI CPU number : 1
Current control CPU number : 3
Current data CPU number : 0
(base) HwHiAiUser@orangepiaipro:~$
当 Linux 系统跑满后,使用 htop 命令会看到有一个 CPU 的占用率始终接近 0,请注意,这是正常的。因为这个 CPU 默认用于 AI CPU。
如果当前环境模型中无 AI CPU 算子,且运行业务时查询 AI CPU 占用率持续为 0,则可以将 AI CPU 的数量配置为 0。查询 AI CPU 占用率的命令如下所示:
(base) HwHiAiUser@orangepiaipro:~$ npu-smi info -t usages -i 0 -c 0
Memory Capacity(MB) : 7545
Memory Usage Rate(%) : 20
Hugepages Total(page) : 15
Hugepages Usage Rate(%) : 100
Aicore Usage Rate(%) : 0
Aicpu Usage Rate(%) : 0
Ctrlcpu Usage Rate(%) : 1
Memory Bandwidth Usage Rate(%) : 1
如果不需要使用 AI CPU,使用下面的命令可以将 4 个 CPU 都设置为 controlCPU。设置完后需要重启系统让配置生效。
(base) HwHiAiUser@orangepiaipro:~$ sudo npu-smi set -t cpu-num-cfg -i 0 -c 0 -v 0:4:0
Status : OK
Message : The cpu-num-cfg of the chip is set successfully. Reset system for the configuration to take effect
更多推荐
所有评论(0)