From ab1a5b7069a446965b29546083cf35a3807ad842 Mon Sep 17 00:00:00 2001 From: DannyIsFunny <912790387@qq.com> Date: Mon, 10 Feb 2020 03:18:38 +0000 Subject: [PATCH 1/3] modify opt name test=develop --- lite/api/CMakeLists.txt | 6 +++--- lite/api/{model_optimize_tool.cc => opt.cc} | 2 +- lite/tools/build.sh | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) rename lite/api/{model_optimize_tool.cc => opt.cc} (99%) diff --git a/lite/api/CMakeLists.txt b/lite/api/CMakeLists.txt index d203b765180..f7f74ab5822 100644 --- a/lite/api/CMakeLists.txt +++ b/lite/api/CMakeLists.txt @@ -296,10 +296,10 @@ if (LITE_ON_TINY_PUBLISH) endif() if (LITE_ON_MODEL_OPTIMIZE_TOOL) - message(STATUS "Compiling model_optimize_tool") - lite_cc_binary(model_optimize_tool SRCS model_optimize_tool.cc cxx_api_impl.cc paddle_api.cc cxx_api.cc + message(STATUS "Compiling opt") + lite_cc_binary(opt SRCS opt.cc cxx_api_impl.cc paddle_api.cc cxx_api.cc DEPS gflags kernel op optimizer mir_passes utils) - add_dependencies(model_optimize_tool op_list_h kernel_list_h all_kernel_faked_cc supported_kernel_op_info_h) + add_dependencies(opt op_list_h kernel_list_h all_kernel_faked_cc supported_kernel_op_info_h) endif(LITE_ON_MODEL_OPTIMIZE_TOOL) lite_cc_test(test_paddle_api SRCS paddle_api_test.cc DEPS paddle_api_full paddle_api_light diff --git a/lite/api/model_optimize_tool.cc b/lite/api/opt.cc similarity index 99% rename from lite/api/model_optimize_tool.cc rename to lite/api/opt.cc index fc23e0b54be..c172169e59e 100644 --- a/lite/api/model_optimize_tool.cc +++ b/lite/api/opt.cc @@ -17,7 +17,7 @@ #include #endif // "supported_kernel_op_info.h", "all_kernel_faked.cc" and "kernel_src_map.h" -// are created automatically during model_optimize_tool's compiling period +// are created automatically during opt's compiling period #include #include "all_kernel_faked.cc" // NOLINT #include "kernel_src_map.h" // NOLINT diff --git a/lite/tools/build.sh b/lite/tools/build.sh index e1610b60d3b..a90d67ebbc2 100755 --- a/lite/tools/build.sh +++ b/lite/tools/build.sh @@ -62,17 +62,17 @@ function prepare_thirdparty { fi } -function build_model_optimize_tool { +function build_opt { cd $workspace prepare_thirdparty - mkdir -p build.model_optimize_tool - cd build.model_optimize_tool + mkdir -p build.opt + cd build.opt cmake .. -DWITH_LITE=ON \ -DLITE_ON_MODEL_OPTIMIZE_TOOL=ON \ -DWITH_TESTING=OFF \ -DLITE_BUILD_EXTRA=ON \ -DWITH_MKL=OFF - make model_optimize_tool -j$NUM_PROC + make opt -j$NUM_PROC } function make_tiny_publish_so { @@ -395,7 +395,7 @@ function main { shift ;; build_optimize_tool) - build_model_optimize_tool + build_opt shift ;; cuda) From 0ef83a0e5beb01480a4f3dacc5708cfeb2d61967 Mon Sep 17 00:00:00 2001 From: DannyIsFunny <912790387@qq.com> Date: Tue, 11 Feb 2020 02:00:02 +0000 Subject: [PATCH 2/3] fix code style test=develop --- lite/api/CMakeLists.txt | 6 +++--- lite/api/opt.cc | 2 +- lite/tools/build.sh | 2 +- lite/tools/ci_build.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lite/api/CMakeLists.txt b/lite/api/CMakeLists.txt index f7f74ab5822..e9f64d19edf 100644 --- a/lite/api/CMakeLists.txt +++ b/lite/api/CMakeLists.txt @@ -296,10 +296,10 @@ if (LITE_ON_TINY_PUBLISH) endif() if (LITE_ON_MODEL_OPTIMIZE_TOOL) - message(STATUS "Compiling opt") - lite_cc_binary(opt SRCS opt.cc cxx_api_impl.cc paddle_api.cc cxx_api.cc + message(STATUS "Compiling OPT") + lite_cc_binary(OPT SRCS opt.cc cxx_api_impl.cc paddle_api.cc cxx_api.cc DEPS gflags kernel op optimizer mir_passes utils) - add_dependencies(opt op_list_h kernel_list_h all_kernel_faked_cc supported_kernel_op_info_h) + add_dependencies(OPT op_list_h kernel_list_h all_kernel_faked_cc supported_kernel_op_info_h) endif(LITE_ON_MODEL_OPTIMIZE_TOOL) lite_cc_test(test_paddle_api SRCS paddle_api_test.cc DEPS paddle_api_full paddle_api_light diff --git a/lite/api/opt.cc b/lite/api/opt.cc index c172169e59e..249656a5cce 100644 --- a/lite/api/opt.cc +++ b/lite/api/opt.cc @@ -17,7 +17,7 @@ #include #endif // "supported_kernel_op_info.h", "all_kernel_faked.cc" and "kernel_src_map.h" -// are created automatically during opt's compiling period +// are created automatically during OPT's compiling period #include #include "all_kernel_faked.cc" // NOLINT #include "kernel_src_map.h" // NOLINT diff --git a/lite/tools/build.sh b/lite/tools/build.sh index a90d67ebbc2..4dfd8f6c70e 100755 --- a/lite/tools/build.sh +++ b/lite/tools/build.sh @@ -72,7 +72,7 @@ function build_opt { -DWITH_TESTING=OFF \ -DLITE_BUILD_EXTRA=ON \ -DWITH_MKL=OFF - make opt -j$NUM_PROC + make OPT -j$NUM_PROC } function make_tiny_publish_so { diff --git a/lite/tools/ci_build.sh b/lite/tools/ci_build.sh index a0273efe135..9b1bc94daa7 100755 --- a/lite/tools/ci_build.sh +++ b/lite/tools/ci_build.sh @@ -519,7 +519,7 @@ function test_model_optimize_tool_compile { cd $workspace cd build cmake .. -DWITH_LITE=ON -DLITE_ON_MODEL_OPTIMIZE_TOOL=ON -DWITH_TESTING=OFF -DLITE_BUILD_EXTRA=ON - make model_optimize_tool -j$NUM_CORES_FOR_COMPILE + make OPT -j$NUM_CORES_FOR_COMPILE } function _test_paddle_code_generator { From cc643a49e98bd5a46218009ca4c56085794b563f Mon Sep 17 00:00:00 2001 From: DannyIsFunny <912790387@qq.com> Date: Wed, 12 Feb 2020 02:59:48 +0000 Subject: [PATCH 3/3] test=develop