Name Date Size #Lines LOC

..--

src/H05-Jun-2025-1,224949

CMakeLists.txtH A D05-Jun-20251.3 KiB4837

README.mdH A D05-Jun-20251.7 KiB9259

build-android_RK3562.shH A D05-Jun-2025739 3625

build-android_RK3566_RK3568.shH A D05-Jun-2025739 3625

build-android_RK3588.shH A D05-Jun-2025739 3625

build-linux_RK3562.shH A D05-Jun-2025464 2616

build-linux_RK3566_RK3568.shH A D05-Jun-2025464 2616

build-linux_RK3588.shH A D05-Jun-2025464 2616

README.md

1rknn_benchmark is used to test the performance of the rknn model. Please make sure that the cpu/ddr/npu has been clocked to the highest frequency before testing.
2
3Usage:
4
5./rknn_benchmark xxx.rknn [input_data]  [loop_count] [core_mask]
6
7core_mask: 0: auto, 1: npu core1, 2: npu core2, 4:npu core3,
8
9​                     3: npu core1&2,
10
11​                     7: npu core1&2&3
12
13Only RK3588 support core mask.
14
15Such as:
16
17```
18./rknn_benchmark mobilenet_v1.rknn
19./rknn_benchmark mobilenet_v1.rknn dog.jpg 10 3
20./rknn_benchmark mobilenet_v1.rknn dog.npy 10 7
21./rknn_benchmark xxx.rknn input1.npy#input2.npy
22```
23
24
25The following <TARGET_PLATFORM> represents RK356X or RK3588
26
27# Aarch64 Linux Demo
28## Build
29
30modify `GCC_COMPILER` on `build-linux_<TARGET_PLATFORM>.sh` for target platform,
31
32then execute
33
34```
35./build-linux_<TARGET_PLATFORM>.sh
36```
37
38## Install
39
40Copy install/rknn_benchmark_Linux to the devices under /userdata/.
41
42- If you use rockchip's evb board, you can use the following way:
43
44Connect device and push the program and rknn model to `/userdata`
45
46```
47adb push install/rknn_benchmark_Linux /userdata/
48```
49
50- If your board has sshd service, you can use scp or other methods to copy the program and rknn model to the board.
51
52## Run
53
54```
55adb shell
56cd /userdata/rknn_benchmark_Linux/
57```
58
59```
60export LD_LIBRARY_PATH=./lib
61./rknn_benchmark xxx.rknn
62```
63
64# Android Demo
65## Build
66
67modify `ANDROID_NDK_PATH` on `build-android_<TARGET_PLATFORM>.sh` for target platform, then execute
68
69```
70./build-android_<TARGET_PLATFORM>.sh
71```
72
73## Install
74
75connect device and push build output into `/data`
76
77```
78adb push install/rknn_benchmark_Android /data/
79```
80
81## Run
82
83```
84adb shell
85cd /data/rknn_benchmark_Android/
86```
87
88```
89export LD_LIBRARY_PATH=./lib
90./rknn_benchmark xxx.rknn
91```
92