From 1e2cd730d2afb6cc88dbc8dde6153fe8fab1e9fb Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Fri, 20 Aug 2021 10:22:31 +0800 Subject: [PATCH 1/2] Add run function log --- tools/test_ci_op_benchmark.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tools/test_ci_op_benchmark.sh b/tools/test_ci_op_benchmark.sh index 8dd5c9703c01a..bf8a6a6bc17f5 100644 --- a/tools/test_ci_op_benchmark.sh +++ b/tools/test_ci_op_benchmark.sh @@ -36,6 +36,7 @@ function LOG { # Limit cu file directory function match_cu_file_directory { + LOG "[INFO] run function match_cu_file_directory" local sub_dir cu_file_dir cu_file_dir=$(dirname ${1}) for sub_dir in "" "/elementwise" "/reduce_ops" @@ -47,6 +48,7 @@ function match_cu_file_directory { # Load op files by header file 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) do @@ -68,6 +70,7 @@ function load_CHANGE_OP_FILES_by_header_file { # Load op files that PR changes function load_CHANGE_OP_FILES { + LOG "[INFO] run function load_CHANGE_OP_FILES" local sub_dir change_file # TODO(Avin0323): Need to filter the files added by the new OP. for change_file in $(git diff --name-only origin/develop) @@ -108,6 +111,7 @@ function prepare_benchmark_environment { # Load unique op name from CHANGE_OP_FILES function load_CHANGE_OP_MAP { + LOG "[INFO] run function load_CHANGE_OP_MAP" local op_name change_file change_file_name source benchmark/ci/scripts/op_benchmark.config for change_file in ${CHANGE_OP_FILES[@]} @@ -133,6 +137,7 @@ function load_CHANGE_OP_MAP { # Load ops that will run benchmark test function load_BENCHMARK_OP_MAP { + LOG "[INFO] run function load_BENCHMARK_OP_MAP" local line op_name api_name source benchmark/ci/scripts/op_benchmark.config for line in $(cat api_info.txt) @@ -173,6 +178,7 @@ function compile_install_paddlepaddle { } function build_whl { + LOG "[INFO] run function build_whl" for branch_name in "develop" "test" do git checkout ${branch_name} @@ -184,6 +190,7 @@ function build_whl { # run op benchmark test function run_op_benchmark_test { + LOG "[INFO] run function run_op_benchmark_test" [ ${#BENCHMARK_OP_MAP[*]} -eq 0 ] && return local logs_dir op_name branch_name api_info_file [ -z "$VISIBLE_DEVICES" ] && export VISIBLE_DEVICES=0 @@ -219,6 +226,7 @@ function run_op_benchmark_test { # check benchmark result function check_op_benchmark_result { + LOG "[INFO] run function check_op_benchmark_result" local logs_dir api_info_file check_status_code # default 3 times [ -z "${RETRY_TIMES}" ] && RETRY_TIMES=3 @@ -254,6 +262,7 @@ function check_op_benchmark_result { } function check_CHANGE_OP_MAP { + LOG "[INFO] run function check_CHANGE_OP_MAP" for op_name in ${!CHANGE_OP_MAP[@]} do if [ -z "${BENCHMARK_OP_MAP[$op_name]}" ] @@ -271,6 +280,7 @@ function check_CHANGE_OP_MAP { # diff benchmakr result and miss op function summary_problems { + LOG "[INFO] run function summary_problems" local op_name exit_code exit_code=0 if [ ${#BENCHMARK_OP_MAP[*]} -ne 0 ] @@ -297,6 +307,8 @@ function cpu_op_benchmark { function gpu_op_benchmark { LOG "[INFO] Start run op benchmark gpu test ..." + load_CHANGE_OP_FILES + load_CHANGE_OP_MAP load_BENCHMARK_OP_MAP run_op_benchmark_test summary_problems From 6484df63bea4a6c0905946487c2d4834f48b1d68 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Fri, 20 Aug 2021 10:24:39 +0800 Subject: [PATCH 2/2] test=document_fix --- tools/test_ci_op_benchmark.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/test_ci_op_benchmark.sh b/tools/test_ci_op_benchmark.sh index bf8a6a6bc17f5..b76013e224f08 100644 --- a/tools/test_ci_op_benchmark.sh +++ b/tools/test_ci_op_benchmark.sh @@ -280,7 +280,7 @@ function check_CHANGE_OP_MAP { # diff benchmakr result and miss op function summary_problems { - LOG "[INFO] run function summary_problems" + LOG "[INFO] run function summary_problems" local op_name exit_code exit_code=0 if [ ${#BENCHMARK_OP_MAP[*]} -ne 0 ]