Skip to content

[npu-tipc] Minimize coco datasets for npu tipc #8226

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

Merged
merged 2 commits into from
May 10, 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
16 changes: 16 additions & 0 deletions test_tipc/test_train_inference_python_npu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,22 @@ grep -n '.yml' $FILENAME | cut -d ":" -f 1 \
sed -i 's/use_gpu/use_npu/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
Expand Down