diff --git a/cmake/paddlepaddle.cmake b/cmake/paddlepaddle.cmake index 6f2ead23a396f7287fc98ef3c16138bdf7f583e7..46f172dd0cb9852e42e72be52ec73ffa2c995325 100644 --- a/cmake/paddlepaddle.cmake +++ b/cmake/paddlepaddle.cmake @@ -76,7 +76,15 @@ SET_PROPERTY(TARGET snappystream PROPERTY IMPORTED_LOCATION ${BINARY_DIR}/fluid_ ADD_LIBRARY(xxhash STATIC IMPORTED GLOBAL) SET_PROPERTY(TARGET xxhash PROPERTY IMPORTED_LOCATION ${BINARY_DIR}/fluid_install_dir/third_party/install/xxhash/lib/libxxhash.a) +ADD_LIBRARY(iomp5 SHARED IMPORTED GLOBAL) +SET_PROPERTY(TARGET iomp5 PROPERTY IMPORTED_LOCATION ${BINARY_DIR}/fluid_install_dir/third_party/install/mklml/lib/libiomp5.so) + +ADD_LIBRARY(mklml_intel SHARED IMPORTED GLOBAL) +SET_PROPERTY(TARGET mklml_intel PROPERTY IMPORTED_LOCATION ${BINARY_DIR}/fluid_install_dir/third_party/install/mklml/lib/libmklml_intel.so) + LIST(APPEND paddle_depend_libs snappystream snappy + iomp5 + mklml_intel xxhash) diff --git a/cube/cube-builder/CMakeLists.txt b/cube/cube-builder/CMakeLists.txt index 31d40949b76c9be8129a5fa5c08cc20946ffd713..2048e24f1b852ff57fb67403679b13d337c87f36 100755 --- a/cube/cube-builder/CMakeLists.txt +++ b/cube/cube-builder/CMakeLists.txt @@ -32,6 +32,7 @@ add_dependencies(cube-builder jsoncpp) set(DYNAMIC_LIB gflags jsoncpp + brpc -lssl -lcrypto ${CURL_LIB} diff --git a/demo-serving/CMakeLists.txt b/demo-serving/CMakeLists.txt index 6491827958ccb014bd22e369b0d8b7a834211d3a..7db1ce0199fddfbd37db434d924ab12bbb0a0686 100644 --- a/demo-serving/CMakeLists.txt +++ b/demo-serving/CMakeLists.txt @@ -26,11 +26,6 @@ endif() include_directories(SYSTEM ${CMAKE_CURRENT_LIST_DIR}/../kvdb/include) -find_library(MKLML_LIB NAMES libmklml_intel.so PATHS - ${CMAKE_BINARY_DIR}/Paddle/third_party/install/mklml/lib/) -find_library(MKLML_IOMP_LIB NAMES libiomp5.so PATHS - ${CMAKE_BINARY_DIR}/Paddle/third_party/install/mklml/lib) - include(op/CMakeLists.txt) include(proto/CMakeLists.txt) add_executable(serving ${serving_srcs}) @@ -64,7 +59,7 @@ target_link_libraries(serving kvdb rocksdb) if(WITH_GPU) target_link_libraries(serving ${CUDA_LIBRARIES}) endif() -target_link_libraries(serving ${MKLML_LIB} ${MKLML_IOMP_LIB} -lpthread +target_link_libraries(serving iomp5 mklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz -lbz2) install(TARGETS serving diff --git a/inferencer-fluid-cpu/CMakeLists.txt b/inferencer-fluid-cpu/CMakeLists.txt index f52f59f64285e1e6e15d126ce83f510e986111d2..9f892988d4c5ec8b04cbaf030087105bc84c040c 100644 --- a/inferencer-fluid-cpu/CMakeLists.txt +++ b/inferencer-fluid-cpu/CMakeLists.txt @@ -3,7 +3,7 @@ add_library(fluid_cpu_engine ${fluid_cpu_engine_srcs}) target_include_directories(fluid_cpu_engine PUBLIC ${CMAKE_BINARY_DIR}/Paddle/fluid_install_dir/) add_dependencies(fluid_cpu_engine pdserving extern_paddle configure) -target_link_libraries(fluid_cpu_engine pdserving paddle_fluid -liomp5 -lmklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) +target_link_libraries(fluid_cpu_engine pdserving paddle_fluid iomp5 mklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) install(TARGETS fluid_cpu_engine ARCHIVE DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/lib diff --git a/inferencer-fluid-gpu/CMakeLists.txt b/inferencer-fluid-gpu/CMakeLists.txt index 0cd16298a5a2301fd302cfbe6426ac1800e53583..725da85b45ca1070badf5343f340e49dce6b936f 100644 --- a/inferencer-fluid-gpu/CMakeLists.txt +++ b/inferencer-fluid-gpu/CMakeLists.txt @@ -3,7 +3,7 @@ add_library(fluid_gpu_engine ${fluid_gpu_engine_srcs}) target_include_directories(fluid_gpu_engine PUBLIC ${CMAKE_BINARY_DIR}/Paddle/fluid_install_dir/) add_dependencies(fluid_gpu_engine pdserving extern_paddle configure) -target_link_libraries(fluid_gpu_engine pdserving paddle_fluid -liomp5 -lmklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) +target_link_libraries(fluid_gpu_engine pdserving paddle_fluid iomp5 mklml_intel -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) install(TARGETS fluid_gpu_engine ARCHIVE DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/lib