diff --git a/paddle/fluid/framework/custom_operator.cc b/paddle/fluid/framework/custom_operator.cc index e7ed9f2108128d818ec24fbd2cd8554bc45a345d..5fa185f688734c8c448f9fa70bd0a0e3eb3deb73 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 78a8cc202fc1fdbe2038237143310a099f71d81a..9eaa08dd9c4cc1d16d1ed0ffae8fbd5e78e24b3e 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`