From 9708152e5c5dd0d222a77193fcda8ca638755a56 Mon Sep 17 00:00:00 2001 From: Zhen Wang Date: Thu, 27 Jun 2019 16:55:56 +0800 Subject: [PATCH] fix opencl compile bugs. --- paddle/fluid/lite/CMakeLists.txt | 12 +++-- paddle/fluid/lite/api/CMakeLists.txt | 25 +++++---- paddle/fluid/lite/arm/math/CMakeLists.txt | 2 +- paddle/fluid/lite/core/CMakeLists.txt | 24 ++++----- paddle/fluid/lite/core/mir/CMakeLists.txt | 16 +++--- .../fluid/lite/core/mir/fusion/CMakeLists.txt | 10 ++-- paddle/fluid/lite/host/CMakeLists.txt | 2 +- paddle/fluid/lite/kernels/arm/CMakeLists.txt | 28 +++++----- paddle/fluid/lite/kernels/cuda/CMakeLists.txt | 2 +- paddle/fluid/lite/kernels/host/CMakeLists.txt | 6 +-- .../fluid/lite/kernels/opencl/CMakeLists.txt | 6 ++- .../fluid/lite/kernels/opencl/pool_compute.cc | 14 ++--- paddle/fluid/lite/kernels/x86/CMakeLists.txt | 30 +++++------ paddle/fluid/lite/model_parser/CMakeLists.txt | 4 +- .../lite/model_parser/cpp/CMakeLists.txt | 2 +- .../fluid/lite/model_parser/pb/CMakeLists.txt | 4 +- paddle/fluid/lite/opencl/CMakeLists.txt | 21 ++++---- paddle/fluid/lite/opencl/cl_context.h | 2 +- paddle/fluid/lite/opencl/cl_engine.h | 2 +- paddle/fluid/lite/opencl/cl_helper.h | 2 +- paddle/fluid/lite/opencl/cl_image.h | 2 +- .../opencl/{cl2_header.h => cl_include.h} | 0 paddle/fluid/lite/opencl/cl_tool.h | 2 +- paddle/fluid/lite/opencl/cl_wrapper.cxx | 2 +- paddle/fluid/lite/operators/CMakeLists.txt | 52 +++++++++---------- paddle/fluid/lite/tools/debug/CMakeLists.txt | 2 +- paddle/fluid/lite/utils/CMakeLists.txt | 4 +- paddle/fluid/lite/x86/CMakeLists.txt | 2 +- 28 files changed, 147 insertions(+), 133 deletions(-) rename paddle/fluid/lite/opencl/{cl2_header.h => cl_include.h} (100%) diff --git a/paddle/fluid/lite/CMakeLists.txt b/paddle/fluid/lite/CMakeLists.txt index b636d5c6901..35897a60c9b 100644 --- a/paddle/fluid/lite/CMakeLists.txt +++ b/paddle/fluid/lite/CMakeLists.txt @@ -112,7 +112,7 @@ file(WRITE ${__lite_cc_files} "") # clean function(lite_cc_library TARGET) set(options SHARED shared STATIC static MODULE module) set(oneValueArgs "") - set(multiValueArgs SRCS DEPS X86_DEPS CUDA_DEPS ARM_DEPS PROFILE_DEPS LIGHT_DEPS + set(multiValueArgs SRCS DEPS X86_DEPS CUDA_DEPS CL_DEPS ARM_DEPS PROFILE_DEPS LIGHT_DEPS HVY_DEPS ARGS) cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -121,6 +121,7 @@ function(lite_cc_library TARGET) DEPS ${args_DEPS} X86_DEPS ${args_X86_DEPS} CUDA_DEPS ${args_CUDA_DEPS} + CL_DEPS ${args_CL_DEPS} ARM_DEPS ${args_ARM_DEPS} PROFILE_DEPS ${args_PROFILE_DEPS} LIGHT_DEPS ${args_LIGHT_DEPS} @@ -135,6 +136,7 @@ function(lite_cc_library TARGET) else() cc_library(${TARGET} SRCS ${args_SRCS} DEPS ${deps} ${args_DEPS}) endif() + target_compile_options(${TARGET} BEFORE PRIVATE -Wno-ignored-qualifiers) foreach(cc_file ${args_SRCS}) file(APPEND ${__lite_cc_files} "${cc_file}\n") @@ -152,7 +154,7 @@ endfunction() function(lite_cc_binary TARGET) set(options "") set(oneValueArgs "") - set(multiValueArgs SRCS DEPS X86_DEPS CUDA_DEPS ARM_DEPS PROFILE_DEPS + set(multiValueArgs SRCS DEPS X86_DEPS CUDA_DEPS CL_DEPS ARM_DEPS PROFILE_DEPS LIGHT_DEPS HVY_DEPS ARGS) cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -161,12 +163,14 @@ function(lite_cc_binary TARGET) DEPS ${args_DEPS} X86_DEPS ${args_X86_DEPS} CUDA_DEPS ${args_CUDA_DEPS} + CL_DEPS ${args_CL_DEPS} ARM_DEPS ${args_ARM_DEPS} PROFILE_DEPS ${args_PROFILE_DEPS} LIGHT_DEPS ${args_LIGHT_DEPS} HVY_DEPS ${args_HVY_DEPS} ) cc_binary(${TARGET} SRCS ${args_SRCS} DEPS ${deps} ${args_DEPS}) + target_compile_options(${TARGET} BEFORE PRIVATE -Wno-ignored-qualifiers) # collect targets need to compile for lite add_dependencies(lite_compile_deps ${TARGET}) endfunction() @@ -178,7 +182,7 @@ file(WRITE ${offline_test_registry_file} "") # clean function(lite_cc_test TARGET) set(options "") set(oneValueArgs "") - set(multiValueArgs SRCS DEPS X86_DEPS CUDA_DEPS ARM_DEPS PROFILE_DEPS + set(multiValueArgs SRCS DEPS X86_DEPS CUDA_DEPS CL_DEPS ARM_DEPS PROFILE_DEPS LIGHT_DEPS HVY_DEPS ARGS) cmake_parse_arguments(args "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) @@ -188,12 +192,14 @@ function(lite_cc_test TARGET) DEPS ${args_DEPS} X86_DEPS ${args_X86_DEPS} CUDA_DEPS ${args_CUDA_DEPS} + CL_DEPS ${args_CL_DEPS} ARM_DEPS ${args_ARM_DEPS} PROFILE_DEPS ${args_PROFILE_DEPS} LIGHT_DEPS ${args_LIGHT_DEPS} HVY_DEPS ${args_HVY_DEPS} ) _lite_cc_test(${TARGET} SRCS ${args_SRCS} DEPS ${deps} ARGS ${args_ARGS}) + target_compile_options(${TARGET} BEFORE PRIVATE -Wno-ignored-qualifiers) file(APPEND ${offline_test_registry_file} "${TARGET}\n") # collect targets need to compile for lite diff --git a/paddle/fluid/lite/api/CMakeLists.txt b/paddle/fluid/lite/api/CMakeLists.txt index 8c356e914dd..290cae8d136 100644 --- a/paddle/fluid/lite/api/CMakeLists.txt +++ b/paddle/fluid/lite/api/CMakeLists.txt @@ -2,7 +2,7 @@ set(cxx_api_lite_deps scope_lite optimizer_lite target_wrapper_host model_parser_lite program_lite) if(LITE_WITH_CUDA) set(cxx_api_lite_deps ${cxx_api_lite_deps} kernels_cuda) - cc_library(cxx_api_lite_cuda SRCS cxx_api.cc DEPS ${cxx_api_lite_deps} target_wrapper_cuda) + lite_cc_library(cxx_api_lite_cuda SRCS cxx_api.cc DEPS ${cxx_api_lite_deps} target_wrapper_cuda) nv_test(test_cxx_api_lite_cuda SRCS cxx_api_test.cc DEPS cxx_api_lite_cuda) endif() @@ -12,8 +12,7 @@ lite_cc_library(lite_api_test_helper SRCS lite_api_test_helper.cc DEPS scope_lite optimizer_lite target_wrapper_host model_parser_lite program_lite ${ops_lite} ${host_kernels} CUDA_DEPS kernels_cuda - X86_DEPS ${x86_kernels} - ) + X86_DEPS ${x86_kernels}) set(light_api_deps scope_lite target_wrapper_host model_parser_lite program_lite) @@ -68,22 +67,29 @@ if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND WITH_TESTING) lite_cc_test(test_mobilenetv1_lite SRCS mobilenetv1_test.cc DEPS ${lite_model_test_DEPS} CL_DEPS ${opencl_kernels} - ARGS --model_dir=${LITE_MODEL_DIR}/mobilenet_v1 SERIAL) + ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl + --model_dir=${LITE_MODEL_DIR}/mobilenet_v1 SERIAL) add_dependencies(test_mobilenetv1_lite extern_lite_download_mobilenet_v1_tar_gz) lite_cc_test(test_mobilenetv2_lite SRCS mobilenetv2_test.cc DEPS ${lite_model_test_DEPS} - ARGS --model_dir=${LITE_MODEL_DIR}/mobilenet_v2 SERIAL) + CL_DEPS ${opencl_kernels} + ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl + --model_dir=${LITE_MODEL_DIR}/mobilenet_v2 SERIAL) add_dependencies(test_mobilenetv2_lite extern_lite_download_mobilenet_v2_relu_tar_gz) lite_cc_test(test_resnet50_lite SRCS resnet50_test.cc DEPS ${lite_model_test_DEPS} - ARGS --model_dir=${LITE_MODEL_DIR}/resnet50 SERIAL) + CL_DEPS ${opencl_kernels} + ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl + --model_dir=${LITE_MODEL_DIR}/resnet50 SERIAL) add_dependencies(test_resnet50_lite extern_lite_download_resnet50_tar_gz) lite_cc_test(test_inceptionv4_lite SRCS inceptionv4_test.cc DEPS ${lite_model_test_DEPS} - ARGS --model_dir=${LITE_MODEL_DIR}/inception_v4 SERIAL) + CL_DEPS ${opencl_kernels} + ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl + --model_dir=${LITE_MODEL_DIR}/inception_v4 SERIAL) add_dependencies(test_inceptionv4_lite extern_lite_download_inception_v4_simple_tar_gz) endif() @@ -91,14 +97,13 @@ endif() # TODO(Superjomn) support latter. lite_cc_test(test_light_api_lite SRCS light_api_test.cc DEPS light_api_lite program_lite mir_passes - ARGS --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt - SERIAL) + ARGS --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL) lite_cc_test(test_apis_lite SRCS apis_test.cc DEPS cxx_api_lite light_api_lite ${ops_lite} X86_DEPS ${x86_kernels} operator ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model - --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL) + --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL) lite_cc_library(paddle_api_lite SRCS paddle_api.cc DEPS op_params_lite) diff --git a/paddle/fluid/lite/arm/math/CMakeLists.txt b/paddle/fluid/lite/arm/math/CMakeLists.txt index 8f4fa4d9ecc..4663f585160 100644 --- a/paddle/fluid/lite/arm/math/CMakeLists.txt +++ b/paddle/fluid/lite/arm/math/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)) endif() # TODO(xxx): seperate them -cc_library(math_arm SRCS +lite_cc_library(math_arm SRCS funcs.cc packed_sgemm.cc softmax.cc diff --git a/paddle/fluid/lite/core/CMakeLists.txt b/paddle/fluid/lite/core/CMakeLists.txt index 9bcb5a0aaab..0dbaa3e6c0c 100644 --- a/paddle/fluid/lite/core/CMakeLists.txt +++ b/paddle/fluid/lite/core/CMakeLists.txt @@ -1,5 +1,5 @@ if (WITH_TESTING) - cc_library(lite_gtest_main SRCS lite_gtest_main.cc DEPS gtest gflags) + lite_cc_library(lite_gtest_main SRCS lite_gtest_main.cc DEPS gtest gflags) endif() lite_cc_library(target_wrapper_lite SRCS target_wrapper.cc DEPS target_wrapper_host place_lite @@ -19,22 +19,22 @@ endif() proto_library(framework_proto_lite SRCS framework.proto) -cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite op_params_lite framework_proto_lite ${tensor_lite}) -cc_library(variable_lite SRCS variable.cc) -cc_library(op_registry_lite SRCS op_registry.cc DEPS framework_proto_lite) -cc_library(scope_lite SRCS scope.cc DEPS ${tensor_lite}) -cc_library(cpu_info_lite SRCS cpu_info.cc) -lite_cc_library(context_lite SRCS context.cc DEPS ${tensor_lite} any_lite cpu_info_lite eigen3) -cc_library(op_lite SRCS op_lite.cc DEPS scope_lite op_registry_lite target_wrapper_lite kernel_lite +lite_cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite op_params_lite framework_proto_lite ${tensor_lite}) +lite_cc_library(variable_lite SRCS variable.cc) +lite_cc_library(op_registry_lite SRCS op_registry.cc DEPS framework_proto_lite) +lite_cc_library(scope_lite SRCS scope.cc DEPS ${tensor_lite}) +lite_cc_library(cpu_info_lite SRCS cpu_info.cc) +lite_cc_library(context_lite SRCS context.cc DEPS ${tensor_lite} any_lite cpu_info_lite X86_DEPS eigen3 CL_DEPS cl_helper) +lite_cc_library(op_lite SRCS op_lite.cc DEPS scope_lite op_registry_lite target_wrapper_lite kernel_lite cpp_op_desc_lite ${tensor_lite}) -cc_library(types_lite SRCS types.cc) -cc_library(type_system SRCS type_system.cc DEPS ${tensor_lite} target_wrapper_lite) +lite_cc_library(types_lite SRCS types.cc) +lite_cc_library(type_system SRCS type_system.cc DEPS ${tensor_lite} target_wrapper_lite) lite_cc_library(program_lite SRCS program.cc DEPS op_lite kernel_lite compatible_pb_lite model_parser_lite ${ops_lite} HVY_DEPS framework_proto PROFILE_DEPS basic_profiler_lite) -cc_library(optimizer_lite SRCS optimizer.cc DEPS mir_pass_manager model_parser_lite program_lite) +lite_cc_library(optimizer_lite SRCS optimizer.cc DEPS mir_pass_manager model_parser_lite program_lite) add_subdirectory(mir) add_subdirectory(profile) @@ -44,7 +44,7 @@ if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) return() endif() -cc_library(program_fake_utils SRCS program_fake_utils.cc DEPS mir_ssa_graph +lite_cc_library(program_fake_utils SRCS program_fake_utils.cc DEPS mir_ssa_graph scope_lite op_registry_lite proto_desc op_lite ${ops_lite} ${host_kernels} diff --git a/paddle/fluid/lite/core/mir/CMakeLists.txt b/paddle/fluid/lite/core/mir/CMakeLists.txt index 01d5b640509..647336a4215 100644 --- a/paddle/fluid/lite/core/mir/CMakeLists.txt +++ b/paddle/fluid/lite/core/mir/CMakeLists.txt @@ -1,13 +1,13 @@ -cc_library(mir_node SRCS node.cc DEPS framework_proto_lite) -cc_library(mir_ssa_graph SRCS ssa_graph.cc DEPS mir_node program_lite) -cc_library(mir_pass SRCS pass.cc DEPS mir_ssa_graph) -cc_library(mir_pass_manager SRCS pass_manager.cc DEPS mir_pass mir_ssa_graph mir_passes) -cc_library(mir_pass_registry SRCS pass_registry.cc DEPS mir_pass_manager) +lite_cc_library(mir_node SRCS node.cc DEPS framework_proto_lite) +lite_cc_library(mir_ssa_graph SRCS ssa_graph.cc DEPS mir_node program_lite) +lite_cc_library(mir_pass SRCS pass.cc DEPS mir_ssa_graph) +lite_cc_library(mir_pass_manager SRCS pass_manager.cc DEPS mir_pass mir_ssa_graph mir_passes) +lite_cc_library(mir_pass_registry SRCS pass_registry.cc DEPS mir_pass_manager) add_subdirectory(fusion) add_subdirectory(elimination) -cc_library(mir_passes +lite_cc_library(mir_passes SRCS fusion/fc_fuse_pass.cc fusion/conv_elementwise_add_activation_fuse_pass.cc @@ -28,7 +28,7 @@ cc_library(mir_passes runtime_context_assign_pass.cc DEPS mir_pass types_lite context_lite ${mir_fusers}) -#cc_test(test_ssa_graph SRCS ssa_graph_test.cc DEPS +# lite_cc_test(test_ssa_graph SRCS ssa_graph_test.cc DEPS #mir_ssa_graph scope_lite op_lite #fc_op_lite #${host_kernels} @@ -68,7 +68,7 @@ lite_cc_library(pattern_matcher_high_api SRCS pattern_matcher_high_api.cc DEPS p if (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) return() endif() -cc_test(test_mir_pass_manager SRCS pass_manager_test.cc DEPS mir_pass_manager mir_passes) +lite_cc_test(test_mir_pass_manager SRCS pass_manager_test.cc DEPS mir_pass_manager mir_passes) # TODO(wz) replace framework/proto to lite proto. diff --git a/paddle/fluid/lite/core/mir/fusion/CMakeLists.txt b/paddle/fluid/lite/core/mir/fusion/CMakeLists.txt index f4775e673d0..818c503e904 100644 --- a/paddle/fluid/lite/core/mir/fusion/CMakeLists.txt +++ b/paddle/fluid/lite/core/mir/fusion/CMakeLists.txt @@ -1,16 +1,16 @@ -cc_library(fuse_fc +lite_cc_library(fuse_fc SRCS fc_fuser.cc DEPS pattern_matcher_high_api) -cc_library(fuse_conv_elementwise_add_activation +lite_cc_library(fuse_conv_elementwise_add_activation SRCS conv_elementwise_add_activation_fuser.cc DEPS pattern_matcher_high_api) -cc_library(fuse_conv_bn +lite_cc_library(fuse_conv_bn SRCS conv_bn_fuser.cc DEPS pattern_matcher_high_api) -cc_library(fuse_elementwise_add_activation +lite_cc_library(fuse_elementwise_add_activation SRCS elementwise_add_activation_fuser.cc DEPS pattern_matcher_high_api) -cc_library(fuse_quant_dequant +lite_cc_library(fuse_quant_dequant SRCS quant_dequant_op_fuser.cc DEPS pattern_matcher_high_api) diff --git a/paddle/fluid/lite/host/CMakeLists.txt b/paddle/fluid/lite/host/CMakeLists.txt index 7f7cf8b238f..0a400e6a0a9 100644 --- a/paddle/fluid/lite/host/CMakeLists.txt +++ b/paddle/fluid/lite/host/CMakeLists.txt @@ -1,2 +1,2 @@ -cc_library(target_wrapper_host SRCS target_wrapper.cc) +lite_cc_library(target_wrapper_host SRCS target_wrapper.cc) diff --git a/paddle/fluid/lite/kernels/arm/CMakeLists.txt b/paddle/fluid/lite/kernels/arm/CMakeLists.txt index d5dbfc6227d..d467d207b8d 100644 --- a/paddle/fluid/lite/kernels/arm/CMakeLists.txt +++ b/paddle/fluid/lite/kernels/arm/CMakeLists.txt @@ -4,20 +4,20 @@ endif() message(STATUS "compile with lite ARM kernels") -cc_library(fc_compute_arm SRCS fc_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(activation_compute_arm SRCS activation_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(mul_compute_arm SRCS mul_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(scale_compute_arm SRCS scale_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(softmax_compute_arm SRCS softmax_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(conv_compute_arm SRCS conv_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(batch_norm_compute_arm SRCS batch_norm_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(elementwise_compute_arm SRCS elementwise_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(pool_compute_arm SRCS pool_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(split_compute_arm SRCS split_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(concat_compute_arm SRCS concat_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(dropout_compute_arm SRCS dropout_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(calib_compute_arm SRCS calib_compute.cc DEPS ${lite_kernel_deps} math_arm) -cc_library(transpose_compute_arm SRCS transpose_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(fc_compute_arm SRCS fc_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(activation_compute_arm SRCS activation_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(mul_compute_arm SRCS mul_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(scale_compute_arm SRCS scale_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(softmax_compute_arm SRCS softmax_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(conv_compute_arm SRCS conv_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(batch_norm_compute_arm SRCS batch_norm_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(elementwise_compute_arm SRCS elementwise_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(pool_compute_arm SRCS pool_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(split_compute_arm SRCS split_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(concat_compute_arm SRCS concat_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(dropout_compute_arm SRCS dropout_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(calib_compute_arm SRCS calib_compute.cc DEPS ${lite_kernel_deps} math_arm) +lite_cc_library(transpose_compute_arm SRCS transpose_compute.cc DEPS ${lite_kernel_deps} math_arm) lite_cc_test(test_fc_compute_arm SRCS fc_compute_test.cc DEPS fc_compute_arm math_arm) lite_cc_test(test_activation_compute_arm SRCS activation_compute_test.cc DEPS activation_compute_arm) diff --git a/paddle/fluid/lite/kernels/cuda/CMakeLists.txt b/paddle/fluid/lite/kernels/cuda/CMakeLists.txt index b7a48946257..fd56d9df669 100644 --- a/paddle/fluid/lite/kernels/cuda/CMakeLists.txt +++ b/paddle/fluid/lite/kernels/cuda/CMakeLists.txt @@ -5,7 +5,7 @@ endif() message(STATUS "compile with lite CUDA kernels") nv_library(mul_compute_cuda SRCS mul_compute.cc DEPS ${tensor_lite}) -cc_library(io_copy_compute_cuda SRCS io_copy_compute.cc DEPS ${tensor_lite}) +lite_cc_library(io_copy_compute_cuda SRCS io_copy_compute.cc DEPS ${tensor_lite}) nv_library(kernels_cuda DEPS mul_compute_cuda io_copy_compute_cuda cuda_blas_lite) diff --git a/paddle/fluid/lite/kernels/host/CMakeLists.txt b/paddle/fluid/lite/kernels/host/CMakeLists.txt index 7e8e6bcb6db..7766cb7dc59 100644 --- a/paddle/fluid/lite/kernels/host/CMakeLists.txt +++ b/paddle/fluid/lite/kernels/host/CMakeLists.txt @@ -1,8 +1,8 @@ message(STATUS "compile with lite host kernels") -cc_library(feed_compute_host SRCS feed_compute.cc DEPS ${lite_kernel_deps}) -cc_library(fetch_compute_host SRCS fetch_compute.cc DEPS ${lite_kernel_deps}) -cc_library(reshape_compute_host SRCS reshape_compute.cc DEPS ${lite_kernel_deps} reshape_op_lite) +lite_cc_library(feed_compute_host SRCS feed_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(fetch_compute_host SRCS fetch_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(reshape_compute_host SRCS reshape_compute.cc DEPS ${lite_kernel_deps} reshape_op_lite) lite_cc_test(test_reshape_compute_host SRCS reshape_compute_test.cc DEPS reshape_compute_host) diff --git a/paddle/fluid/lite/kernels/opencl/CMakeLists.txt b/paddle/fluid/lite/kernels/opencl/CMakeLists.txt index 8cdaf3389d7..65877816e4b 100644 --- a/paddle/fluid/lite/kernels/opencl/CMakeLists.txt +++ b/paddle/fluid/lite/kernels/opencl/CMakeLists.txt @@ -4,17 +4,19 @@ endif() set(cl_kernel_deps op_params_lite cl_caller cl_engine cl_context cl_wrapper) -cc_library(elementwise_add_opencl SRCS elementwise_add_compute.cc DEPS ${cl_kernel_deps}) -cc_library(pool_opencl SRCS pool_compute.cc DEPS ${cl_kernel_deps}) +lite_cc_library(elementwise_add_opencl SRCS elementwise_add_compute.cc DEPS ${cl_kernel_deps}) +lite_cc_library(pool_opencl SRCS pool_compute.cc DEPS ${cl_kernel_deps}) lite_cc_test(test_elementwise_add_opencl SRCS elementwise_add_compute_test.cc DEPS elementwise_add_opencl op_registry_lite program_lite context_lite + ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl ) lite_cc_test(test_pool_opencl SRCS pool_compute_test.cc DEPS pool_opencl op_registry_lite program_lite context_lite + ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl ) set(opencl_kernels diff --git a/paddle/fluid/lite/kernels/opencl/pool_compute.cc b/paddle/fluid/lite/kernels/opencl/pool_compute.cc index 2514e8d929b..cfbf674b098 100644 --- a/paddle/fluid/lite/kernels/opencl/pool_compute.cc +++ b/paddle/fluid/lite/kernels/opencl/pool_compute.cc @@ -30,14 +30,14 @@ class PoolCompute using param_t = operators::PoolParam; void Run() override { - auto& param = *param_.get_mutable(); - auto& in_dims = param.x->dims(); - auto& out_dims = param.output->dims(); + const auto& param = *param_.get_mutable(); + const auto& in_dims = param.x->dims(); + const auto& out_dims = param.output->dims(); const std::string pooling_type = param.pooling_type; - bool global_pooling = param.global_pooling; - std::vector& paddings = param.paddings; - std::vector& strides = param.strides; - std::vector& ksize = param.ksize; + const bool global_pooling = param.global_pooling; + std::vector paddings = param.paddings; + std::vector strides = param.strides; + std::vector ksize = param.ksize; if (global_pooling) { for (size_t i = 0; i < ksize.size(); ++i) { paddings[i] = 0; diff --git a/paddle/fluid/lite/kernels/x86/CMakeLists.txt b/paddle/fluid/lite/kernels/x86/CMakeLists.txt index fb3ea292604..37e06a7d2dd 100644 --- a/paddle/fluid/lite/kernels/x86/CMakeLists.txt +++ b/paddle/fluid/lite/kernels/x86/CMakeLists.txt @@ -2,22 +2,22 @@ if(NOT LITE_WITH_X86) return() endif() -cc_library(activation_compute_x86 SRCS activation_compute.cc DEPS ${lite_kernel_deps} activation_op) -cc_library(mean_compute_x86 SRCS mean_compute.cc DEPS ${lite_kernel_deps}) -cc_library(fill_constant_compute_x86 SRCS fill_constant_compute.cc DEPS ${lite_kernel_deps}) -cc_library(sgd_compute_x86 SRCS sgd_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(activation_compute_x86 SRCS activation_compute.cc DEPS ${lite_kernel_deps} activation_op) +lite_cc_library(mean_compute_x86 SRCS mean_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(fill_constant_compute_x86 SRCS fill_constant_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(sgd_compute_x86 SRCS sgd_compute.cc DEPS ${lite_kernel_deps}) -cc_library(fc_compute_x86 SRCS fc_compute.cc DEPS ${lite_kernel_deps}) -cc_library(mul_compute_x86 SRCS mul_compute.cc DEPS ${lite_kernel_deps}) -cc_library(relu_compute_x86 SRCS relu_compute.cc DEPS ${lite_kernel_deps}) -cc_library(scale_compute_x86 SRCS scale_compute.cc DEPS ${lite_kernel_deps}) -cc_library(elementwise_compute_x86 SRCS elementwise_compute.cc DEPS ${lite_kernel_deps} elementwise_sub_op elementwise_add_op) -cc_library(softmax_compute_x86 SRCS softmax_compute.cc DEPS ${lite_kernel_deps} softmax) -cc_library(dropout_compute_x86 SRCS dropout_compute.cc DEPS ${lite_kernel_deps} ) -cc_library(concat_compute_x86 SRCS concat_compute.cc DEPS ${lite_kernel_deps} ) -cc_library(conv_compute_x86 SRCS conv_compute.cc DEPS ${lite_kernel_deps} blas im2col vol2col) -cc_library(pool_compute_x86 SRCS pool_compute.cc DEPS ${lite_kernel_deps} pooling) -cc_library(batch_norm_compute_x86 SRCS batch_norm_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(fc_compute_x86 SRCS fc_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(mul_compute_x86 SRCS mul_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(relu_compute_x86 SRCS relu_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(scale_compute_x86 SRCS scale_compute.cc DEPS ${lite_kernel_deps}) +lite_cc_library(elementwise_compute_x86 SRCS elementwise_compute.cc DEPS ${lite_kernel_deps} elementwise_sub_op elementwise_add_op) +lite_cc_library(softmax_compute_x86 SRCS softmax_compute.cc DEPS ${lite_kernel_deps} softmax) +lite_cc_library(dropout_compute_x86 SRCS dropout_compute.cc DEPS ${lite_kernel_deps} ) +lite_cc_library(concat_compute_x86 SRCS concat_compute.cc DEPS ${lite_kernel_deps} ) +lite_cc_library(conv_compute_x86 SRCS conv_compute.cc DEPS ${lite_kernel_deps} blas im2col vol2col) +lite_cc_library(pool_compute_x86 SRCS pool_compute.cc DEPS ${lite_kernel_deps} pooling) +lite_cc_library(batch_norm_compute_x86 SRCS batch_norm_compute.cc DEPS ${lite_kernel_deps}) lite_cc_test(test_fc_compute_x86 SRCS fc_compute_test.cc DEPS fc_compute_x86) lite_cc_test(test_conv2d_compute_x86 SRCS conv_compute_test.cc DEPS conv_compute_x86) diff --git a/paddle/fluid/lite/model_parser/CMakeLists.txt b/paddle/fluid/lite/model_parser/CMakeLists.txt index 2690fa0206b..eff15ab3b09 100644 --- a/paddle/fluid/lite/model_parser/CMakeLists.txt +++ b/paddle/fluid/lite/model_parser/CMakeLists.txt @@ -1,4 +1,4 @@ -#cc_library(runtime_lite SRCS runtime.cc) +#lite_cc_library(runtime_lite SRCS runtime.cc) #TODO(Superjomn) enable it again. if(NOT LITE_ON_MOBILE) @@ -11,7 +11,7 @@ if(NOT LITE_ON_MOBILE) endif() -cc_library(compatible_pb_lite SRCS compatible_pb.cc +lite_cc_library(compatible_pb_lite SRCS compatible_pb.cc DEPS op_desc_lite framework_proto_lite var_desc_lite cpp_op_desc_lite) lite_cc_library(model_parser_lite SRCS model_parser.cc DEPS diff --git a/paddle/fluid/lite/model_parser/cpp/CMakeLists.txt b/paddle/fluid/lite/model_parser/cpp/CMakeLists.txt index 71073179991..b13dc442753 100644 --- a/paddle/fluid/lite/model_parser/cpp/CMakeLists.txt +++ b/paddle/fluid/lite/model_parser/cpp/CMakeLists.txt @@ -1 +1 @@ -cc_library(cpp_op_desc_lite SRCS op_desc.cc DEPS any_lite) +lite_cc_library(cpp_op_desc_lite SRCS op_desc.cc DEPS any_lite) diff --git a/paddle/fluid/lite/model_parser/pb/CMakeLists.txt b/paddle/fluid/lite/model_parser/pb/CMakeLists.txt index 6910542f2a1..95e025c963f 100644 --- a/paddle/fluid/lite/model_parser/pb/CMakeLists.txt +++ b/paddle/fluid/lite/model_parser/pb/CMakeLists.txt @@ -1,3 +1,3 @@ -cc_library(var_desc_lite SRCS var_desc.cc DEPS framework_proto_lite) -cc_library(op_desc_lite SRCS op_desc.cc DEPS framework_proto_lite) +lite_cc_library(var_desc_lite SRCS var_desc.cc DEPS framework_proto_lite) +lite_cc_library(op_desc_lite SRCS op_desc.cc DEPS framework_proto_lite) diff --git a/paddle/fluid/lite/opencl/CMakeLists.txt b/paddle/fluid/lite/opencl/CMakeLists.txt index 2d77ff27681..195e34cdd8b 100644 --- a/paddle/fluid/lite/opencl/CMakeLists.txt +++ b/paddle/fluid/lite/opencl/CMakeLists.txt @@ -2,14 +2,15 @@ if (NOT LITE_WITH_OPENCL) return() endif() -cc_library(cl_wrapper SRCS cl_wrapper.cxx) -cc_library(cl_tool SRCS cl_tool.cc DEPS cl_wrapper) -target_compile_options(cl_tool BEFORE PUBLIC -Wno-ignored-qualifiers) -cc_library(cl_engine SRCS cl_engine.cc DEPS cl_tool) -cc_library(cl_context SRCS cl_context.cc DEPS cl_engine) -cc_library(cl_helper SRCS cl_helper.cc DEPS cl_context) -cc_library(cl_image_converter SRCS cl_image_converter.cc DEPS lite_tensor) -cc_library(cl_image SRCS cl_image.cc DEPS lite_tensor cl_image_converter cl_engine) -cc_library(cl_caller SRCS cl_caller.cc DEPS cl_helper cl_image) -lite_cc_test(test_cl_runtime SRCS cl_test.cc DEPS cl_helper cl_image cl_caller cl_wrapper) +lite_cc_library(cl_wrapper SRCS cl_wrapper.cxx) +lite_cc_library(cl_tool SRCS cl_tool.cc DEPS cl_wrapper) +lite_cc_library(cl_engine SRCS cl_engine.cc DEPS cl_tool) +lite_cc_library(cl_context SRCS cl_context.cc DEPS cl_engine) +lite_cc_library(cl_helper SRCS cl_helper.cc DEPS cl_context) +lite_cc_library(cl_image_converter SRCS cl_image_converter.cc DEPS lite_tensor) +lite_cc_library(cl_image SRCS cl_image.cc DEPS lite_tensor cl_image_converter cl_engine) +lite_cc_library(cl_caller SRCS cl_caller.cc DEPS cl_helper cl_image) +lite_cc_test(test_cl_runtime SRCS cl_test.cc DEPS cl_helper cl_image cl_caller cl_wrapper + ARGS --cl_path=${CMAKE_SOURCE_DIR}/paddle/fluid/lite/opencl) + add_dependencies(cl_tool opencl_clhpp) diff --git a/paddle/fluid/lite/opencl/cl_context.h b/paddle/fluid/lite/opencl/cl_context.h index ba434ae73f4..5c28b720a02 100644 --- a/paddle/fluid/lite/opencl/cl_context.h +++ b/paddle/fluid/lite/opencl/cl_context.h @@ -17,7 +17,7 @@ limitations under the License. */ #include #include #include -#include "paddle/fluid/lite/opencl/cl2_header.h" +#include "paddle/fluid/lite/opencl/cl_include.h" namespace paddle { namespace lite { diff --git a/paddle/fluid/lite/opencl/cl_engine.h b/paddle/fluid/lite/opencl/cl_engine.h index d513110cead..cf0939d3709 100644 --- a/paddle/fluid/lite/opencl/cl_engine.h +++ b/paddle/fluid/lite/opencl/cl_engine.h @@ -18,7 +18,7 @@ limitations under the License. */ #include #include #include -#include "paddle/fluid/lite/opencl/cl2_header.h" +#include "paddle/fluid/lite/opencl/cl_include.h" #include "paddle/fluid/lite/opencl/cl_tool.h" namespace paddle { diff --git a/paddle/fluid/lite/opencl/cl_helper.h b/paddle/fluid/lite/opencl/cl_helper.h index 6f9a28ced49..1732196ccf3 100644 --- a/paddle/fluid/lite/opencl/cl_helper.h +++ b/paddle/fluid/lite/opencl/cl_helper.h @@ -18,9 +18,9 @@ limitations under the License. */ #include #include #include -#include "paddle/fluid/lite/opencl/cl2_header.h" #include "paddle/fluid/lite/opencl/cl_context.h" #include "paddle/fluid/lite/opencl/cl_image.h" +#include "paddle/fluid/lite/opencl/cl_include.h" namespace paddle { namespace lite { diff --git a/paddle/fluid/lite/opencl/cl_image.h b/paddle/fluid/lite/opencl/cl_image.h index 006bc10c457..500646658ad 100644 --- a/paddle/fluid/lite/opencl/cl_image.h +++ b/paddle/fluid/lite/opencl/cl_image.h @@ -18,8 +18,8 @@ limitations under the License. */ #include #include #include "paddle/fluid/lite/core/compatible_tensor.h" -#include "paddle/fluid/lite/opencl/cl2_header.h" #include "paddle/fluid/lite/opencl/cl_image_converter.h" +#include "paddle/fluid/lite/opencl/cl_include.h" namespace paddle { namespace lite { diff --git a/paddle/fluid/lite/opencl/cl2_header.h b/paddle/fluid/lite/opencl/cl_include.h similarity index 100% rename from paddle/fluid/lite/opencl/cl2_header.h rename to paddle/fluid/lite/opencl/cl_include.h diff --git a/paddle/fluid/lite/opencl/cl_tool.h b/paddle/fluid/lite/opencl/cl_tool.h index 3fdc6287cad..49ad9d4e770 100644 --- a/paddle/fluid/lite/opencl/cl_tool.h +++ b/paddle/fluid/lite/opencl/cl_tool.h @@ -14,7 +14,7 @@ limitations under the License. */ #pragma once -#include "paddle/fluid/lite/opencl/cl2_header.h" +#include "paddle/fluid/lite/opencl/cl_include.h" namespace paddle { namespace lite { diff --git a/paddle/fluid/lite/opencl/cl_wrapper.cxx b/paddle/fluid/lite/opencl/cl_wrapper.cxx index 4979d03e504..18a51d9ddb2 100644 --- a/paddle/fluid/lite/opencl/cl_wrapper.cxx +++ b/paddle/fluid/lite/opencl/cl_wrapper.cxx @@ -18,7 +18,7 @@ #include #include #include -#include "paddle/fluid/lite/opencl/cl2_header.h" +#include "paddle/fluid/lite/opencl/cl_include.h" /** * Wrapper of OpenCL 2.0, based on file opencl20/CL/cl.h diff --git a/paddle/fluid/lite/operators/CMakeLists.txt b/paddle/fluid/lite/operators/CMakeLists.txt index c99d17657c5..607dfd924e2 100644 --- a/paddle/fluid/lite/operators/CMakeLists.txt +++ b/paddle/fluid/lite/operators/CMakeLists.txt @@ -1,31 +1,31 @@ set(op_DEPS ${tensor_lite} op_lite op_params_lite) -cc_library(conv_op_lite SRCS conv_op.cc DEPS ${op_DEPS}) -cc_library(pool_op_lite SRCS pool_op.cc DEPS ${op_DEPS}) -cc_library(fc_op_lite SRCS fc_op.cc DEPS ${op_DEPS}) -cc_library(relu_op_lite SRCS relu_op.cc DEPS ${op_DEPS}) -cc_library(mul_op_lite SRCS mul_op.cc DEPS ${op_DEPS}) -cc_library(scale_op_lite SRCS scale_op.cc DEPS ${op_DEPS}) -cc_library(softmax_op_lite SRCS softmax_op.cc DEPS ${op_DEPS}) -cc_library(reshape_op_lite SRCS reshape_op.cc DEPS ${op_DEPS} ) -cc_library(batch_norm_op_lite SRCS batch_norm_op.cc DEPS ${op_DEPS}) -cc_library(feed_op_lite SRCS feed_op.cc DEPS ${op_DEPS}) -cc_library(fetch_op_lite SRCS fetch_op.cc DEPS ${op_DEPS}) -cc_library(io_copy_op_lite SRCS io_copy_op.cc DEPS ${op_DEPS}) -cc_library(activation_ops_lite SRCS activation_ops.cc DEPS ${op_DEPS}) -cc_library(elementwise_ops_lite SRCS elementwise_ops.cc DEPS ${op_DEPS}) -cc_library(fusion_elementwise_activation_ops_lite SRCS fusion_elementwise_activation_ops.cc DEPS elementwise_ops_lite ${op_DEPS}) -cc_library(mean_op_lite SRCS mean_op.cc DEPS ${op_DEPS}) -cc_library(fill_constant_op_lite SRCS fill_constant_op.cc DEPS ${op_DEPS}) -#cc_library(sgd_op_lite SRCS sgd_op.cc DEPS ${op_DEPS}) -cc_library(op_params_lite SRCS op_params.cc DEPS ${tensor_lite} any_lite framework_proto_lite) -cc_library(dropout_op_lite SRCS dropout_op.cc DEPS ${op_DEPS}) -cc_library(concat_op_lite SRCS concat_op.cc DEPS ${op_DEPS}) -cc_library(calib_op_lite SRCS calib_op.cc DEPS ${op_DEPS}) -cc_library(split_op_lite SRCS split_op.cc DEPS ${op_DEPS}) -cc_library(transpose_op_lite SRCS transpose_op.cc DEPS ${op_DEPS}) -cc_library(fake_quant SRCS fake_quantize_moving_avg_max_abs.cc DEPS ${op_DEPS}) -cc_library(fake_dequant SRCS fake_dequantize_max_abs.cc DEPS ${op_DEPS}) +lite_cc_library(conv_op_lite SRCS conv_op.cc DEPS ${op_DEPS}) +lite_cc_library(pool_op_lite SRCS pool_op.cc DEPS ${op_DEPS}) +lite_cc_library(fc_op_lite SRCS fc_op.cc DEPS ${op_DEPS}) +lite_cc_library(relu_op_lite SRCS relu_op.cc DEPS ${op_DEPS}) +lite_cc_library(mul_op_lite SRCS mul_op.cc DEPS ${op_DEPS}) +lite_cc_library(scale_op_lite SRCS scale_op.cc DEPS ${op_DEPS}) +lite_cc_library(softmax_op_lite SRCS softmax_op.cc DEPS ${op_DEPS}) +lite_cc_library(reshape_op_lite SRCS reshape_op.cc DEPS ${op_DEPS} ) +lite_cc_library(batch_norm_op_lite SRCS batch_norm_op.cc DEPS ${op_DEPS}) +lite_cc_library(feed_op_lite SRCS feed_op.cc DEPS ${op_DEPS}) +lite_cc_library(fetch_op_lite SRCS fetch_op.cc DEPS ${op_DEPS}) +lite_cc_library(io_copy_op_lite SRCS io_copy_op.cc DEPS ${op_DEPS}) +lite_cc_library(activation_ops_lite SRCS activation_ops.cc DEPS ${op_DEPS}) +lite_cc_library(elementwise_ops_lite SRCS elementwise_ops.cc DEPS ${op_DEPS}) +lite_cc_library(fusion_elementwise_activation_ops_lite SRCS fusion_elementwise_activation_ops.cc DEPS elementwise_ops_lite ${op_DEPS}) +lite_cc_library(mean_op_lite SRCS mean_op.cc DEPS ${op_DEPS}) +lite_cc_library(fill_constant_op_lite SRCS fill_constant_op.cc DEPS ${op_DEPS}) +#lite_cc_library(sgd_op_lite SRCS sgd_op.cc DEPS ${op_DEPS}) +lite_cc_library(op_params_lite SRCS op_params.cc DEPS ${tensor_lite} any_lite framework_proto_lite) +lite_cc_library(dropout_op_lite SRCS dropout_op.cc DEPS ${op_DEPS}) +lite_cc_library(concat_op_lite SRCS concat_op.cc DEPS ${op_DEPS}) +lite_cc_library(calib_op_lite SRCS calib_op.cc DEPS ${op_DEPS}) +lite_cc_library(split_op_lite SRCS split_op.cc DEPS ${op_DEPS}) +lite_cc_library(transpose_op_lite SRCS transpose_op.cc DEPS ${op_DEPS}) +lite_cc_library(fake_quant SRCS fake_quantize_moving_avg_max_abs.cc DEPS ${op_DEPS}) +lite_cc_library(fake_dequant SRCS fake_dequantize_max_abs.cc DEPS ${op_DEPS}) set(ops_lite conv_op_lite diff --git a/paddle/fluid/lite/tools/debug/CMakeLists.txt b/paddle/fluid/lite/tools/debug/CMakeLists.txt index 6a022fe4e26..908a436e8bb 100644 --- a/paddle/fluid/lite/tools/debug/CMakeLists.txt +++ b/paddle/fluid/lite/tools/debug/CMakeLists.txt @@ -1,4 +1,4 @@ -cc_library(debug_utils_lite SRCS debug_utils.cc DEPS op_params_lite) +lite_cc_library(debug_utils_lite SRCS debug_utils.cc DEPS op_params_lite) lite_cc_binary(lite_model_debug_tool SRCS model_debug_tool.cc DEPS diff --git a/paddle/fluid/lite/utils/CMakeLists.txt b/paddle/fluid/lite/utils/CMakeLists.txt index f610b7aab5c..c7e9e8e8782 100644 --- a/paddle/fluid/lite/utils/CMakeLists.txt +++ b/paddle/fluid/lite/utils/CMakeLists.txt @@ -7,6 +7,6 @@ set(utils_DEPS glog) lite_cc_test(test_varient SRCS varient_test.cc DEPS utils_lite) -cc_library(any_lite SRCS any.cc) -cc_library(utils_lite SRCS cp_logging.cc string.cc DEPS ${utils_DEPS} any_lite) +lite_cc_library(any_lite SRCS any.cc) +lite_cc_library(utils_lite SRCS cp_logging.cc string.cc DEPS ${utils_DEPS} any_lite) diff --git a/paddle/fluid/lite/x86/CMakeLists.txt b/paddle/fluid/lite/x86/CMakeLists.txt index be772b921b4..eacff0204aa 100644 --- a/paddle/fluid/lite/x86/CMakeLists.txt +++ b/paddle/fluid/lite/x86/CMakeLists.txt @@ -2,4 +2,4 @@ if (NOT LITE_WITH_X86) return() endif() -cc_library(target_wrapper_x86 SRCS target_wrapper.cc) +lite_cc_library(target_wrapper_x86 SRCS target_wrapper.cc) -- GitLab