Skip to content

Commit 7a22b38

Browse files
zrr1999claude
andauthored
[CI] Add approval check for paddle/phi directory changes (PaddlePaddle#78386)
* [CI] Add approval check for paddle/phi directory changes Require approval from wanghuancoder, zrr1999, or DanielSun11 when paddle/phi/ files are modified, and prompt developers to run 0-Size Tensor, BigTensor, and Precision tests before merging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c88d48f commit 7a22b38

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

ci/check_approval.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,23 @@ if [ -n "${BIGTENSOR_CHANGED}" ]; then
618618
fi
619619

620620

621+
HAS_MODIFIED_PHI_DIR=`git diff --name-only upstream/$BRANCH | grep "paddle/phi/" | grep -v "paddle/phi/api/" || true`
622+
if [ "${HAS_MODIFIED_PHI_DIR}" != "" ] && [ "${PR_ID}" != "" ]; then
623+
echo_line="You modified files in paddle/phi/ directory. You must have one RD (wanghuancoder, zrr1999, DanielSun11) approval.\n"
624+
echo_line="${echo_line}[IMPORTANT] Please ensure you have run the following tests before merging:\n"
625+
echo_line="${echo_line} 1. 0-Size Tensor test\n"
626+
echo_line="${echo_line} 2. BigTensor test\n"
627+
echo_line="${echo_line} 3. Precision test\n"
628+
echo_line="${echo_line}You can copy the following prompt to your AI agent to help run these tests:\n"
629+
echo_line="${echo_line}---\n"
630+
echo_line="${echo_line}Please run the following tests for my paddle/phi changes and report results:\n"
631+
echo_line="${echo_line}1) 0-Size Tensor test: verify all modified ops handle empty tensors (shape with 0) without crashing.\n"
632+
echo_line="${echo_line}2) BigTensor test: verify all modified ops handle large tensors (with numel > INT32_MAX) correctly, especially checking for int32 index overflow.\n"
633+
echo_line="${echo_line}3) Precision test: verify all modified ops produce numerically consistent results against the baseline (develop branch), checking both float32 and float16/bfloat16 dtypes.\n"
634+
echo_line="${echo_line}---\n"
635+
check_approval 1 wanghuancoder zrr1999 DanielSun11
636+
fi
637+
621638
if [ -n "${echo_list}" ];then
622639
echo "****************"
623640
echo -e "${echo_list[@]}"

0 commit comments

Comments
 (0)