提交 3d1fb324 编写于 作者: G gaotingquan 提交者: Tingquan Gao

tipc: support AMP O2

上级 595a6c5b
......@@ -24,6 +24,17 @@ function func_parser_value_lite(){
echo ${tmp}
}
function func_set_amp_params(){
key=$1
value=$2
if [[ ${value} = "fp16" ]];then
echo "-o AMP.scale_loss=128 -o AMP.use_dynamic_loss_scaling=True -o AMP.level=O2"
else
echo " "
fi
}
function func_set_params(){
key=$1
value=$2
......
......@@ -231,7 +231,7 @@ else
continue
fi
set_autocast=$(func_set_params "${autocast_key}" "${autocast}")
set_autocast=$(func_set_amp_params "${autocast_key}" "${autocast}")
set_epoch=$(func_set_params "${epoch_key}" "${epoch_num}")
set_pretrain=$(func_set_params "${pretrain_model_key}" "${pretrain_model_value}")
set_batchsize=$(func_set_params "${train_batch_key}" "${train_batch_value}")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册