From c9bc2758787bbb8e03f5ee37c8bb5884718ec3a1 Mon Sep 17 00:00:00 2001 From: Zhanlue Yang Date: Wed, 22 Dec 2021 10:00:04 +0800 Subject: [PATCH] Added check_file_diff_approvals for tensor and lod_tensor (#38314) --- tools/check_file_diff_approvals.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index 0b705f88ea..98d32e3c55 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -229,6 +229,18 @@ if [ "${HAS_MODIFIED_ALLOCATION}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then check_approval 2 6888866 39303645 fi +HAS_MODIFIED_TENSOR=`git diff --name-only upstream/$BRANCH | grep "paddle/fluid/framework/tensor" || true` +if [ "${HAS_MODIFIED_TENSOR}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then + echo_line="You must be approved by jim19930609 and chenwhql for paddle/fluid/memory/tensor.\nIt is being modularized and refactored. Thanks!\n" + check_approval 2 22561442 22334008 + fi + +HAS_MODIFIED_LOD_TENSOR=`git diff --name-only upstream/$BRANCH | grep "paddle/fluid/framework/lod_tensor" || true` +if [ "${HAS_MODIFIED_TENSOR}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then + echo_line="You must be approved by jim19930609 and chenwhql for paddle/fluid/memory/lod_tensor.\nIt is being modularized and refactored. Thanks!\n" + check_approval 2 22561442 22334008 + fi + ALLOCSHARED_FILE_CHANGED=`git diff --name-only --diff-filter=AM upstream/$BRANCH |grep -E "*\.(h|cc)" || true` if [ "${ALLOCSHARED_FILE_CHANGED}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then ERROR_LINES="" -- GitLab