From b77a431451ce8ea0b28d6c5915e62a92c9d874f2 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 4 Aug 2022 10:30:21 +0000 Subject: [PATCH] tipc: set num workers=12 iff fp16 --- test_tipc/benchmark_train.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test_tipc/benchmark_train.sh b/test_tipc/benchmark_train.sh index 2a73388a..f543a9fd 100644 --- a/test_tipc/benchmark_train.sh +++ b/test_tipc/benchmark_train.sh @@ -74,7 +74,6 @@ model_type=$4 IFS=$'\n' # parser params from train_benchmark.txt sed -i 's/ -o DataLoader.Train.sampler.shuffle=False/ -o Global.print_batch_step=1/g' $FILENAME -sed -i 's/ -o DataLoader.Train.loader.num_workers=0/ -o DataLoader.Train.loader.num_workers=12/g' $FILENAME sed -i 's/-o DataLoader.Train.loader.use_shared_memory=False/ -o Global.eval_during_train=False/g' $FILENAME dataline=`cat $FILENAME` # parser params @@ -178,9 +177,13 @@ for batch_size in ${batch_size_list[*]}; do func_sed_params "$FILENAME" "${line_batchsize}" "$batch_size" func_sed_params "$FILENAME" "${line_epoch}" "$epoch" gpu_id=$(set_gpu_id $device_num) + + sed -i 's/ -o DataLoader.Train.loader.num_workers=0//g' $FILENAME + if [[ ${precision} = "fp16" ]];then + sed -i 's/ -o Global.print_batch_step=1/ -o Global.print_batch_step=1 -o DataLoader.Train.loader.num_workers=12/g' $FILENAME + fi # if bs is big, then copy train_list.txt to generate more train log - # There are 5w image in train_list. And the train log printed interval is 10 iteration. # At least 25 log number would be good to calculate ips for benchmark system. # So the copy number for train_list is as follows: total_batch_size=`echo $[$batch_size*${device_num:1:1}*${device_num:3:3}]` -- GitLab