Skip to content
Merged
4 changes: 2 additions & 2 deletions paddle/fluid/lite/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
22 changes: 17 additions & 5 deletions paddle/fluid/lite/tools/build.sh
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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:"
Expand Down Expand Up @@ -97,6 +105,10 @@ function main {
test_lite $TESTS_FILE
shift
;;
build_test_server)
build_test_server
shift
;;
*)
# unknown option
print_usage
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down