Skip to content

Commit 8f94d34

Browse files
Add cpu/gpu for PR-CI-CPU-Py2 (#35174)
* notest;test=cpu_gpu * notest;test=cpu_gpu * notest;test=cpu_gpu * notest;test=cpu_gpu * notest;test=cpu_gpu * notest;test=cpu_gpu * notest;test=cpu_gpu * fix * fix
1 parent 20cfa8b commit 8f94d34

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

paddle/scripts/paddle_build.sh

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -732,8 +732,8 @@ function check_whl_size() {
732732
dev_whl_size=`du -m ${PADDLE_ROOT}/build/python/dist/*.whl|awk '{print $1}'`
733733
echo "dev_whl_size: ${dev_whl_size}"
734734

735-
whldiffSize=`expr ${pr_whl_size} - ${dev_whl_size}`
736-
if [ ${whldiffSize} -gt 10 ] ; then
735+
whldiffSize=`echo $(($pr_whl_size - $dev_whl_size))`
736+
if [ ${whldiffSize} -gt 10 ]; then
737737
approval_line=`curl -H "Authorization: token ${GITHUB_API_TOKEN}" https://api.github.com/repos/PaddlePaddle/Paddle/pulls/${GIT_PR_ID}/reviews?per_page=10000`
738738
APPROVALS=`echo ${approval_line}|python ${PADDLE_ROOT}/tools/check_pr_approval.py 1 22334008 22361972`
739739
echo "current pr ${GIT_PR_ID} got approvals: ${APPROVALS}"
@@ -2351,6 +2351,31 @@ function main() {
23512351
assert_api_spec_approvals
23522352
check_whl_size
23532353
;;
2354+
build_and_check_cpu)
2355+
set +e
2356+
check_style_info=$(check_style)
2357+
check_style_code=$?
2358+
find_temporary_files
2359+
generate_upstream_develop_api_spec ${PYTHON_ABI:-""} ${parallel_number}
2360+
cmake_gen_and_build ${PYTHON_ABI:-""} ${parallel_number}
2361+
check_sequence_op_unittest
2362+
generate_api_spec ${PYTHON_ABI:-""} "PR"
2363+
check_whl_size
2364+
echo 11111,$?
2365+
;;
2366+
build_and_check_gpu)
2367+
set +e
2368+
example_info_gpu=""
2369+
example_code_gpu=0
2370+
if [ "${WITH_GPU}" == "ON" ] ; then
2371+
example_info_gpu=$(exec_samplecode_test gpu)
2372+
example_code_gpu=$?
2373+
fi
2374+
example_info=$(exec_samplecode_test cpu)
2375+
example_code=$?
2376+
summary_check_problems $check_style_code $[${example_code_gpu} + ${example_code}] "$check_style_info" "${example_info_gpu}\n${example_info}"
2377+
assert_api_spec_approvals
2378+
;;
23542379
build)
23552380
cmake_gen ${PYTHON_ABI:-""}
23562381
build ${parallel_number}

0 commit comments

Comments
 (0)