Skip to content

Commit c9527f9

Browse files
authored
[npu-tipc] Minimize coco datasets for npu tipc (#8226) (#8230)
* change coco dataset for npu tipc * update link
1 parent f767a3a commit c9527f9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test_tipc/test_train_inference_python_npu.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,22 @@ grep -n '.yml' $FILENAME | cut -d ":" -f 1 \
6868
sed -i 's/aligned: True/aligned: False/g' "$sub_config_path"
6969
done
7070
done
71+
72+
73+
# NPU lacks operators such as deformable_conv, depthwise_conv2d_transpose,
74+
# which will affects ips. Here, we reduce the number of coco training sets
75+
# for npu tipc bencnmark. This is a temporary hack.
76+
# # TODO(duanyanhui): add vision ops for npu
77+
train_img_num=`cat $REPO_ROOT_PATH/dataset/coco/annotations/instances_train2017.json | grep -o file_name | wc -l`
78+
exp_num=8
79+
if [ ${train_img_num} != ${exp_num} ];then
80+
echo "Replace with npu tipc coco training annotations"
81+
mv $REPO_ROOT_PATH/dataset/coco/annotations/instances_train2017.json $REPO_ROOT_PATH/dataset/coco/annotations/instances_train2017_bak.json
82+
wget https://paddle-device.bj.bcebos.com/tipc/instances_train2017.json
83+
mv instances_train2017.json $REPO_ROOT_PATH/dataset/coco/annotations/
84+
rm -f instances_train2017.json
85+
fi
86+
7187
# pass parameters to test_train_inference_python.sh
7288
cmd="bash test_tipc/test_train_inference_python.sh ${FILENAME} $2"
7389
echo $cmd

0 commit comments

Comments
 (0)