提交 c24c3c07 编写于 作者: A Aurelius84

Polish log style for Benchmark

上级 b51e58bf
...@@ -70,10 +70,10 @@ REST_ARGS=$4 ...@@ -70,10 +70,10 @@ REST_ARGS=$4
# bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt benchmark_train to_static # bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt benchmark_train to_static
# bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt benchmark_train dynamic_bs8_null_DP_N1C1 to_static # bash test_tipc/benchmark_train.sh test_tipc/configs/det_mv3_db_v2_0/train_benchmark.txt benchmark_train dynamic_bs8_null_DP_N1C1 to_static
to_static="d2sF" to_static=""
# parse "to_static" options and modify trainer into "to_static_trainer" # parse "to_static" options and modify trainer into "to_static_trainer"
if [ $REST_ARGS = "to_static" ] || [ $PARAMS = "to_static" ] ;then if [ $REST_ARGS = "to_static" ] || [ $PARAMS = "to_static" ] ;then
to_static="d2sT" to_static="d2s_"
sed -i 's/trainer:norm_train/trainer:to_static_train/g' $FILENAME sed -i 's/trainer:norm_train/trainer:to_static_train/g' $FILENAME
# clear PARAM contents # clear PARAM contents
if [ $PARAMS = "to_static" ] ;then if [ $PARAMS = "to_static" ] ;then
...@@ -183,7 +183,7 @@ for batch_size in ${batch_size_list[*]}; do ...@@ -183,7 +183,7 @@ for batch_size in ${batch_size_list[*]}; do
if [ ${#gpu_id} -le 1 ];then if [ ${#gpu_id} -le 1 ];then
log_path="$SAVE_LOG/profiling_log" log_path="$SAVE_LOG/profiling_log"
mkdir -p $log_path mkdir -p $log_path
log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}_profiling" log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}profiling"
func_sed_params "$FILENAME" "${line_gpuid}" "0" # sed used gpu_id func_sed_params "$FILENAME" "${line_gpuid}" "0" # sed used gpu_id
# set profile_option params # set profile_option params
tmp=`sed -i "${line_profile}s/.*/${profile_option}/" "${FILENAME}"` tmp=`sed -i "${line_profile}s/.*/${profile_option}/" "${FILENAME}"`
...@@ -199,8 +199,8 @@ for batch_size in ${batch_size_list[*]}; do ...@@ -199,8 +199,8 @@ for batch_size in ${batch_size_list[*]}; do
speed_log_path="$SAVE_LOG/index" speed_log_path="$SAVE_LOG/index"
mkdir -p $log_path mkdir -p $log_path
mkdir -p $speed_log_path mkdir -p $speed_log_path
log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}_log" log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}log"
speed_log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}_speed" speed_log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}speed"
func_sed_params "$FILENAME" "${line_profile}" "null" # sed profile_id as null func_sed_params "$FILENAME" "${line_profile}" "null" # sed profile_id as null
cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} benchmark_train > ${log_path}/${log_name} 2>&1 " cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} benchmark_train > ${log_path}/${log_name} 2>&1 "
echo $cmd echo $cmd
...@@ -234,8 +234,8 @@ for batch_size in ${batch_size_list[*]}; do ...@@ -234,8 +234,8 @@ for batch_size in ${batch_size_list[*]}; do
speed_log_path="$SAVE_LOG/index" speed_log_path="$SAVE_LOG/index"
mkdir -p $log_path mkdir -p $log_path
mkdir -p $speed_log_path mkdir -p $speed_log_path
log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}_log" log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}log"
speed_log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}_speed" speed_log_name="${repo_name}_${model_name}_bs${batch_size}_${precision}_${run_mode}_${device_num}_${to_static}speed"
func_sed_params "$FILENAME" "${line_gpuid}" "$gpu_id" # sed used gpu_id func_sed_params "$FILENAME" "${line_gpuid}" "$gpu_id" # sed used gpu_id
func_sed_params "$FILENAME" "${line_profile}" "null" # sed --profile_option as null func_sed_params "$FILENAME" "${line_profile}" "null" # sed --profile_option as null
cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} benchmark_train > ${log_path}/${log_name} 2>&1 " cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} benchmark_train > ${log_path}/${log_name} 2>&1 "
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册