From 33d8697f1fc5d70c5dadcdccf895735a3b59b2b1 Mon Sep 17 00:00:00 2001 From: duanyanhui <45005871+YanhuiDua@users.noreply.github.com> Date: Wed, 10 May 2023 19:11:53 +0800 Subject: [PATCH] [npu-tipc] Minimize coco datasets for npu tipc (#8226) * change coco dataset for npu tipc * update link --- test_tipc/test_train_inference_python_npu.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test_tipc/test_train_inference_python_npu.sh b/test_tipc/test_train_inference_python_npu.sh index e759738d3..13fa71143 100644 --- a/test_tipc/test_train_inference_python_npu.sh +++ b/test_tipc/test_train_inference_python_npu.sh @@ -68,6 +68,22 @@ grep -n '.yml' $FILENAME | cut -d ":" -f 1 \ sed -i 's/aligned: True/aligned: False/g' "$sub_config_path" done done + + +# NPU lacks operators such as deformable_conv, depthwise_conv2d_transpose, +# which will affects ips. Here, we reduce the number of coco training sets +# for npu tipc bencnmark. This is a temporary hack. +# # TODO(duanyanhui): add vision ops for npu +train_img_num=`cat $REPO_ROOT_PATH/dataset/coco/annotations/instances_train2017.json | grep -o file_name | wc -l` +exp_num=8 +if [ ${train_img_num} != ${exp_num} ];then + echo "Replace with npu tipc coco training annotations" + mv $REPO_ROOT_PATH/dataset/coco/annotations/instances_train2017.json $REPO_ROOT_PATH/dataset/coco/annotations/instances_train2017_bak.json + wget https://paddle-device.bj.bcebos.com/tipc/instances_train2017.json + mv instances_train2017.json $REPO_ROOT_PATH/dataset/coco/annotations/ + rm -f instances_train2017.json +fi + # pass parameters to test_train_inference_python.sh cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} $2" echo $cmd -- GitLab