未验证 提交 e7f2bf37 编写于 作者: Z Zhang Zheng 提交者: GitHub

Add pten change file check for op benchmark (#38796)

* Add pten change file check for op benchmark

* fix style format

* test

* revert
上级 676903d5
......@@ -43,6 +43,10 @@ function match_cu_file_directory {
do
[ "${cu_file_dir}" == "paddle/fluid/operators${sub_dir}" ] && return 0
done
for sub_dir in "" "/gpu" "/hybird"
do
[ "${cu_file_dir}" == "paddle/pten/kernels${sub_dir}" ] && return 0
done
return 1
}
......@@ -50,7 +54,7 @@ function match_cu_file_directory {
function load_CHANGE_OP_FILES_by_header_file {
LOG "[INFO] run function load_CHANGE_OP_FILES_by_header_file"
local change_file
for change_file in $(grep -rl "${1}" paddle/fluid/operators)
for change_file in $(grep -rl "${1}" paddle/fluid/operators paddle/pten/kernels/)
do
if [[ "$change_file" =~ "_op.cu" ]]
then
......@@ -76,7 +80,7 @@ function load_CHANGE_OP_FILES {
for change_file in $(git diff --name-only develop)
do
# match directory limit
[[ "$change_file" =~ "paddle/fluid/operators/" ]] || continue
[[ "$change_file" =~ "paddle/fluid/operators/" ]] || [[ "$change_file" =~ "paddle/pten/kernels/" ]] || continue
# match file name limit
if [[ "$change_file" =~ "_op.cu" ]]
then
......@@ -295,7 +299,6 @@ if [ -n "${approval_line}" ]; then
exit 0
fi
fi
set -x
case $1 in
run_op_benchmark)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册