diff --git a/configure/CMakeLists.txt b/configure/CMakeLists.txt index f2afda8ffd2321b823934d23232c31110b406a2e..66b395a1d2007e954dcf487a2a6dbb3895754e19 100644 --- a/configure/CMakeLists.txt +++ b/configure/CMakeLists.txt @@ -11,16 +11,9 @@ list(APPEND configure_srcs ${CMAKE_CURRENT_LIST_DIR}/src/configure_parser.cpp) add_library(configure ${configure_srcs}) add_dependencies(configure brpc) -target_include_directories(configure PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/ - ) add_executable(test_configure ${CMAKE_CURRENT_LIST_DIR}/tests/test_configure.cpp) -target_include_directories(test_configure PUBLIC - ${CMAKE_CURRENT_BINARY_DIR}/ - ${CMAKE_CURRENT_LIST_DIR}/include - ) target_link_libraries(test_configure configure protobuf) install(TARGETS configure diff --git a/configure/src/configure_parser.cpp b/configure/src/configure_parser.cpp index d7e8aa1085df7668ea9fb737a28bc7f74729b652..e19ec05bd3856bac030b8c07823b640c0f11310d 100644 --- a/configure/src/configure_parser.cpp +++ b/configure/src/configure_parser.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "include/configure_parser.h" +#include "configure/include/configure_parser.h" #include #include #include diff --git a/configure/tests/test_configure.cpp b/configure/tests/test_configure.cpp index de7555c10f1ddbd9db4214af8a0407c7e43a838c..0e11807034304de3622813fc00ba325b9005b9c9 100644 --- a/configure/tests/test_configure.cpp +++ b/configure/tests/test_configure.cpp @@ -16,10 +16,10 @@ #include #include #include +#include "configure/include/configure_parser.h" #include "configure/inferencer_configure.pb.h" #include "configure/sdk_configure.pb.h" #include "configure/server_configure.pb.h" -#include "include/configure_parser.h" using baidu::paddle_serving::configure::EngineDesc; using baidu::paddle_serving::configure::ModelToolkitConf; diff --git a/inferencer-fluid-cpu/CMakeLists.txt b/inferencer-fluid-cpu/CMakeLists.txt index bb5f108c8c5051b5db4df01c605e703a2b9df743..f52f59f64285e1e6e15d126ce83f510e986111d2 100644 --- a/inferencer-fluid-cpu/CMakeLists.txt +++ b/inferencer-fluid-cpu/CMakeLists.txt @@ -1,8 +1,6 @@ FILE(GLOB fluid_cpu_engine_srcs ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp) add_library(fluid_cpu_engine ${fluid_cpu_engine_srcs}) target_include_directories(fluid_cpu_engine PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/include - ${PADDLE_INCLUDE_DIR} ${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) diff --git a/inferencer-fluid-cpu/include/fluid_cpu_engine.h b/inferencer-fluid-cpu/include/fluid_cpu_engine.h index d7f3725e02634b4c403205a4ab7c5adbdc1706e8..84920edfbb489177907827693fbdf9a08f80884a 100644 --- a/inferencer-fluid-cpu/include/fluid_cpu_engine.h +++ b/inferencer-fluid-cpu/include/fluid_cpu_engine.h @@ -21,8 +21,8 @@ #include #include "configure/include/configure_parser.h" #include "configure/inferencer_configure.pb.h" -#include "framework/infer.h" #include "paddle/fluid/inference/paddle_inference_api.h" +#include "predictor/framework/infer.h" namespace baidu { namespace paddle_serving { diff --git a/inferencer-fluid-cpu/src/fluid_cpu_engine.cpp b/inferencer-fluid-cpu/src/fluid_cpu_engine.cpp index 5ec5678a2a75d30b98beffa45bf00d2f38c93f85..9326f7e4421747c10eb4e92cc618ba777a431364 100644 --- a/inferencer-fluid-cpu/src/fluid_cpu_engine.cpp +++ b/inferencer-fluid-cpu/src/fluid_cpu_engine.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include "inferencer-fluid-cpu/include/fluid_cpu_engine.h" -#include "framework/factory.h" +#include "predictor/framework/factory.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/CMakeLists.txt b/predictor/CMakeLists.txt index 013e52545c131d78e3591e689dadc43ba5a4fd6f..57156f944baf4710582a24fa634410f9427890eb 100644 --- a/predictor/CMakeLists.txt +++ b/predictor/CMakeLists.txt @@ -8,9 +8,6 @@ include(src/CMakeLists.txt) add_executable(pdcodegen ${pdcodegen_srcs}) target_link_libraries(pdcodegen protobuf ${PROTOBUF_PROTOC_LIBRARY}) -target_include_directories(pdcodegen PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/ - ${CMAKE_CURRENT_BINARY_DIR}/) add_library(pdserving ${pdserving_srcs}) set_source_files_properties( @@ -19,12 +16,6 @@ set_source_files_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) -target_include_directories(pdserving PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/ - ${CMAKE_CURRENT_BINARY_DIR}/ - ${CMAKE_CURRENT_BINARY_DIR}/../configure - ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ) target_link_libraries(pdserving brpc protobuf boost leveldb configure -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) diff --git a/predictor/common/constant.cpp b/predictor/common/constant.cpp index 0dff9c8abb1d02749048d50d087850aa57512867..f9dac852baca35809aec0550318b7ccd0bd86727 100644 --- a/predictor/common/constant.cpp +++ b/predictor/common/constant.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "common/constant.h" +#include "predictor/common/constant.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/common/constant.h b/predictor/common/constant.h index 90eb45f4ffb6f20df88496c151b260baaf1a2bd5..857acd351ebe1a17d861e8dde5e85a7e40d700cc 100644 --- a/predictor/common/constant.h +++ b/predictor/common/constant.h @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. #pragma once -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/common/inner_common.h b/predictor/common/inner_common.h index 282bb74f77e9044531fe0554cd3b3b98be358eeb..d9c689f6ed23c2d6a528e3b30b5ff7a78bf7942e 100644 --- a/predictor/common/inner_common.h +++ b/predictor/common/inner_common.h @@ -42,6 +42,6 @@ #include "configure/include/configure_parser.h" #include "configure/server_configure.pb.h" -#include "common/constant.h" -#include "common/types.h" -#include "common/utils.h" +#include "predictor/common/constant.h" +#include "predictor/common/types.h" +#include "predictor/common/utils.h" diff --git a/predictor/common/macros.h b/predictor/common/macros.h index b737d7cd80ef7660244fe9f491b70a0910231aaf..7636d714264ebc88296f8bb83137c204d27db6ba 100644 --- a/predictor/common/macros.h +++ b/predictor/common/macros.h @@ -13,7 +13,7 @@ // limitations under the License. #pragma once -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/common/utils.h b/predictor/common/utils.h index 271ac4ae999d27292372bb7d183d2f0d4873de29..4a582ac3fff4f1d067686063ed4886a29755c72c 100644 --- a/predictor/common/utils.h +++ b/predictor/common/utils.h @@ -14,8 +14,8 @@ #pragma once #include -#include "common/inner_common.h" -#include "common/macros.h" +#include "predictor/common/inner_common.h" +#include "predictor/common/macros.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/bsf-inl-tensor.h b/predictor/framework/bsf-inl-tensor.h index 7c193e4011a52ce6fd02f2b07e5107d082fb1ea6..81a59ff0851bf7b890bd549db14f8e42b51c65de 100644 --- a/predictor/framework/bsf-inl-tensor.h +++ b/predictor/framework/bsf-inl-tensor.h @@ -19,9 +19,9 @@ #include #include #include -#include "common/inner_common.h" -#include "framework/infer_data.h" -#include "framework/memory.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/infer_data.h" +#include "predictor/framework/memory.h" #include diff --git a/predictor/framework/bsf-inl.h b/predictor/framework/bsf-inl.h index 5a6e4931abed0f3afa62de325bc7af9c07e4ee64..e79a4c701f0d37ba2f70346042d28ea039c83030 100644 --- a/predictor/framework/bsf-inl.h +++ b/predictor/framework/bsf-inl.h @@ -18,7 +18,7 @@ #include #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace im { namespace bsf { diff --git a/predictor/framework/bsf.h b/predictor/framework/bsf.h index c594c24f1232aec90b0afb262822e3208186d055..2dcb6c90cb02406007d4b35d65bdf902bb9810f9 100644 --- a/predictor/framework/bsf.h +++ b/predictor/framework/bsf.h @@ -19,7 +19,7 @@ #include #include #include "butil/atomicops.h" -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" #include "boost/function.hpp" diff --git a/predictor/framework/channel.h b/predictor/framework/channel.h index 8282ddaf667870c981db28608edc63c6ed734a97..25f68876a4b109fd983883bdc1a464717d7ad012 100644 --- a/predictor/framework/channel.h +++ b/predictor/framework/channel.h @@ -15,7 +15,7 @@ #pragma once #include #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/dag.cpp b/predictor/framework/dag.cpp index 98b6835b34f94fd62ab7838447085345c04e03fa..99476b45b83986ac2bb9bdfad391baaf18e0686e 100644 --- a/predictor/framework/dag.cpp +++ b/predictor/framework/dag.cpp @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/dag.h" +#include "predictor/framework/dag.h" #include #include -#include "common/inner_common.h" -#include "framework/predictor_metric.h" // PredictorMetric -#include "op/op.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/predictor_metric.h" // PredictorMetric +#include "predictor/op/op.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/dag.h b/predictor/framework/dag.h index 98dfdb8076e7022a2a718b61571cfbf686d92387..e6c5f71163f47f3dc62a4b8f72718af52e38d223 100644 --- a/predictor/framework/dag.h +++ b/predictor/framework/dag.h @@ -15,7 +15,7 @@ #pragma once #include #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/dag_view.cpp b/predictor/framework/dag_view.cpp index 141f8d14d16c6e84b8aba6ca3ba58212941412ad..cff94e6fa25286c159c2a87f19e2a937a0239b57 100644 --- a/predictor/framework/dag_view.cpp +++ b/predictor/framework/dag_view.cpp @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/dag_view.h" +#include "predictor/framework/dag_view.h" #include // TRACEPRINTF #include -#include "common/inner_common.h" -#include "framework/op_repository.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/op_repository.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/dag_view.h b/predictor/framework/dag_view.h index 660f0e7716b6834b5ffc5db0baf7e741d2ee43b3..89e195bf72e75a7084153d9b37a3b2daf06d2351 100644 --- a/predictor/framework/dag_view.h +++ b/predictor/framework/dag_view.h @@ -15,10 +15,10 @@ #pragma once #include #include -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/dag.h" -#include "op/op.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/dag.h" +#include "predictor/op/op.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/factory.h b/predictor/framework/factory.h index 0bb157afee848056482a1f5765ba8128118d2285..b615687c0441ee62d50ace025181de13b2416891 100644 --- a/predictor/framework/factory.h +++ b/predictor/framework/factory.h @@ -16,8 +16,8 @@ #include #include #include -#include "common/inner_common.h" #include "glog/raw_logging.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { namespace predictor { diff --git a/predictor/framework/infer.h b/predictor/framework/infer.h index 8fd6bc5b2c9389a930add0a1c6e08fbb8c1b012b..67c4ab55eaec1b9cc8522ffb32f3c8484de3e16e 100644 --- a/predictor/framework/infer.h +++ b/predictor/framework/infer.h @@ -18,10 +18,10 @@ #include #include #include -#include "common/inner_common.h" -#include "framework/bsf.h" -#include "framework/factory.h" -#include "framework/infer_data.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/bsf.h" +#include "predictor/framework/factory.h" +#include "predictor/framework/infer_data.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/infer_data.h b/predictor/framework/infer_data.h index be8857c0abd39b5f057b524fa0b748ae78dba7d6..8bb0b5d8b2dddab032710324e6cfdfeffc6f60ee 100644 --- a/predictor/framework/infer_data.h +++ b/predictor/framework/infer_data.h @@ -15,7 +15,7 @@ #pragma once #include #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/manager.h b/predictor/framework/manager.h index 6e14fbdda2c5538dd3271e37430b11ccc4c321b9..939ba15a477e1bff5a96edf1dc8a8530d7a96bba 100644 --- a/predictor/framework/manager.h +++ b/predictor/framework/manager.h @@ -15,10 +15,10 @@ #pragma once #include #include -#include "common/constant.h" -#include "common/inner_common.h" -#include "framework/service.h" -#include "framework/workflow.h" +#include "predictor/common/constant.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/service.h" +#include "predictor/framework/workflow.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/memory.cpp b/predictor/framework/memory.cpp index e0a69df269ac5b2bfe547d66745cf10b4e388fd4..32f2547817983d8c6d280269b6003de117247c6c 100644 --- a/predictor/framework/memory.cpp +++ b/predictor/framework/memory.cpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/memory.h" -#include "common/inner_common.h" +#include "predictor/framework/memory.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/memory.h b/predictor/framework/memory.h index e2afc6242a97e94486d619595a88f25127be7d31..9cc12e8f5c3b89c07578cb7807b03b4df26d75c5 100644 --- a/predictor/framework/memory.h +++ b/predictor/framework/memory.h @@ -14,8 +14,8 @@ #pragma once -#include "common/inner_common.h" -#include "mempool/mempool.h" +#include "predictor/common/inner_common.h" +#include "predictor/mempool/mempool.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/merger.h b/predictor/framework/merger.h index 25568dc5b4abcf63576fbe2ed911c7770fab0e2d..5188bed689cfb0347e9ad0a12a59ddd0200cda14 100644 --- a/predictor/framework/merger.h +++ b/predictor/framework/merger.h @@ -15,7 +15,7 @@ #pragma once #include #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/op_repository.cpp b/predictor/framework/op_repository.cpp index 8a430e64bd72f29c4d5132dbe238df19f35d0408..76396cd2a9945151e65e36da18c42909ada124ee 100644 --- a/predictor/framework/op_repository.cpp +++ b/predictor/framework/op_repository.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/op_repository.h" +#include "predictor/framework/op_repository.h" #include -#include "op/op.h" +#include "predictor/op/op.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/op_repository.h b/predictor/framework/op_repository.h index 4f789e48d48708ce844f449a9914a216d703ae21..dca8f129c55fac39e24bb2c03a400d49d727c809 100644 --- a/predictor/framework/op_repository.h +++ b/predictor/framework/op_repository.h @@ -14,7 +14,7 @@ #pragma once #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/resource.cpp b/predictor/framework/resource.cpp index 414e48dd2032ea8e647ddab3e7b6b4d8d8b819cb..9ced89ffa4373e1cebc5640aefcde4645291a6e1 100644 --- a/predictor/framework/resource.cpp +++ b/predictor/framework/resource.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/resource.h" +#include "predictor/framework/resource.h" #include -#include "common/inner_common.h" -#include "framework/infer.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/infer.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/resource.h b/predictor/framework/resource.h index 9c741e4432c8eb2c87d1b9e3f124bc44bed444c1..3f3bdb9184dae5dbba418b09d12c65116622df5f 100644 --- a/predictor/framework/resource.h +++ b/predictor/framework/resource.h @@ -14,8 +14,8 @@ #pragma once #include -#include "common/inner_common.h" -#include "framework/memory.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/memory.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/server.cpp b/predictor/framework/server.cpp index 23bda575ade3d30c206412cde83c259ce0a34854..6c4525fe15751dd9737870dfbeebc091facdd7e4 100644 --- a/predictor/framework/server.cpp +++ b/predictor/framework/server.cpp @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/server.h" +#include "predictor/framework/server.h" #include // NovaServiceAdaptor #include // NsheadMcpackAdaptor #include // PublicPbrpcServiceAdaptor #include #include -#include "common/inner_common.h" -#include "framework/manager.h" -#include "framework/resource.h" -#include "framework/service_manager.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/manager.h" +#include "predictor/framework/resource.h" +#include "predictor/framework/service_manager.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/server.h b/predictor/framework/server.h index 0158e7e3e074c6c5a82ec4d7c67fd8da91ae83a1..6c2e15c5d03987e1fdfe0a01ca67978ca5e0203d 100644 --- a/predictor/framework/server.h +++ b/predictor/framework/server.h @@ -14,7 +14,7 @@ #pragma once #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/service.cpp b/predictor/framework/service.cpp index a9a2078de100542442471425143690953c3329b2..053b0859982c7e843a2b189bb147a8c2a76e14d9 100644 --- a/predictor/framework/service.cpp +++ b/predictor/framework/service.cpp @@ -12,19 +12,19 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/service.h" +#include "predictor/framework/service.h" #include // butil::Timer #include #include #include -#include "common/constant.h" -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/dag_view.h" -#include "framework/manager.h" -#include "framework/predictor_metric.h" // PredictorMetric -#include "framework/resource.h" -#include "framework/server.h" +#include "predictor/common/constant.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/dag_view.h" +#include "predictor/framework/manager.h" +#include "predictor/framework/predictor_metric.h" // PredictorMetric +#include "predictor/framework/resource.h" +#include "predictor/framework/server.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/service.h b/predictor/framework/service.h index 0d913acd045de900753273954dde69f9c144dd1f..f9896e2898bf3a3e749e78df3929d5e49b1c3f8a 100644 --- a/predictor/framework/service.h +++ b/predictor/framework/service.h @@ -16,9 +16,9 @@ #include #include #include -#include "common/inner_common.h" -#include "framework/merger.h" -#include "framework/workflow.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/merger.h" +#include "predictor/framework/workflow.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/service_manager.h b/predictor/framework/service_manager.h index d6f05ac5cabc2744a07b6e2196ed1b7c21ac16e0..e456c5cdcd0eb93d91a33efa93db0f71cd92bcc9 100644 --- a/predictor/framework/service_manager.h +++ b/predictor/framework/service_manager.h @@ -15,7 +15,7 @@ #pragma once #include #include -#include "common/inner_common.h" +#include "predictor/common/inner_common.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/workflow.cpp b/predictor/framework/workflow.cpp index ac5f23371cc2b8fd910423d45f40c0ece2b59a68..61f74c0270b1cd991bb799146f0cfa20738718ff 100644 --- a/predictor/framework/workflow.cpp +++ b/predictor/framework/workflow.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "framework/workflow.h" +#include "predictor/framework/workflow.h" #include -#include "common/inner_common.h" -#include "framework/predictor_metric.h" // PredictorMetric +#include "predictor/common/inner_common.h" +#include "predictor/framework/predictor_metric.h" // PredictorMetric namespace baidu { namespace paddle_serving { diff --git a/predictor/framework/workflow.h b/predictor/framework/workflow.h index a89af74d4a2177766e77c2d35dc0d57492c91372..8e833602f61c3e700dc5bf8db4c95a17e64604d7 100644 --- a/predictor/framework/workflow.h +++ b/predictor/framework/workflow.h @@ -14,9 +14,9 @@ #pragma once #include -#include "common/inner_common.h" -#include "framework/dag.h" -#include "framework/dag_view.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/dag.h" +#include "predictor/framework/dag_view.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/mempool/mempool.cpp b/predictor/mempool/mempool.cpp index 65e77285304484ea2f527f1513c2a99c33007806..a6e1fcf5caf7183590e60f0a39f8831727e64569 100644 --- a/predictor/mempool/mempool.cpp +++ b/predictor/mempool/mempool.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "mempool/mempool.h" +#include "predictor/mempool/mempool.h" namespace im { diff --git a/predictor/op/op.cpp b/predictor/op/op.cpp index 5a2904cf81de8fd787219413f83fd44ad1c44687..1a94bf5db8710719efb076f9778aa0230052accf 100644 --- a/predictor/op/op.cpp +++ b/predictor/op/op.cpp @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "op/op.h" +#include "predictor/op/op.h" #include // butil::Timer #include -#include "common/constant.h" -#include "common/utils.h" -#include "framework/channel.h" -#include "framework/dag.h" +#include "predictor/common/constant.h" +#include "predictor/common/utils.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/dag.h" namespace baidu { namespace paddle_serving { diff --git a/predictor/op/op.h b/predictor/op/op.h index 9e82ce3e5312507803527e34542e176a9c8c5f10..ce7352d9b877533f5b9afb97b1f518b70e1e2c0c 100644 --- a/predictor/op/op.h +++ b/predictor/op/op.h @@ -15,10 +15,10 @@ #pragma once #include // bvar::LatencyRecorder #include -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "framework/predictor_metric.h" // PredictorMetric +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/framework/predictor_metric.h" // PredictorMetric namespace baidu { namespace paddle_serving { diff --git a/predictor/plugin/substitute.cc b/predictor/plugin/substitute.cc index 7c432e52fb325a0b8f9f4381af6f805bcb91f991..b568ee19328f6c0f0b7dc18d717051969b49b939 100644 --- a/predictor/plugin/substitute.cc +++ b/predictor/plugin/substitute.cc @@ -45,10 +45,9 @@ // Author: kenton@google.com (Kenton Varda) // #include -#include "plugin/strutil.h" - -#include "plugin/stl_util-inl.h" -#include "plugin/substitute.h" +#include "predictor/plugin/substitute.h" +#include "predictor/plugin/stl_util-inl.h" +#include "predictor/plugin/strutil.h" namespace google { namespace protobuf { diff --git a/predictor/plugin/substitute.h b/predictor/plugin/substitute.h index c21cf3818a691bf5b725a9c151c8dd70ec51b328..3d24e6f16bf5943d25552c8d5845e902f33b9fbc 100644 --- a/predictor/plugin/substitute.h +++ b/predictor/plugin/substitute.h @@ -49,7 +49,7 @@ #include // hmmm... // #include -#include "plugin/strutil.h" +#include "predictor/plugin/strutil.h" #pragma once namespace google { diff --git a/predictor/src/pdcodegen.cpp b/predictor/src/pdcodegen.cpp index f4e4f30baafcb5cff6473bf3d730b5dd45606d6c..fbfa90049bdcc3da25159fb5a1ec5d51c64ca989 100644 --- a/predictor/src/pdcodegen.cpp +++ b/predictor/src/pdcodegen.cpp @@ -20,9 +20,9 @@ #include "google/protobuf/descriptor.h" #include "google/protobuf/io/printer.h" #include "google/protobuf/io/zero_copy_stream.h" -#include "plugin/strutil.h" -#include "plugin/substitute.h" #include "predictor/pds_option.pb.h" +#include "predictor/plugin/strutil.h" +#include "predictor/plugin/substitute.h" using std::string; using google::protobuf::Descriptor; using google::protobuf::FileDescriptor; @@ -110,16 +110,16 @@ class PdsCodeGenerator : public CodeGenerator { context->OpenForInsert(header, "includes")); google::protobuf::io::Printer printer(output.get(), '$'); if (generate_impl) { - printer.Print("#include \"common/inner_common.h\"\n"); - printer.Print("#include \"framework/service.h\"\n"); - printer.Print("#include \"framework/manager.h\"\n"); - printer.Print("#include \"framework/service_manager.h\"\n"); + printer.Print("#include \"predictor/common/inner_common.h\"\n"); + printer.Print("#include \"predictor/framework/service.h\"\n"); + printer.Print("#include \"predictor/framework/manager.h\"\n"); + printer.Print("#include \"predictor/framework/service_manager.h\"\n"); } if (generate_stub) { printer.Print("#include \n"); - printer.Print("#include \"factory.h\"\n"); - printer.Print("#include \"stub.h\"\n"); - printer.Print("#include \"stub_impl.h\"\n"); + printer.Print("#include \"sdk-cpp/include/factory.h\"\n"); + printer.Print("#include \"sdk-cpp/include/stub.h\"\n"); + printer.Print("#include \"sdk-cpp/include/stub_impl.h\"\n"); } include_inserted = true; } diff --git a/predictor/src/pdserving.cpp b/predictor/src/pdserving.cpp index 8d844ecd5b56796fd961cd7e0090ffbd8678b7a5..b4d65b40353890222b6e5690f1513398aba53eff 100644 --- a/predictor/src/pdserving.cpp +++ b/predictor/src/pdserving.cpp @@ -20,13 +20,13 @@ #include #include #include "butil/logging.h" -#include "common/constant.h" -#include "common/inner_common.h" -#include "framework/manager.h" -#include "framework/resource.h" -#include "framework/server.h" -#include "framework/service.h" -#include "framework/workflow.h" +#include "predictor/common/constant.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/manager.h" +#include "predictor/framework/resource.h" +#include "predictor/framework/server.h" +#include "predictor/framework/service.h" +#include "predictor/framework/workflow.h" using baidu::paddle_serving::predictor::ServerManager; using baidu::paddle_serving::predictor::WorkflowManager; diff --git a/sdk-cpp/CMakeLists.txt b/sdk-cpp/CMakeLists.txt index b87ea37e498bf6de66d01d522cd90b0d783b660e..b846a537d7f43090b429a269ce59cbad1847bb07 100644 --- a/sdk-cpp/CMakeLists.txt +++ b/sdk-cpp/CMakeLists.txt @@ -2,62 +2,26 @@ include(src/CMakeLists.txt) include(proto/CMakeLists.txt) add_library(sdk-cpp ${sdk_cpp_srcs}) add_dependencies(sdk-cpp pdcodegen configure) -target_include_directories(sdk-cpp PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/include - ${CMKAE_CURRENT_BINARY_DIR}/ - ${CMAKE_CURRENT_BINARY_DIR}/../configure - ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ) target_link_libraries(sdk-cpp brpc configure protobuf leveldb) add_executable(ximage ${CMAKE_CURRENT_LIST_DIR}/demo/ximage.cpp) -target_include_directories(ximage PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/../configure - ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ) target_link_libraries(ximage -Wl,--whole-archive sdk-cpp -Wl,--no-whole-archive -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) add_executable(echo ${CMAKE_CURRENT_LIST_DIR}/demo/echo.cpp) -target_include_directories(echo PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/../configure - ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ) target_link_libraries(echo -Wl,--whole-archive sdk-cpp -Wl,--no-whole-archive -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) add_executable(dense_format ${CMAKE_CURRENT_LIST_DIR}/demo/dense_format.cpp) -target_include_directories(dense_format PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/../configure - ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ) target_link_libraries(dense_format -Wl,--whole-archive sdk-cpp -Wl,--no-whole-archive -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) add_executable(sparse_format ${CMAKE_CURRENT_LIST_DIR}/demo/sparse_format.cpp) -target_include_directories(sparse_format PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/../configure - ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ) target_link_libraries(sparse_format -Wl,--whole-archive sdk-cpp -Wl,--no-whole-archive -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) add_executable(int64tensor_format ${CMAKE_CURRENT_LIST_DIR}/demo/int64tensor_format.cpp) -target_include_directories(int64tensor_format PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/include - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_BINARY_DIR}/../configure - ${CMAKE_CURRENT_LIST_DIR}/../configure/include - ) target_link_libraries(int64tensor_format -Wl,--whole-archive sdk-cpp -Wl,--no-whole-archive -lpthread -lcrypto -lm -lrt -lssl -ldl -lz) diff --git a/serving/CMakeLists.txt b/serving/CMakeLists.txt index 8d2018f81c52da7da41d0915c2a7069a2687ea9e..928e74174b68c1be53e87a10171cdecbe307a380 100644 --- a/serving/CMakeLists.txt +++ b/serving/CMakeLists.txt @@ -5,8 +5,7 @@ add_executable(serving ${serving_srcs}) add_dependencies(serving pdcodegen fluid_cpu_engine pdserving paddle_fluid opencv_imgcodecs) target_include_directories(serving PUBLIC - ${CMAKE_CURRENT_LIST_DIR}/ - ${CMAKE_CURRENT_BINARY_DIR}/ + ${CMAKE_CURRENT_BINARY_DIR}/../predictor ) target_link_libraries(serving opencv_imgcodecs ${opencv_depend_libs} -Wl,--whole-archive fluid_cpu_engine diff --git a/serving/op/classify_op.cpp b/serving/op/classify_op.cpp index aa8c14537594a048aeddeaecddb799aa25ff96ba..3fa888722ee4bb8b4bdf98c0185c218056a6b96f 100644 --- a/serving/op/classify_op.cpp +++ b/serving/op/classify_op.cpp @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "op/classify_op.h" -#include "framework/infer.h" -#include "framework/memory.h" -#include "op/reader_op.h" +#include "serving/op/classify_op.h" +#include "predictor/framework/infer.h" +#include "predictor/framework/memory.h" +#include "serving/op/reader_op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/common_echo_op.cpp b/serving/op/common_echo_op.cpp index 570088cbf9adfb981bd3f92d08f95d8a9f793e32..0d471796ef64537781e677a31526349f3f79b3ab 100644 --- a/serving/op/common_echo_op.cpp +++ b/serving/op/common_echo_op.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "op/common_echo_op.h" +#include "serving/op/common_echo_op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/common_echo_op.h b/serving/op/common_echo_op.h index f8da7883fa2327d3f1a1443270a6d2efd57ae0d0..4e648cbd6b283365284b7a930f7dce20067702f6 100644 --- a/serving/op/common_echo_op.h +++ b/serving/op/common_echo_op.h @@ -15,10 +15,10 @@ #pragma once #include "serving/echo_service.pb.h" -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "op/op.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/op/op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/dense_echo_op.cpp b/serving/op/dense_echo_op.cpp index b63682aa6aafe33d1ee7723d3a8a3c02a9a0e149..63b32f9281fe0925a2be385b0671648c6c059c77 100644 --- a/serving/op/dense_echo_op.cpp +++ b/serving/op/dense_echo_op.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "op/dense_echo_op.h" +#include "serving/op/dense_echo_op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/dense_echo_op.h b/serving/op/dense_echo_op.h index 79f3d26eb8fe511f958254d2b490bfda91fb2937..ea528ac8cf748ee185493dcaac71bc658384a05b 100644 --- a/serving/op/dense_echo_op.h +++ b/serving/op/dense_echo_op.h @@ -15,10 +15,10 @@ #pragma once #include "serving/dense_service.pb.h" -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "op/op.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/op/op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/int64tensor_echo_op.cpp b/serving/op/int64tensor_echo_op.cpp index b17bb03e186b6c21c46cbfa83e9620e302ccd016..5abb7bd83b16a7384538d031a26ffaacafa49b7b 100644 --- a/serving/op/int64tensor_echo_op.cpp +++ b/serving/op/int64tensor_echo_op.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "op/int64tensor_echo_op.h" +#include "serving/op/int64tensor_echo_op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/int64tensor_echo_op.h b/serving/op/int64tensor_echo_op.h index 4d238c178c4db732eef3e7dcba96a21594f8fb47..4aa31c09f663767991730d6015e8a2e296959187 100644 --- a/serving/op/int64tensor_echo_op.h +++ b/serving/op/int64tensor_echo_op.h @@ -15,10 +15,10 @@ #pragma once #include "serving/int64tensor_service.pb.h" -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "op/op.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/op/op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/reader_op.cpp b/serving/op/reader_op.cpp index 9f62c5143fe8394136519e17a5158c2d9aab1be7..c4af477fb30092b0bd9a42a5b0e55a5c13f13b59 100644 --- a/serving/op/reader_op.cpp +++ b/serving/op/reader_op.cpp @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "op/reader_op.h" +#include "serving/op/reader_op.h" #include -#include "framework/memory.h" +#include "predictor/framework/memory.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/reader_op.h b/serving/op/reader_op.h index 6ec6fd2bfb2f08dcb304ca3f328c3083d40af124..9fb90234cb077cd21239b59002d538c61da93bfd 100644 --- a/serving/op/reader_op.h +++ b/serving/op/reader_op.h @@ -15,11 +15,11 @@ #pragma once #include #include -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "op/op.h" #include "predictor/builtin_format.pb.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/op/op.h" #include "serving/image_class.pb.h" // opencv diff --git a/serving/op/sparse_echo_op.cpp b/serving/op/sparse_echo_op.cpp index dce79a39446ee58c6b01076675f7a3fe0723ff42..8bdc803725c169e8887d849df54f6c4c59800beb 100644 --- a/serving/op/sparse_echo_op.cpp +++ b/serving/op/sparse_echo_op.cpp @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "op/sparse_echo_op.h" +#include "serving/op/sparse_echo_op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/sparse_echo_op.h b/serving/op/sparse_echo_op.h index 0b210588ecc1204061528482d0ee2ab48b6698ad..fab13327e40ddd6e450fdba0b5ca24148d0daee7 100644 --- a/serving/op/sparse_echo_op.h +++ b/serving/op/sparse_echo_op.h @@ -15,10 +15,10 @@ #pragma once #include "serving/sparse_service.pb.h" -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "op/op.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/op/op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/write_json_op.cpp b/serving/op/write_json_op.cpp index 423f5afeca2a1dccd7e1548c6fd45136c18ed74f..49a74f0a666c2830b012fb3dd68b4445ca1c2703 100644 --- a/serving/op/write_json_op.cpp +++ b/serving/op/write_json_op.cpp @@ -16,8 +16,8 @@ #include #include "json2pb/pb_to_json.h" -#include "framework/memory.h" -#include "op/write_json_op.h" +#include "predictor/framework/memory.h" +#include "serving/op/write_json_op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/write_json_op.h b/serving/op/write_json_op.h index 6fbb2358593843563dcde19c3ee3cb9fd0987a52..a3030cb367d65c59cbb53f2c4bd073c3cf15b600 100644 --- a/serving/op/write_json_op.h +++ b/serving/op/write_json_op.h @@ -13,10 +13,10 @@ // limitations under the License. #pragma once -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "op/op.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/op/op.h" #include "serving/image_class.pb.h" namespace baidu { diff --git a/serving/op/write_op.cpp b/serving/op/write_op.cpp index 7200070c208a90b714f8ef525aa8cee72ac12836..f957e2f40f139a88e43afecf68753974586544a6 100644 --- a/serving/op/write_op.cpp +++ b/serving/op/write_op.cpp @@ -16,8 +16,8 @@ #include #include "json2pb/pb_to_json.h" -#include "framework/memory.h" -#include "op/write_op.h" +#include "predictor/framework/memory.h" +#include "serving/op/write_op.h" namespace baidu { namespace paddle_serving { diff --git a/serving/op/write_op.h b/serving/op/write_op.h index f46a29b72ccaaaf8958ae5a48702c47ad7161fae..f86da442f750db2ff5f82efe7cf2f2b4a4a7648d 100644 --- a/serving/op/write_op.h +++ b/serving/op/write_op.h @@ -13,11 +13,11 @@ // limitations under the License. #pragma once -#include "common/inner_common.h" -#include "framework/channel.h" -#include "framework/op_repository.h" -#include "op/op.h" #include "predictor/builtin_format.pb.h" +#include "predictor/common/inner_common.h" +#include "predictor/framework/channel.h" +#include "predictor/framework/op_repository.h" +#include "predictor/op/op.h" #include "serving/image_class.pb.h" namespace baidu {