Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
3cb93edf
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
3cb93edf
编写于
2月 28, 2022
作者:
Z
zhangchunle
提交者:
GitHub
2月 28, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PR-CI-Py3 change cpu test (#39659)
* update;test=cpu-py3
上级
eb42dd52
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
162 addition
and
5 deletion
+162
-5
CMakeLists.txt
CMakeLists.txt
+1
-0
paddle/fluid/operators/math/CMakeLists.txt
paddle/fluid/operators/math/CMakeLists.txt
+1
-0
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+154
-3
python/paddle/fluid/tests/unittests/CMakeLists.txt
python/paddle/fluid/tests/unittests/CMakeLists.txt
+5
-2
python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt
...e/fluid/tests/unittests/distributed_passes/CMakeLists.txt
+1
-0
未找到文件。
CMakeLists.txt
浏览文件 @
3cb93edf
...
...
@@ -330,6 +330,7 @@ if(WITH_BRPC_RDMA)
endif
()
endif
()
if
(
WITH_GPU
)
include
(
cuda
)
# lite subgraph compilation depends on CUDNN_ROOT,
...
...
paddle/fluid/operators/math/CMakeLists.txt
浏览文件 @
3cb93edf
...
...
@@ -42,6 +42,7 @@ endif()
math_library
(
fc DEPS blas jit_kernel_helper
)
math_library
(
matrix_bit_code
)
math_library
(
unpooling
)
math_library
(
vol2col
)
math_library
(
prelu
)
...
...
paddle/scripts/paddle_build.sh
浏览文件 @
3cb93edf
...
...
@@ -713,10 +713,159 @@ EOF
fi
}
function
run_linux_cpu_test
()
{
mkdir
-p
${
PADDLE_ROOT
}
/build
cd
${
PADDLE_ROOT
}
/build
pip
install
hypothesis
pip
install
${
PADDLE_ROOT
}
/build/python/dist/
*
whl
cp
${
PADDLE_ROOT
}
/build/python/paddle/fluid/tests/unittests/op_test.py
${
PADDLE_ROOT
}
/build/python
ut_total_startTime_s
=
`
date
+%s
`
if
[
${
WITH_TESTING
:-
ON
}
==
"ON"
]
;
then
cat
<<
EOF
========================================
Running unit tests ...
========================================
EOF
set
-x
export
TEST_NUM_PERCENT_CASES
=
0.15
bash
$PADDLE_ROOT
/tools/check_added_ut.sh
if
[
-a
"
$PADDLE_ROOT
/duplicate_ut"
]
;
then
duplicate_uts
=
$(
cat
$PADDLE_ROOT
/duplicate_ut|sed
-e
's/\r//g'
)
if
[[
"
$duplicate_uts
"
!=
""
]]
;
then
set
+x
echo
"========================================"
echo
"The new unit test has the same name as the existing unit test"
cat
"
$PADDLE_ROOT
/duplicate_ut"
echo
"========================================"
exit
102
;
set
-x
fi
fi
if
[
-a
"
$PADDLE_ROOT
/added_ut"
]
;
then
added_uts
=
^
$(
awk
BEGIN
{
RS
=
EOF
}
'{gsub(/\n/,"$|^");print}'
$PADDLE_ROOT
/added_ut
)
$
ctest
-R
"(
${
added_uts
}
)"
-LE
"RUN_TYPE=DIST|RUN_TYPE=EXCLUSIVE"
--output-on-failure
--repeat-until-fail
3
--timeout
15
;
added_ut_error
=
$?
ctest
-R
"(
${
added_uts
}
)"
-L
"RUN_TYPE=DIST|RUN_TYPE=EXCLUSIVE"
--output-on-failure
--repeat-until-fail
3
--timeout
15
;
added_ut_error_1
=
$?
if
[
"
$added_ut_error
"
!=
0
]
&&
[
"
$added_ut_error_1
"
!=
0
]
;
then
echo
"========================================"
echo
"Added UT should not exceed 15 seconds"
echo
"========================================"
exit
8
;
fi
fi
set
+x
EXIT_CODE
=
0
;
tmpfile_rand
=
`
date
+%s%N
`
tmpfile
=
$tmp_dir
/
$tmpfile_rand
get_quickly_disable_ut||disable_ut_quickly
=
'disable_ut'
# indicate whether the case was in quickly disable list
if
[
${
NIGHTLY_MODE
:-
OFF
}
==
"ON"
]
;
then
nightly_label
=
"NIGHTLY_LABEL"
else
nightly_label
=
"RUN_TYPE=NIGHTLY|RUN_TYPE=DIST:NIGHTLY|RUN_TYPE=EXCLUSIVE:NIGHTLY"
echo
"========================================="
echo
"Unittests with nightly labels are only run at night"
echo
"========================================="
fi
get_precision_ut_mac
ut_actual_total_startTime_s
=
`
date
+%s
`
if
[[
"
$on_precision
"
==
"0"
]]
;
then
ctest
-E
"
$disable_ut_quickly
"
-LE
${
nightly_label
}
--output-on-failure
-j
$2
|
tee
$tmpfile
else
ctest
-R
"
$UT_list_prec
"
-E
"
$disable_ut_quickly
"
-LE
${
nightly_label
}
--output-on-failure
-j
$2
|
tee
$tmpfile
tmpfile_rand
=
`
date
+%s%N
`
tmpfile
=
$tmp_dir
/
$tmpfile_rand
ctest
-R
"
$UT_list_prec_1
"
-E
"
$disable_ut_quickly
"
-LE
${
nightly_label
}
--output-on-failure
-j
$2
|
tee
$tmpfile
fi
collect_failed_tests
rm
-f
$tmp_dir
/
*
exec_times
=
0
retry_unittests_record
=
''
retry_time
=
4
exec_time_array
=(
'first'
'second'
'third'
'fourth'
)
parallel_failed_tests_exec_retry_threshold
=
120
exec_retry_threshold
=
30
is_retry_execuate
=
0
rerun_ut_startTime_s
=
`
date
+%s
`
if
[
-n
"
$failed_test_lists
"
]
;
then
EXIT_CODE
=
1
if
[
${
TIMEOUT_DEBUG_HELP
:-
OFF
}
==
"ON"
]
;
then
bash
$PADDLE_ROOT
/tools/timeout_debug_help.sh
"
$failed_test_lists
"
# cat logs for tiemout uts which killed by ctest
fi
read
need_retry_ut_str
<<<
$(
echo
"
$failed_test_lists
"
|
grep
-oEi
"
\-
.+
\(
.+
\)
"
|
sed
's/(.\+)//'
|
sed
's/- //'
)
need_retry_ut_arr
=(
${
need_retry_ut_str
}
)
need_retry_ut_count
=
${#
need_retry_ut_arr
[@]
}
read
retry_unittests
<<<
$(
echo
"
$failed_test_lists
"
|
grep
-oEi
"
\-
.+
\(
.+
\)
"
|
sed
's/(.\+)//'
|
sed
's/- //'
)
while
(
[
$exec_times
-lt
$retry_time
]
)
do
if
[[
"
${
exec_times
}
"
==
"0"
]]
;
then
if
[
$need_retry_ut_count
-lt
$parallel_failed_tests_exec_retry_threshold
]
;
then
is_retry_execuate
=
0
else
is_retry_execuate
=
1
fi
elif
[[
"
${
exec_times
}
"
==
"1"
]]
;
then
read
need_retry_ut_str
<<<
$(
echo
"
$failed_test_lists
"
|
grep
-oEi
"
\-
.+
\(
.+
\)
"
|
sed
's/(.\+)//'
|
sed
's/- //'
)
need_retry_ut_arr
=(
${
need_retry_ut_str
}
)
need_retry_ut_count
=
${#
need_retry_ut_arr
[@]
}
if
[
$need_retry_ut_count
-lt
$exec_retry_threshold
]
;
then
is_retry_execuate
=
0
else
is_retry_execuate
=
1
fi
fi
if
[[
"
$is_retry_execuate
"
==
"0"
]]
;
then
set
+e
retry_unittests_record
=
"
$retry_unittests_record$failed_test_lists
"
failed_test_lists_ult
=
`
echo
"
${
failed_test_lists
}
"
|grep
-Po
'[^ ].*$'
`
set
-e
if
[[
"
${
exec_times
}
"
==
"1"
]]
||
[[
"
${
exec_times
}
"
==
"2"
]]
;
then
if
[[
"
${
failed_test_lists
}
"
==
""
]]
;
then
break
else
read
retry_unittests
<<<
$(
echo
"
$failed_test_lists
"
|
grep
-oEi
"
\-
.+
\(
.+
\)
"
|
sed
's/(.\+)//'
|
sed
's/- //'
)
fi
fi
echo
"========================================="
echo
"This is the
${
exec_time_array
[
$exec_times
]
}
time to re-run"
echo
"========================================="
echo
"The following unittest will be re-run:"
echo
"
${
retry_unittests
}
"
retry_unittests_regular
=
''
for
line
in
${
retry_unittests
[@]
}
;
do
if
[[
"
$retry_unittests_regular
"
==
""
]]
;
then
retry_unittests_regular
=
"^
$line
$"
else
retry_unittests_regular
=
"
$retry_unittests_regular
|^
$line
$"
fi
done
failed_test_lists
=
''
ctest
-R
"
$retry_unittests_regular
"
--output-on-failure
-j
2 |
tee
$tmpfile
collect_failed_tests
rm
-f
$tmp_dir
/
*
exec_times
=
$[$exec_times
+1]
else
break
fi
done
retry_unittests_record
=
"
$retry_unittests_record$failed_test_lists
"
fi
rerun_ut_endTime_s
=
`
date
+%s
`
echo
"ipipe_log_param_Rerun_TestCases_Total_Time:
$[
$rerun_ut_endTime_s
-
$rerun_ut_startTime_s
]s"
>>
${
PADDLE_ROOT
}
/build/build_summary.txt
ut_actual_total_endTime_s
=
`
date
+%s
`
echo
"ipipe_log_param_actual_TestCases_Total_Time:
$[
$ut_actual_total_endTime_s
-
$ut_actual_total_startTime_s
]s"
echo
"ipipe_log_param_actual_TestCases_Total_Time:
$[
$ut_actual_total_endTime_s
-
$ut_actual_total_startTime_s
]s"
>>
${
PADDLE_ROOT
}
/build/build_summary.txt
if
[[
"
$EXIT_CODE
"
!=
"0"
]]
;
then
show_ut_retry_result
fi
set
-ex
fi
}
function
get_precision_ut_mac
()
{
on_precision
=
0
UT_list
=
$(
ctest
-N
|
awk
-F
': '
'{print $2}'
|
sed
'/^$/d'
|
sed
'$d'
)
precison_cases
=
""
precis
i
on_cases
=
""
if
[
${
PRECISION_TEST
:-
OFF
}
==
"ON"
]
;
then
python3.7
$PADDLE_ROOT
/tools/get_pr_ut.py
if
[[
-f
"ut_list"
]]
;
then
...
...
@@ -2691,9 +2840,11 @@ function main() {
cmake_gen
${
PYTHON_ABI
:-
""
}
build_mac
;;
cicheck_py3
5
)
cicheck_py3
7
)
cmake_gen_and_build
${
PYTHON_ABI
:-
""
}
${
parallel_number
}
parallel_test
run_linux_cpu_test
${
PYTHON_ABI
:-
""
}
${
PROC_RUN
:-
1
}
#parallel_test
;;
cpu_cicheck_py35
)
cmake_gen_and_build
${
PYTHON_ABI
:-
""
}
${
parallel_number
}
...
...
python/paddle/fluid/tests/unittests/CMakeLists.txt
浏览文件 @
3cb93edf
...
...
@@ -590,7 +590,10 @@ foreach(TEST_OP ${TEST_OPS})
py_test_modules
(
${
TEST_OP
}
MODULES
${
TEST_OP
}
)
endforeach
(
TEST_OP
)
py_test_modules
(
test_adam_op_multi_thread MODULES test_adam_op ENVS FLAGS_inner_op_parallelism=4
)
py_test_modules
(
test_warpctc_op MODULES test_warpctc_op
)
if
(
WITH_GPU OR WITH_XPU OR WITH_ASCEND OR WITH_ASCEND_CL
)
py_test_modules
(
test_warpctc_op MODULES test_warpctc_op
)
set_tests_properties
(
test_warpctc_op PROPERTIES TIMEOUT 120
)
endif
()
py_test_modules
(
test_bilinear_interp_op MODULES test_bilinear_interp_op ENVS
${
GC_ENVS
}
)
py_test_modules
(
test_nearest_interp_op MODULES test_nearest_interp_op ENVS
${
GC_ENVS
}
)
py_test_modules
(
test_imperative_resnet MODULES test_imperative_resnet ENVS
...
...
@@ -935,7 +938,7 @@ set_tests_properties(test_cross_op PROPERTIES TIMEOUT 120)
set_tests_properties
(
test_imperative_lod_tensor_to_selected_rows PROPERTIES TIMEOUT 200
)
set_tests_properties
(
test_lstm_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_imperative_star_gan_with_gradient_penalty PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_warpctc_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_bicubic_interp_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_deformable_conv_op PROPERTIES TIMEOUT 120
)
set_tests_properties
(
test_nearest_interp_op PROPERTIES TIMEOUT 120
)
...
...
python/paddle/fluid/tests/unittests/distributed_passes/CMakeLists.txt
浏览文件 @
3cb93edf
...
...
@@ -10,6 +10,7 @@ if ((NOT WITH_GPU) AND (NOT WITH_XPU) AND NOT (WITH_ASCEND OR WITH_ASCEND_CL))
list
(
REMOVE_ITEM TEST_OPS
"test_dist_fuse_relu_depthwise_conv_pass"
)
list
(
REMOVE_ITEM TEST_OPS
"test_dist_fuse_sgd_pass"
)
list
(
REMOVE_ITEM TEST_OPS
"test_dist_gradient_merge_pass"
)
list
(
REMOVE_ITEM TEST_OPS
"test_dist_inplace_addto_pass"
)
list
(
REMOVE_ITEM TEST_OPS
"test_auto_parallel_amp_pass"
)
list
(
REMOVE_ITEM TEST_OPS
"test_auto_parallel_recompute_pass"
)
list
(
REMOVE_ITEM TEST_OPS
"test_auto_parallel_sharding_pass"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录