提交 1cdfd952 编写于 作者: Y yejianwu

update device_id for target_soc not found error msg

上级 360937e9
......@@ -18,7 +18,13 @@ OPTION_ARGS=$3
echo $OPTION_ARGS
DEVICE_ID=`echo_device_id_by_soc $TARGET_SOC`
RESULT_VALUE=`echo_device_id_by_soc $TARGET_SOC`
if [ $? -ne 0 ]; then
echo $RESULT_VALUE
exit 1
else
DEVICE_ID=$RESULT_VALUE
fi
if [ -f "$MODEL_OUTPUT_DIR/benchmark_model" ]; then
rm -rf $MODEL_OUTPUT_DIR/benchmark_model
......
......@@ -17,7 +17,13 @@ RUN_SECONDS=$2
MERGED_LIB_FILE=$3
MODEL_INPUT_DIR=$4
DEVICE_ID=`echo_device_id_by_soc $TARGET_SOC`
RESULT_VALUE=`echo_device_id_by_soc $TARGET_SOC`
if [ $? -ne 0 ]; then
echo $RESULT_VALUE
exit 1
else
DEVICE_ID=$RESULT_VALUE
fi
if [ "$CPU_MODEL_TAG" != '' ]; then
CPU_MODEL_TAG_BUILD_FLAGS="--copt=-DMACE_CPU_MODEL_TAG=${CPU_MODEL_TAG}"
......
......@@ -13,7 +13,13 @@ CURRENT_DIR=`dirname $0`
source ${CURRENT_DIR}/env.sh
TARGET_SOC=$1
DEVICE_ID=`echo_device_id_by_soc $TARGET_SOC`
RESULT_VALUE=`echo_device_id_by_soc $TARGET_SOC`
if [ $? -ne 0 ]; then
echo $RESULT_VALUE
exit 1
else
DEVICE_ID=$RESULT_VALUE
fi
if [ x"$TARGET_ABI" != x"host" ]; then
adb -s $DEVICE_ID shell rm -rf $PHONE_DATA_DIR || exit 1
......
......@@ -40,6 +40,10 @@ echo_device_id_by_soc()
device_soc=`adb -s ${device} shell getprop | grep ro.board.platform | cut -d [ -f3 | cut -d ] -f1`
if [ x"$TARGET_SOC" = x"$device_soc" ]; then
echo "$device"
return 0
fi
done
echo "MACE ERROR: Not found device with soc ${TARGET_SOC}"
return 1
}
......@@ -16,7 +16,13 @@ TARGET_SOC=$1
CL_BIN_DIRS=$2
PULL_OR_NOT=$3
DEVICE_ID=`echo_device_id_by_soc $TARGET_SOC`
RESULT_VALUE=`echo_device_id_by_soc $TARGET_SOC`
if [ $? -ne 0 ]; then
echo $RESULT_VALUE
exit 1
else
DEVICE_ID=$RESULT_VALUE
fi
if [ "$PULL_OR_NOT" = 1 ]; then
CL_BIN_DIR=${CL_BIN_DIRS}
......
......@@ -22,7 +22,13 @@ OPTION_ARGS=$7
echo $OPTION_ARGS
DEVICE_ID=`echo_device_id_by_soc $TARGET_SOC`
RESULT_VALUE=`echo_device_id_by_soc $TARGET_SOC`
if [ $? -ne 0 ]; then
echo $RESULT_VALUE
exit 1
else
DEVICE_ID=$RESULT_VALUE
fi
if [ x"$TARGET_ABI" = x"host" ]; then
MACE_CPP_MIN_VLOG_LEVEL=$VLOG_LEVEL \
......
......@@ -16,7 +16,13 @@ TARGET_SOC=$1
MODEL_OUTPUT_DIR=$2
GENERATE_DATA_OR_NOT=$3
DEVICE_ID=`echo_device_id_by_soc $TARGET_SOC`
RESULT_VALUE=`echo_device_id_by_soc $TARGET_SOC`
if [ $? -ne 0 ]; then
echo $RESULT_VALUE
exit 1
else
DEVICE_ID=$RESULT_VALUE
fi
IFS=',' read -r -a INPUT_NAMES <<< "${INPUT_NODES}"
IFS=',' read -r -a OUTPUT_NAMES <<< "${OUTPUT_NODES}"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册