From 00fa71d88bd21e059c9437eb96069ad03bbec7c6 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Mon, 25 Jul 2022 20:33:17 +0800 Subject: [PATCH] set benchmark_train dynamic shape --- test_tipc/benchmark_train.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test_tipc/benchmark_train.sh b/test_tipc/benchmark_train.sh index c74054ed..19c288ff 100644 --- a/test_tipc/benchmark_train.sh +++ b/test_tipc/benchmark_train.sh @@ -21,6 +21,20 @@ function func_parser_params(){ echo ${tmp} } +function set_dynamic_epoch(){ + string=$1 + num=$2 + _str=${string:1:6} + IFS="C" + arr=(${_str}) + M=${arr[0]} + P=${arr[1]} + gn=`expr $P - 1` + gpu_num=`expr $gn / $M` + ep=`expr $num \* $M \* $P` + echo $ep +} + function func_sed_params(){ filename=$1 line=$2 @@ -142,7 +156,7 @@ else if [ ${precision} = "fp16" ];then precision="amp" fi - + epoch=$(set_dynamic_epoch $device_num $epoch) fp_items_list=($precision) batch_size_list=($batch_size) device_num_list=($device_num) -- GitLab