Skip to content
2 changes: 2 additions & 0 deletions python/paddle/tensor/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -6223,6 +6223,8 @@ def sgn(x, name=None):
(-1+0j) ]])

"""
paddle.jit.enable_to_static(True)
paddle.jit.enable_to_static(False)
if x.dtype not in [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅验证非单测中有 enable_to_static 不会报错

2023-12-15 17:38:01 DEPS_PHI_IN_IR:
2023-12-15 17:38:02 ****************-----------------
2023-12-15 17:38:02 ****************-----------------
2023-12-15 17:38:03 Requirement already satisfied: PyGithub in /home/v_duchun/anaconda3/lib/python3.8/site-packages (1.57)

image

paddle.float16,
paddle.float32,
Expand Down
11 changes: 11 additions & 0 deletions tools/check_file_diff_approvals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,17 @@ if [ "${DEPRECATED_FLAKE8}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then
check_approval 1 SigureMo gouzil
fi

TEST_FILE_ADDED_LINES=$(git diff -U0 upstream/$BRANCH -- test |grep "^+")
echo "****************-----------------"
echo $TEST_FILE_ADDED_LINES
ENABLE_TO_STATIC_CHECK=`echo "$TEST_FILE_ADDED_LINES" | grep "enable_to_static(" || true`
echo $ENABLE_TO_STATIC_CHECK
echo "****************-----------------"
if [ "${ENABLE_TO_STATIC_CHECK}" != "" ] && [ "${GIT_PR_ID}" != "" ]; then
echo_line="You must have one RD (SigureMo, Aurelius84 or 2742195759) approval for using 'paddle.jit.enable_to_static', we recommend using 'enable_to_static_guard' in the related test files.\n"
check_approval 1 SigureMo Aurelius84 2742195759
fi

HAS_MODIFIED_PHI_FILES=`git diff --name-only upstream/$BRANCH | grep "paddle/phi/" || true`
PHI_INCLUDE_FLUID_FILES=""
for CHANGE_FILE in ${HAS_MODIFIED_PHI_FILES}; do
Expand Down