未验证 提交 da546c88 编写于 作者: C Chen Weihang 提交者: GitHub

Add ci rule for blocking legacy kernel registration (#45982)

* add ci rule for blocking legacy kernel registration, test=document_fix

* add a test case, test=document_fix

* Revert "add a test case, test=document_fix"

This reverts commit 239e08678b791aabb8fae48c4b74f2a8861e222d.

* polish desc, test=document_fix
上级 201d99d6
......@@ -213,6 +213,13 @@ if [ ${NO_INFRT_FILES} ] && [ ${HAS_LOG_FATAL} ] && [ "${GIT_PR_ID}" != "" ]; th
check_approval 1 6836917 47554610 22561442
fi
FILTER=`git diff --name-only upstream/develop | grep -v "tools/"`
HAS_LEGACY_KERNEL_REGISTRATION=`git diff -U0 upstream/$BRANCH $FILTER | grep '^\+' | grep -oE -m 1 "REGISTER_OP[A-Z_]{1,9}KERNEL[_FUNCTOR|_WITH_CUSTOM_TYPE|_EX]*" || true`
if [ ${HAS_LEGACY_KERNEL_REGISTRATION} ] && [ "${GIT_PR_ID}" != "" ]; then
echo_line="In principle, adding an OpKernel needs to be in the phi/kernels directory. If you must add an OpKernel in the fluid/operators directory, please request one of the RD (chenwhql, zyfncg, YuanRisheng, phlrain) review and approve.\n"
check_approval 1 chenwhql zyfncg YuanRisheng phlrain
fi
HAS_DEFINE_FLAG=`git diff -U0 upstream/$BRANCH |grep -o -m 1 "DEFINE_int32" |grep -o -m 1 "DEFINE_bool" | grep -o -m 1 "DEFINE_string" || true`
if [ ${HAS_DEFINE_FLAG} ] && [ "${GIT_PR_ID}" != "" ]; then
echo_line="You must have one RD lanxianghit approval for the usage (either add or delete) of DEFINE_int32/DEFINE_bool/DEFINE_string flag.\n"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册