Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIPC]update xpu tipc script #3459

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test_tipc/test_train_inference_python_xpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,25 @@ fi
# change gpu to xpu in tipc txt configs
sed -i "s/Global.use_gpu/Global.use_xpu/g" $FILENAME
sed -i "s/--device gpu/--device xpu/g" $FILENAME
sed -i "s/--device:gpu/--device:xpu/g" $FILENAME
sed -i "s/--device:cpu|gpu/--device:cpu|xpu/g" $FILENAME
# disable benchmark as AutoLog required nvidia-smi command
sed -i "s/--benchmark:True/--benchmark:False/g" $FILENAME
# python has been updated to version 3.9 for npu backend
sed -i "s/python3.7/python3.9/g" $FILENAME
dataline=`cat $FILENAME`

# parser params
IFS=$'\n'
lines=(${dataline})
modelname=$(func_parser_value "${lines[1]}")

if [ $modelname == "hrnet_w48_contrast" ] || [ $modelname == "pfpnnet" ] || [ $modelname == "knet" ] \
|| [ $modelname == "maskformer" ] || [ $modelname == "ocrnet_hrformer_small" ];then
sed -i "s/lite_train_lite_infer=20/lite_train_lite_infer=2/g" $FILENAME
sed -i "s/--save_interval 500/--save_interval 50/g" $FILENAME
fi

# change gpu to xpu in execution script
sed -i "s/\"gpu\"/\"xpu\"/g" test_tipc/test_train_inference_python.sh

Expand Down