diff --git a/paddle/fluid/lite/core/CMakeLists.txt b/paddle/fluid/lite/core/CMakeLists.txt index 4e55ba74f970f3afab7f32a4d645b9893159b25f..ddeae5834af3f9e3143bee365b944ca2b5ef86a3 100644 --- a/paddle/fluid/lite/core/CMakeLists.txt +++ b/paddle/fluid/lite/core/CMakeLists.txt @@ -19,10 +19,10 @@ endif() proto_library(framework_proto_lite SRCS framework.proto) -cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite) +cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite op_params_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) +cc_library(scope_lite SRCS scope.cc DEPS ${tensor_lite}) cc_library(cpu_info_lite SRCS cpu_info.cc) cc_library(context_lite SRCS context.cc DEPS ${tensor_lite} any_lite cpu_info_lite) cc_library(op_lite SRCS op_lite.cc DEPS scope_lite op_registry_lite compatible_pb_lite target_wrapper_lite ${tensor_lite}) diff --git a/paddle/fluid/lite/tools/build.sh b/paddle/fluid/lite/tools/build.sh index 163cb630e73a2a109a9bf989f07cae4af2ce3d8f..bd0cb7ed375f50c140a672a6bb477bcbe56a99e0 100755 --- a/paddle/fluid/lite/tools/build.sh +++ b/paddle/fluid/lite/tools/build.sh @@ -1,17 +1,15 @@ #!/bin/bash -set -e +set -ex -TESTS_FILE="" +TESTS_FILE="./lite_tests.txt" readonly common_flags="-DWITH_LITE=ON -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF -DWITH_PYTHON=OFF -DWITH_TESTING=ON -DLITE_WITH_ARM=OFF" function cmake_x86 { - cmake .. -DWITH_GPU=OFF -DLITE_WITH_X86=ON ${common_flags} - make test_cxx_api_lite -j8 + cmake .. -DWITH_GPU=OFF -DWITH_MKLDNN=OFF -DLITE_WITH_X86=ON ${common_flags} } function cmake_gpu { cmake .. " -DWITH_GPU=ON {common_flags} -DLITE_WITH_GPU=ON" - make test_cxx_api_lite -j8 } function cmake_arm { @@ -48,6 +46,16 @@ function test_mobile { local file=$1 } +# Build the code and run lite server tests. This is executed in the CI system. +function build_test_server { + mkdir -p ./build + cd ./build + export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/paddle/build/third_party/install/mklml/lib" + cmake_x86 + build $TESTS_FILE + test_lite $TESTS_FILE +} + ############################# MAIN ################################# function print_usage { echo -e "\nUSAGE:" @@ -97,6 +105,10 @@ function main { test_lite $TESTS_FILE shift ;; + build_test_server) + build_test_server + shift + ;; *) # unknown option print_usage diff --git a/paddle/fluid/platform/CMakeLists.txt b/paddle/fluid/platform/CMakeLists.txt index 5de00db55add1ebc0e7d81b14934a105fd3fe474..c4386689d3e4fdf440f395eb586a28c2049b9403 100644 --- a/paddle/fluid/platform/CMakeLists.txt +++ b/paddle/fluid/platform/CMakeLists.txt @@ -72,7 +72,7 @@ ENDIF() # avoiding cycle dependencies cc_library(device_context SRCS device_context.cc init.cc DEPS simple_threadpool malloc ${STREAM_CALLBACK_DEPS} place eigen3 stringpiece cpu_helper cpu_info framework_proto ${GPU_CTX_DEPS} ${MKLDNN_CTX_DEPS} - temp_allocator ${dgc_deps}) + temp_allocator ${dgc_deps} xxhash) if(WIN32) if(WITH_GPU AND NOT WITH_DSO)