板端启用 NPU
提示
使用 R2 或更高版本的系统镜像时,NPU 运行环境已预装,无需额外安装。
NPU 环境配置清单
- fastrpc
- /dev/fastrpc-adsp
- /dev/fastrpc-cdsp
- /dev/fastrpc-cdsp-secure
- /usr/lib/dsp libraries
使用 radxa apt 源进行安装
前置条件
以下软件包依赖 Radxa 官方镜像里预置的 Radxa APT 源。请先确认设备运行的是对应机型的官方 RadxaOS 镜像;如果当前使用的是第三方 Ubuntu / Debian 镜像或自行更换过软件源,fastrpc / fastrpc-test 可能无法安装。
- QCS6490
- SC8280XP
- QCS9075
Device
sudo apt update
sudo apt install fastrpc libcdsprpc1
Device
sudo apt update
sudo apt install fastrpc libcdsprpc1
Device
sudo apt update
sudo apt install fastrpc libcdsprpc1
验证 fastrpc 状态
- QCS6490
- SC8280XP
- QCS9075
Device
sudo apt install fastrpc-test
fastrpc_test -a v68
rock@radxa-dragon-q6a:~$ fastrpc_test -a v68
Demonstrating FARF run-time logging
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
Demonstrating HAP_mem.h APIs
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
Demonstrating HAP_perf.h APIs
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
[PASS] libhap_example.so
Test PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
[PASS] libmultithreading.so
Allocate 4000 bytes from ION heap
Creating sequence of numbers from 0 to 999
Compute sum on domain 3
Call calculator_sum on the DSP
Sum = 499500
Call calculator_max on the DSP
Max value = 999
[PASS] libcalculator.so
========================================
Test Summary:
Total tests run: 3
Passed: 3
Failed: 0
Skipped: 0
========================================
RESULT: All applicable tests PASSED
Device
sudo apt install fastrpc-test
fastrpc_test -a v68
rock@radxa-dragon-q8b:~$ fastrpc_test -a v68
Allocate 4000 bytes from ION heap
Creating sequence of numbers from 0 to 999
Compute sum on domain 3
Call calculator_sum on the DSP
Sum = 499500
Call calculator_max on the DSP
Max value = 999
[PASS] libcalculator.so
Demonstrating FARF run-time logging
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
Demonstrating HAP_mem.h APIs
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
Demonstrating HAP_perf.h APIs
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
[PASS] libhap_example.so
Test PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
[PASS] libmultithreading.so
========================================
Test Summary:
Total tests run: 3
Passed: 3
Failed: 0
Skipped: 0
========================================
RESULT: All applicable tests PASSED
Device
sudo apt install fastrpc-test
fastrpc_test -a v75
rock@radxa-airbox-q900:~$ fastrpc_test -a v75
Allocate 4000 bytes from ION heap
Creating sequence of numbers from 0 to 999
Compute sum on domain 3
Call calculator_sum on the DSP
Sum = 499500
Call calculator_max on the DSP
Max value = 999
[PASS] libcalculator.so
Test PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
[PASS] libmultithreading.so
Demonstrating FARF run-time logging
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
Demonstrating HAP_mem.h APIs
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
Demonstrating HAP_perf.h APIs
hap_example function PASSED
Please look at the mini-dm logs or the adb logcat logs for DSP output
[PASS] libhap_example.so
========================================
Test Summary:
Total tests run: 3
Passed: 3
Failed: 0
Skipped: 0
========================================
RESULT: All applicable tests PASSED