diff --git a/CMakeLists.txt b/CMakeLists.txt index 1e6c4f21d13b3059dae90c4fed6574020a0ece39..9803a658e3fa5734f9d75395c9b4e3c239099730 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -97,7 +97,6 @@ if(WITH_MKLDNN) endif() add_subdirectory(configure) -add_subdirectory(mempool) add_subdirectory(predictor) add_subdirectory(inferencer-fluid-cpu) add_subdirectory(serving) diff --git a/mempool/CMakeLists.txt b/mempool/CMakeLists.txt deleted file mode 100644 index 4e905ae63bd6d6cf4f05b1c9301a23b65f2e21b9..0000000000000000000000000000000000000000 --- a/mempool/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_library(mempool ${CMAKE_CURRENT_LIST_DIR}/mempool.cpp) -add_dependencies(mempool brpc) diff --git a/predictor/CMakeLists.txt b/predictor/CMakeLists.txt index 8a80e320960e599299c8c0f4f5af3ec36e56f49f..9e0a9ac1259c3dee3bb0c77c68ca22da34a97ca2 100644 --- a/predictor/CMakeLists.txt +++ b/predictor/CMakeLists.txt @@ -1,6 +1,7 @@ include(proto/CMakeLists.txt) include(common/CMakeLists.txt) include(op/CMakeLists.txt) +include(mempool/CMakeLists.txt) include(framework/CMakeLists.txt) include(plugin/CMakeLists.txt) include(src/CMakeLists.txt) @@ -16,18 +17,16 @@ set_source_files_properties( ${pdserving_srcs} PROPERTIES COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor") -add_dependencies(pdserving protobuf boost brpc leveldb pdcodegen - configure mempool) +add_dependencies(pdserving protobuf boost brpc leveldb pdcodegen configure) target_include_directories(pdserving PUBLIC ${CMAKE_CURRENT_LIST_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../configure ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ${CMAKE_CURRENT_LIST_DIR}/../mempool) + ) target_link_libraries(pdserving - brpc protobuf boost leveldb configure - mempool -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) + brpc protobuf boost leveldb configure -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) add_executable(pdserving_exe ${pdserving_srcs}) set_source_files_properties( @@ -35,16 +34,16 @@ set_source_files_properties( PROPERTIES COMPILE_FLAGS "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor") add_dependencies(pdserving_exe - protobuf boost brpc leveldb pdcodegen configure mempool) + protobuf boost brpc leveldb pdcodegen configure) target_include_directories(pdserving_exe PUBLIC ${CMAKE_CURRENT_LIST_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../configure ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ${CMAKE_CURRENT_LIST_DIR}/../mempool) + ) target_link_libraries(pdserving_exe brpc protobuf leveldb - configure mempool -lpthread -lcrypto -lm -lrt -lssl + configure -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) add_library(pdclient ${pdclient_srcs}) @@ -59,6 +58,6 @@ target_include_directories(pdclient PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/ ${CMAKE_CURRENT_BINARY_DIR}/../configure ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ${CMAKE_CURRENT_LIST_DIR}/../mempool) + ) target_link_libraries(pdclient protobuf boost brpc -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) diff --git a/predictor/framework/memory.h b/predictor/framework/memory.h index f9f68035e72aca2eadaf5ad5f3a73d79d8f03f3b..cc7e40b4ec708f9d69522f7d69dae354ac4243ba 100644 --- a/predictor/framework/memory.h +++ b/predictor/framework/memory.h @@ -2,7 +2,7 @@ #define BAIDU_PADDLE_SERVING_PREDICTOR_MEMORY_H #include "common/inner_common.h" -#include "mempool.h" +#include "mempool/mempool.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/mempool/CMakeLists.txt b/predictor/mempool/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..041931df2aa2e0c5bfebca1ec4d42014d3a04294 --- /dev/null +++ b/predictor/mempool/CMakeLists.txt @@ -0,0 +1,3 @@ +FILE(GLOB mempool_srcs ${CMAKE_CURRENT_LIST_DIR}/*.cpp) +LIST(APPEND pdserving_srcs ${mempool_srcs}) +LIST(APPEND pdclient_srcs ${mempool_srcs}) diff --git a/mempool/mempool.cpp b/predictor/mempool/mempool.cpp similarity index 98% rename from mempool/mempool.cpp rename to predictor/mempool/mempool.cpp index ba4a536a82227999b84998453312203707c08289..11b2f3dd661fd36c6ccef3ae1bdc6a0a71c2bfb7 100644 --- a/mempool/mempool.cpp +++ b/predictor/mempool/mempool.cpp @@ -1,4 +1,4 @@ -#include "mempool.h" +#include "mempool/mempool.h" namespace im { diff --git a/mempool/mempool.h b/predictor/mempool/mempool.h similarity index 100% rename from mempool/mempool.h rename to predictor/mempool/mempool.h