提交 9f1ec3a5 编写于 作者: H HydrogenSulfate

fix GPUID settting and correct LOG_PATH

上级 7284e3f9
...@@ -2,10 +2,17 @@ ...@@ -2,10 +2,17 @@
source test_tipc/common_func.sh source test_tipc/common_func.sh
FILENAME=$1 FILENAME=$1
GPUID=$2 MODE=$2
# set cuda device
GPUID=$3
if [[ ! $GPUID ]];then if [[ ! $GPUID ]];then
GPUID=0 GPUID=0
fi fi
env="export CUDA_VISIBLE_DEVICES=${GPUID}"
set CUDA_VISIBLE_DEVICES
eval $env
dataline=$(awk 'NR==1, NR==19{print}' $FILENAME) dataline=$(awk 'NR==1, NR==19{print}' $FILENAME)
# parser params # parser params
...@@ -30,7 +37,7 @@ cpp_benchmark_value=$(func_parser_value "${lines[16]}") ...@@ -30,7 +37,7 @@ cpp_benchmark_value=$(func_parser_value "${lines[16]}")
generate_yaml_cmd=$(func_parser_value "${lines[17]}") generate_yaml_cmd=$(func_parser_value "${lines[17]}")
transform_index_cmd=$(func_parser_value "${lines[18]}") transform_index_cmd=$(func_parser_value "${lines[18]}")
LOG_PATH="./test_tipc/output/${model_name}" LOG_PATH="./test_tipc/output/${model_name}/${MODE}"
mkdir -p ${LOG_PATH} mkdir -p ${LOG_PATH}
status_log="${LOG_PATH}/results_cpp.log" status_log="${LOG_PATH}/results_cpp.log"
# generate_yaml_cmd="python3 test_tipc/generate_cpp_yaml.py" # generate_yaml_cmd="python3 test_tipc/generate_cpp_yaml.py"
...@@ -235,18 +242,6 @@ cd ../../../ ...@@ -235,18 +242,6 @@ cd ../../../
# cd ../../ # cd ../../
echo "################### build PaddleClas demo finished ###################" echo "################### build PaddleClas demo finished ###################"
# set cuda device
# GPUID=$2
# if [ ${#GPUID} -le 0 ];then
# env="export CUDA_VISIBLE_DEVICES=0"
# else
# env="export CUDA_VISIBLE_DEVICES=${GPUID}"
# fi
# set CUDA_VISIBLE_DEVICES
# eval $env
echo "################### run test ###################" echo "################### run test ###################"
export Count=0 export Count=0
IFS="|" IFS="|"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册