Skip to content

Commit 4f1bffe

Browse files
authored
cinn_coverage (#61384)
* cinn_coverage * update * update * update, test=document_fix * Update paddle_build.sh,test=document_fix * Update paddle_coverage.sh,test=document_fix * Update paddle_coverage.sh,test=document_fix * Update paddle_coverage.sh,test=document_fix
1 parent 867a6d9 commit 4f1bffe

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

paddle/scripts/paddle_build.sh

+3
Original file line numberDiff line numberDiff line change
@@ -4223,6 +4223,9 @@ function main() {
42234223
;;
42244224
test)
42254225
parallel_test
4226+
if [ "${WITH_CINN}" == "ON" ] ; then
4227+
check_coverage
4228+
fi
42264229
;;
42274230
single_test)
42284231
single_test $2

tools/coverage/paddle_coverage.sh

+33
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,30 @@ lcov --capture -d ./ -o coverage.info --rc lcov_branch_coverage=0
3939

4040
# full html report
4141

42+
function gen_full_html_report_cinn(){
43+
lcov --extract coverage.info \
44+
'/paddle/paddle/cinn/adt/*' \
45+
'/paddle/paddle/cinn/api/*' \
46+
'/paddle/paddle/cinn/ast_gen_ius/*' \
47+
'/paddle/paddle/cinn/auto_schedule/*' \
48+
'/paddle/paddle/cinn/backends/*' \
49+
'/paddle/paddle/cinn/common/*' \
50+
'/paddle/paddle/cinn/frontend/*' \
51+
'/paddle/paddle/cinn/hlir/*' \
52+
'/paddle/paddle/cinn/ir/*' \
53+
'/paddle/paddle/cinn/lang/*' \
54+
'/paddle/paddle/cinn/optim/*' \
55+
'/paddle/paddle/cinn/poly/*' \
56+
'/paddle/paddle/cinn/pybind/*' \
57+
'/paddle/paddle/cinn/runtime/*' \
58+
'/paddle/paddle/cinn/utils/*' \
59+
-o coverage-full.tmp \
60+
--rc lcov_branch_coverage=0
61+
62+
mv -f coverage-full.tmp coverage-full.info
63+
}
64+
65+
4266
function gen_full_html_report() {
4367
lcov --extract coverage.info \
4468
'/paddle/paddle/fluid/framework/*' \
@@ -120,6 +144,12 @@ else
120144
gen_full_html_report || true
121145
fi
122146

147+
if [ ${WITH_CINN:-OFF} == "ON" ]; then
148+
gen_full_html_report_cinn || true
149+
else
150+
gen_full_html_report || true
151+
fi
152+
123153
# diff html report
124154

125155
function gen_diff_html_report() {
@@ -222,5 +252,8 @@ fi
222252

223253
if [ "$COVERAGE_LINES_ASSERT" = "1" ] || [ "$PYTHON_COVERAGE_LINES_ASSERT" = "1" ]; then
224254
echo "exit 9" > /tmp/paddle_coverage.result
255+
if [ ${WITH_CINN} == "ON" ]; then
256+
echo "You must one RD(liuhongyu or lanxiang or zhenghuihuang or tianchao or zhangliujie)to approval this PR."
257+
fi
225258
exit 9
226259
fi

0 commit comments

Comments
 (0)