fix GPUID settting and correct LOG_PATH
parent
7284e3f9db
commit
9f1ec3a537
|
@ -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]}")
|
||||||
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 ../../../
|
||||||
# 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="|"
|
||||||
|
|
Loading…
Reference in New Issue