From aaa0765dede968ee62f314c32c9a9b25f0275473 Mon Sep 17 00:00:00 2001 From: nihui Date: Sat, 22 Dec 2018 11:59:54 +0800 Subject: [PATCH] Update README.md --- benchmark/README.md | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/benchmark/README.md b/benchmark/README.md index 4ace23b9b01..11260ea776e 100644 --- a/benchmark/README.md +++ b/benchmark/README.md @@ -7,12 +7,45 @@ The large model binary files (ncnn bin) are not loaded but generated randomly fo More model networks may be added later. --- +Build +``` +# assume you have already build ncnn library successfully +# uncomment the following line in /CMakeLists.txt with your favorite editor + +# add_subdirectory(benchmark) + +$ cd / +$ make -j4 + +# you can find benchncnn binary in //benchmark +``` Usage ``` # copy all param files to the current directory -./benchncnn [loop count] [num threads] [powersave] +$ ./benchncnn [loop count] [num threads] [powersave] +``` +run benchncnn on android device ``` +# for running on android device, upload to /data/local/tmp/ folder +$ adb push benchncnn /data/local/tmp/ +$ adb push /benchmark/*.param /data/local/tmp/ +$ adb shell + +# executed in android adb shell +$ cd /data/local/tmp/ +$ ./benchncnn [loop count] [num threads] [powersave] +``` + +Parameter + +|param|options|default| +|---|---|---| +|loop count|1~N|4| +|num threads|1~N|max_cpu_count| +|powersave|0=all cores, 1=little cores only, 2=big cores only|0| + +--- Typical output (executed in android adb shell)