From 2db2e2d67e5ffbe41bb53fa69c5c184024f7dffb Mon Sep 17 00:00:00 2001 From: huzhiqiang <912790387@qq.com> Date: Sun, 17 May 2020 21:21:41 +0800 Subject: [PATCH] [x86][CodeStyle] Remove glog and gflag from x86 base kernel implementaion code #3635 --- lite/backends/x86/CMakeLists.txt | 2 +- lite/backends/x86/cpu_info.cc | 2 +- lite/backends/x86/dynamic_loader.cc | 2 -- lite/backends/x86/jit/gen/act.h | 2 +- lite/backends/x86/jit/gen/blas.h | 2 +- lite/backends/x86/jit/gen/embseqpool.h | 2 +- lite/backends/x86/jit/gen/gru.h | 2 +- lite/backends/x86/jit/gen/hopv.h | 2 +- lite/backends/x86/jit/gen/lstm.h | 2 +- lite/backends/x86/jit/gen/matmul.h | 2 +- lite/backends/x86/jit/gen/seqpool.h | 2 +- lite/backends/x86/jit/gen/sgd.h | 2 +- lite/backends/x86/jit/gen/vbroadcast.h | 2 +- lite/backends/x86/jit/refer/refer.h | 2 +- lite/backends/x86/port.h | 2 +- lite/kernels/x86/elementwise_op_function.h | 7 +++---- 16 files changed, 17 insertions(+), 20 deletions(-) diff --git a/lite/backends/x86/CMakeLists.txt b/lite/backends/x86/CMakeLists.txt index 38b47ae312..1014e3f87f 100644 --- a/lite/backends/x86/CMakeLists.txt +++ b/lite/backends/x86/CMakeLists.txt @@ -8,7 +8,7 @@ lite_cc_library(target_wrapper_x86 SRCS target_wrapper.cc) if (LITE_ON_MODEL_OPTIMIZE_TOOL) return() endif(LITE_ON_MODEL_OPTIMIZE_TOOL) -lite_cc_library(dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags) +lite_cc_library(dynamic_loader SRCS dynamic_loader.cc) lite_cc_library(dynload_mklml SRCS mklml.cc DEPS dynamic_loader mklml) lite_cc_library(x86_cpu_info SRCS cpu_info.cc) diff --git a/lite/backends/x86/cpu_info.cc b/lite/backends/x86/cpu_info.cc index aa097f947a..276b62654f 100644 --- a/lite/backends/x86/cpu_info.cc +++ b/lite/backends/x86/cpu_info.cc @@ -29,8 +29,8 @@ #include #endif // _WIN32 -#include #include +#include "lite/utils/cp_logging.h" #include "lite/utils/env.h" diff --git a/lite/backends/x86/dynamic_loader.cc b/lite/backends/x86/dynamic_loader.cc index 2aaa798fa9..4978dfb84a 100644 --- a/lite/backends/x86/dynamic_loader.cc +++ b/lite/backends/x86/dynamic_loader.cc @@ -17,8 +17,6 @@ limitations under the License. */ #include // NOLINT #include -#include "gflags/gflags.h" -#include "glog/logging.h" #include "lite/backends/x86/cupti_lib_path.h" #include "lite/backends/x86/port.h" #include "lite/backends/x86/warpctc_lib_path.h" diff --git a/lite/backends/x86/jit/gen/act.h b/lite/backends/x86/jit/gen/act.h index 6366cff3c8..dd545b9fc9 100644 --- a/lite/backends/x86/jit/gen/act.h +++ b/lite/backends/x86/jit/gen/act.h @@ -14,9 +14,9 @@ #pragma once -#include #include #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" namespace paddle { namespace lite { diff --git a/lite/backends/x86/jit/gen/blas.h b/lite/backends/x86/jit/gen/blas.h index 4317d558c6..8545ea96f8 100644 --- a/lite/backends/x86/jit/gen/blas.h +++ b/lite/backends/x86/jit/gen/blas.h @@ -15,8 +15,8 @@ #pragma once #include -#include "glog/logging.h" #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" #include "lite/utils/string.h" namespace paddle { diff --git a/lite/backends/x86/jit/gen/embseqpool.h b/lite/backends/x86/jit/gen/embseqpool.h index 999960ece4..7bb248dd1d 100644 --- a/lite/backends/x86/jit/gen/embseqpool.h +++ b/lite/backends/x86/jit/gen/embseqpool.h @@ -14,9 +14,9 @@ #pragma once -#include #include #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" #include "lite/utils/paddle_enforce.h" namespace paddle { diff --git a/lite/backends/x86/jit/gen/gru.h b/lite/backends/x86/jit/gen/gru.h index 408f25746d..6a468fd9ac 100644 --- a/lite/backends/x86/jit/gen/gru.h +++ b/lite/backends/x86/jit/gen/gru.h @@ -15,9 +15,9 @@ #pragma once #include -#include "glog/logging.h" #include "lite/backends/x86/jit/gen/act.h" #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" namespace paddle { namespace lite { diff --git a/lite/backends/x86/jit/gen/hopv.h b/lite/backends/x86/jit/gen/hopv.h index 801131d630..6fa0c041b9 100644 --- a/lite/backends/x86/jit/gen/hopv.h +++ b/lite/backends/x86/jit/gen/hopv.h @@ -15,8 +15,8 @@ #pragma once #include -#include "glog/logging.h" #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" namespace paddle { namespace lite { diff --git a/lite/backends/x86/jit/gen/lstm.h b/lite/backends/x86/jit/gen/lstm.h index 141419505c..22611978e0 100644 --- a/lite/backends/x86/jit/gen/lstm.h +++ b/lite/backends/x86/jit/gen/lstm.h @@ -15,9 +15,9 @@ #pragma once #include -#include "glog/logging.h" #include "lite/backends/x86/jit/gen/act.h" #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" namespace paddle { namespace lite { diff --git a/lite/backends/x86/jit/gen/matmul.h b/lite/backends/x86/jit/gen/matmul.h index e7be6750cf..95edc14201 100644 --- a/lite/backends/x86/jit/gen/matmul.h +++ b/lite/backends/x86/jit/gen/matmul.h @@ -17,8 +17,8 @@ #include // for malloc and free #include #include -#include "glog/logging.h" #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" #include "lite/utils/paddle_enforce.h" namespace paddle { diff --git a/lite/backends/x86/jit/gen/seqpool.h b/lite/backends/x86/jit/gen/seqpool.h index 60e2799305..a00428f3e0 100644 --- a/lite/backends/x86/jit/gen/seqpool.h +++ b/lite/backends/x86/jit/gen/seqpool.h @@ -14,9 +14,9 @@ #pragma once -#include #include #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" #include "lite/utils/paddle_enforce.h" namespace paddle { diff --git a/lite/backends/x86/jit/gen/sgd.h b/lite/backends/x86/jit/gen/sgd.h index 303d94f2ab..9c9c2cff01 100644 --- a/lite/backends/x86/jit/gen/sgd.h +++ b/lite/backends/x86/jit/gen/sgd.h @@ -15,8 +15,8 @@ #pragma once #include -#include "glog/logging.h" #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" namespace paddle { namespace lite { diff --git a/lite/backends/x86/jit/gen/vbroadcast.h b/lite/backends/x86/jit/gen/vbroadcast.h index 39bcd4965f..8b58bd4c04 100644 --- a/lite/backends/x86/jit/gen/vbroadcast.h +++ b/lite/backends/x86/jit/gen/vbroadcast.h @@ -15,8 +15,8 @@ #pragma once #include -#include "glog/logging.h" #include "lite/backends/x86/jit/gen/jitcode.h" +#include "lite/utils/cp_logging.h" namespace paddle { namespace lite { diff --git a/lite/backends/x86/jit/refer/refer.h b/lite/backends/x86/jit/refer/refer.h index 119ec7469e..d8c8d86911 100644 --- a/lite/backends/x86/jit/refer/refer.h +++ b/lite/backends/x86/jit/refer/refer.h @@ -14,7 +14,6 @@ #pragma once -#include #include #include #include @@ -22,6 +21,7 @@ #include "lite/backends/x86/jit/helper.h" #include "lite/backends/x86/jit/kernel_base.h" #include "lite/backends/x86/jit/macro.h" +#include "lite/utils/cp_logging.h" #include "lite/utils/paddle_enforce.h" namespace paddle { diff --git a/lite/backends/x86/port.h b/lite/backends/x86/port.h index 0e1e2b77b7..42680bfc89 100644 --- a/lite/backends/x86/port.h +++ b/lite/backends/x86/port.h @@ -22,7 +22,7 @@ #include #define GLOG_NO_ABBREVIATED_SEVERITIES // msvc conflict logging with windows.h -#include "glog/logging.h" +#include "lite/utils/cp_logging.h" #if !defined(_WIN32) #include // dladdr diff --git a/lite/kernels/x86/elementwise_op_function.h b/lite/kernels/x86/elementwise_op_function.h index a94944a7f2..f736248ed3 100644 --- a/lite/kernels/x86/elementwise_op_function.h +++ b/lite/kernels/x86/elementwise_op_function.h @@ -14,16 +14,15 @@ limitations under the License. */ #pragma once -#include #include #include #include +#include "lite/backends/x86/math/math_function.h" #include "lite/fluid/eigen.h" +#include "lite/fluid/for_range.h" #include "lite/fluid/transform.h" +#include "lite/utils/cp_logging.h" #include "lite/utils/paddle_enforce.h" - -#include "lite/backends/x86/math/math_function.h" -#include "lite/fluid/for_range.h" #include "lite/utils/variant.h" namespace paddle { -- GitLab