未验证 提交 4420a5f6 编写于 作者: D duanyanhui 提交者: GitHub

[npu-tipc] update npu tipc scripts (#10102)

* update npu tipc scripts

* update
上级 e44c2af7
......@@ -35,12 +35,20 @@ dataline=`cat $FILENAME`
IFS=$'\n'
lines=(${dataline})
modelname=$(echo ${lines[1]} | cut -d ":" -f2)
if [ $modelname == "rec_r31_sar" ] || [ $modelname == "rec_mtb_nrtr" ]; then
sed -i "s/Global.epoch_num:lite_train_lite_infer=2/Global.epoch_num:lite_train_lite_infer=1/g" $FILENAME
sed -i "s/gpu_list:0|0,1/gpu_list:0,1/g" $FILENAME
sed -i "s/Global.use_npu:True|True/Global.use_npu:True/g" $FILENAME
fi
# replace training config file
grep -n 'tools/.*yml' $FILENAME | cut -d ":" -f 1 \
| while read line_num ; do
train_cmd=$(func_parser_value "${lines[line_num-1]}")
trainer_config=$(func_parser_config ${train_cmd})
sed -i 's/use_gpu/use_npu/g' "$REPO_ROOT_PATH/$trainer_config"
sed -i 's/use_sync_bn: True/use_sync_bn: False/g' "$REPO_ROOT_PATH/$trainer_config"
done
# change gpu to npu in execution script
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册