提交 a4db6f11 编写于 作者: D duanyanhui 提交者: cuicheng01

fix npu tipc scripts to reduce running time

上级 a29d4896
......@@ -91,7 +91,7 @@ infer_value1=$(func_parser_value "${lines[50]}")
if [ ! $epoch_num ]; then
epoch_num=2
fi
if [[ $MODE = 'benchmark_train' ]]; then
if [[ $MODE = 'benchmark_train' ]] || [[ $train_use_gpu_value = 'npu' ]]; then
epoch_num=1
fi
......
......@@ -21,6 +21,15 @@ FILENAME=$1
# change gpu to npu in tipc txt configs
sed -i "s/Global.device:gpu/Global.device:npu/g" $FILENAME
sed -i "s/Global.use_gpu/Global.use_npu/g" $FILENAME
sed -i "s/Global.use_tensorrt:True|False/Global.use_tensorrt:False/g" $FILENAME
sed -i "s/Global.save_interval=2/Global.save_interval=1/g" $FILENAME
sed -i "s/-o Global.epochs:lite_train_lite_infer=2/-o Global.epochs:lite_train_lite_infer=1/g" $FILENAME
modelname=$(echo $FILENAME | cut -d '/' -f4)
if [ $modelname == "PVTV2" ] || [ $modelname == "Twins" ] || [ $modelname == "SwinTransformer" ]; then
sed -i "s/gpu_list:0|0,1/gpu_list:0,1/g" $FILENAME
fi
dataline=`cat $FILENAME`
# parser params
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册