echo "--benchmark - (default=off) run benchmark"
echo "--benchmark_acl - (default=off) run benchmark-acl"
echo ""
+ echo "Following option is used for profiling."
+ echo "--profile - (default=off) run operf"
+ echo ""
echo "etc."
echo "--framework_driverbin - (default=../../Product/out/bin/tflite_run) runner for runnning framework tests"
echo "--verification_driverbin - (default=../../Product/out/bin/nnapi_test) runner for runnning verification tests"
BENCHMARK_ON="false"
BENCHMARK_ACL_ON="false"
ACL_ENV_ON="false"
+PROFILE_ON="false"
for i in "$@"
do
--acl_envon)
ACL_ENV_ON="true"
;;
+ --profile)
+ ALLTEST_ON="false"
+ PROFILE_ON="true"
+ ;;
*)
# Be careful that others params are handled as $ARTIFACT_PATH
ARTIFACT_PATH="$i"
source $ARTIFACT_PATH/tools/test_driver/print_to_json.sh
print_to_json $ARTIFACT_PATH/report/benchmark $ARTIFACT_PATH/report
fi
+
+# Run profiling
+if [ "$PROFILE_ON" == "true" ]; then
+ # FIXME: These driver and tflite test are set temporarily. Fix these to support flexibility
+ DRIVER_BIN=$ARTIFACT_PATH/Product/out/bin/tflite_run
+ TFLITE_TEST=$ARTIFACT_PATH/tests/framework/cache/inceptionv3/inception_module/inception_test.tflite
+
+ # TODO: Enable operf to set directory where sample data puts on
+ rm -rf oprofile_data
+
+ echo ""
+ echo "============================================"
+ operf -g $DRIVER_BIN $TFLITE_TEST
+ echo "============================================"
+ echo ""
+fi