From a93a95bfb421bc615dbae3d91b686f4fee7bc84c Mon Sep 17 00:00:00 2001 From: Chen Weihang Date: Wed, 21 Sep 2022 19:03:08 +0800 Subject: [PATCH] recover get ci check and fix typo (#46340) --- paddle/fluid/framework/custom_operator.cc | 2 +- tools/check_file_diff_approvals.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/paddle/fluid/framework/custom_operator.cc b/paddle/fluid/framework/custom_operator.cc index e7ed9f2108..5fa185f688 100644 --- a/paddle/fluid/framework/custom_operator.cc +++ b/paddle/fluid/framework/custom_operator.cc @@ -302,7 +302,7 @@ static void RunKernelFunc(const framework::ExecutionContext& ctx, PADDLE_THROW(platform::errors::External("%s", ex.what())); } catch (...) { PADDLE_THROW(platform::errors::Fatal( - "Custom operator raises an unknown exception in rumtime.")); + "Custom operator raises an unknown exception in runtime.")); } } diff --git a/tools/check_file_diff_approvals.sh b/tools/check_file_diff_approvals.sh index 78a8cc202f..9eaa08dd9c 100644 --- a/tools/check_file_diff_approvals.sh +++ b/tools/check_file_diff_approvals.sh @@ -205,6 +205,12 @@ if [ ${HAS_CONST_CAST} ] && [ "${GIT_PR_ID}" != "" ]; then check_approval 1 46782768 12538138 6836917 22561442 6888866 16605440 fi +HAS_PADDLE_GET=`git diff -U0 upstream/$BRANCH $FILTER |grep "^+" |grep -o -m 1 "paddle::get" || true` +if [ ${HAS_PADDLE_GET} ] && [ "${GIT_PR_ID}" != "" ]; then + echo_line="paddle::get is not recommended for direct use, because it may throw an bad_variant_access exception without any stack information, so please use PADDLE_GET(_**)(dtype, value) series macros here. If these macros cannot meet your needs, please use try-catch to handle paddle::get and request chenwhql (Recommend), luotao1 or lanxianghit review and approve.\n" + check_approval 1 6836917 47554610 22561442 +fi + # infrt needs to temporarily use LOG(FATAL) during the debugging period, and will replace it with standard error format in the future. NO_INFRT_FILES=`git diff --name-only upstream/develop | grep -v "tools/\|paddle/infrt/" || true` HAS_LOG_FATAL=`git diff -U0 upstream/$BRANCH $NO_INFRT_FILES |grep "^+" |grep -o -m 1 "LOG(FATAL)" || true` -- GitLab