From 6169744504608dfcef75fd23c7943742a44ee8bb Mon Sep 17 00:00:00 2001 From: juncaipeng <52520497+juncaipeng@users.noreply.github.com> Date: Fri, 10 Jan 2020 13:24:21 +0800 Subject: [PATCH] Upgrade benchmark (#2748) * upgrade benchmark 2, test=develop --- lite/api/benchmark.cc | 1 + lite/tools/benchmark.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lite/api/benchmark.cc b/lite/api/benchmark.cc index e451f6f161..efb706a5ef 100644 --- a/lite/api/benchmark.cc +++ b/lite/api/benchmark.cc @@ -151,6 +151,7 @@ void Run(const std::vector>& input_shapes, ofs << "max = " << std::setw(12) << max_res; ofs << "average = " << std::setw(12) << avg_res; ofs << std::endl; + ofs.close(); } #endif diff --git a/lite/tools/benchmark.sh b/lite/tools/benchmark.sh index a94190d96e..23bb183ec9 100644 --- a/lite/tools/benchmark.sh +++ b/lite/tools/benchmark.sh @@ -72,7 +72,8 @@ for threads in ${NUM_THREADS_LIST[@]}; do done adb shell "echo >> $ANDROID_DIR/$RESULT_FILENAME" done - +adb shell "echo >> $ANDROID_DIR/$RESULT_FILENAME" +adb shell "echo power_mode refer: 0 for big cluster, 1 for little cluster, 2 for all cores, 3 for no bind >> $ANDROID_DIR/$RESULT_FILENAME" # Adb pull benchmark result, show result adb pull $ANDROID_DIR/$RESULT_FILENAME . echo "\n--------------------------------------" -- GitLab