diff --git a/test_tipc/benchmark_train.sh b/test_tipc/benchmark_train.sh index 1d1e209ac51a117af9cb9d875586f52e4ffe995d..c74054ed557f4d42c7db452fe41af6839f8ea6b7 100644 --- a/test_tipc/benchmark_train.sh +++ b/test_tipc/benchmark_train.sh @@ -150,10 +150,16 @@ fi IFS="|" for batch_size in ${batch_size_list[*]}; do - for precision in ${fp_items_list[*]}; do + for train_precision in ${fp_items_list[*]}; do for device_num in ${device_num_list[*]}; do # sed batchsize and precision - func_sed_params "$FILENAME" "${line_precision}" "$precision" + if [ ${train_precision} = "amp" ];then + precision="fp16" + else + precision="fp32" + fi + + func_sed_params "$FILENAME" "${line_precision}" "$train_precision" func_sed_params "$FILENAME" "${line_batchsize}" "$MODE=$batch_size" func_sed_params "$FILENAME" "${line_epoch}" "$MODE=$epoch" gpu_id=$(set_gpu_id $device_num)