Skip to content

Commit 56a44db

Browse files
authored
refine build.sh for server CI (#17717)
1 parent 8ac7a49 commit 56a44db

3 files changed

Lines changed: 20 additions & 8 deletions

File tree

paddle/fluid/lite/core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ endif()
1919

2020
proto_library(framework_proto_lite SRCS framework.proto)
2121

22-
cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite)
22+
cc_library(kernel_lite SRCS kernel.cc DEPS type_system target_wrapper_lite any_lite op_params_lite)
2323
cc_library(variable_lite SRCS variable.cc)
2424
cc_library(op_registry_lite SRCS op_registry.cc DEPS framework_proto_lite)
25-
cc_library(scope_lite SRCS scope.cc)
25+
cc_library(scope_lite SRCS scope.cc DEPS ${tensor_lite})
2626
cc_library(cpu_info_lite SRCS cpu_info.cc)
2727
cc_library(context_lite SRCS context.cc DEPS ${tensor_lite} any_lite cpu_info_lite)
2828
cc_library(op_lite SRCS op_lite.cc DEPS scope_lite op_registry_lite compatible_pb_lite target_wrapper_lite ${tensor_lite})

paddle/fluid/lite/tools/build.sh

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
#!/bin/bash
2-
set -e
2+
set -ex
33

4-
TESTS_FILE=""
4+
TESTS_FILE="./lite_tests.txt"
55

66
readonly common_flags="-DWITH_LITE=ON -DLITE_WITH_LIGHT_WEIGHT_FRAMEWORK=OFF -DWITH_PYTHON=OFF -DWITH_TESTING=ON -DLITE_WITH_ARM=OFF"
77
function cmake_x86 {
8-
cmake .. -DWITH_GPU=OFF -DLITE_WITH_X86=ON ${common_flags}
9-
make test_cxx_api_lite -j8
8+
cmake .. -DWITH_GPU=OFF -DWITH_MKLDNN=OFF -DLITE_WITH_X86=ON ${common_flags}
109
}
1110

1211
function cmake_gpu {
1312
cmake .. " -DWITH_GPU=ON {common_flags} -DLITE_WITH_GPU=ON"
14-
make test_cxx_api_lite -j8
1513
}
1614

1715
function cmake_arm {
@@ -48,6 +46,16 @@ function test_mobile {
4846
local file=$1
4947
}
5048

49+
# Build the code and run lite server tests. This is executed in the CI system.
50+
function build_test_server {
51+
mkdir -p ./build
52+
cd ./build
53+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/paddle/build/third_party/install/mklml/lib"
54+
cmake_x86
55+
build $TESTS_FILE
56+
test_lite $TESTS_FILE
57+
}
58+
5159
############################# MAIN #################################
5260
function print_usage {
5361
echo -e "\nUSAGE:"
@@ -97,6 +105,10 @@ function main {
97105
test_lite $TESTS_FILE
98106
shift
99107
;;
108+
build_test_server)
109+
build_test_server
110+
shift
111+
;;
100112
*)
101113
# unknown option
102114
print_usage

paddle/fluid/platform/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ ENDIF()
7272
# avoiding cycle dependencies
7373
cc_library(device_context SRCS device_context.cc init.cc DEPS simple_threadpool malloc ${STREAM_CALLBACK_DEPS}
7474
place eigen3 stringpiece cpu_helper cpu_info framework_proto ${GPU_CTX_DEPS} ${MKLDNN_CTX_DEPS}
75-
temp_allocator ${dgc_deps})
75+
temp_allocator ${dgc_deps} xxhash)
7676

7777
if(WIN32)
7878
if(WITH_GPU AND NOT WITH_DSO)

0 commit comments

Comments
 (0)