From fa9a0e0894488d7f7aea23c59f09546a918789c9 Mon Sep 17 00:00:00 2001 From: wangguibao Date: Mon, 4 Mar 2019 21:44:26 +0800 Subject: [PATCH] Fix include paths Change-Id: Ib89b0dd2c8048f74cc08117bc344d7b821906b8a --- configure/CMakeLists.txt | 7 ---- configure/src/configure_parser.cpp | 2 +- configure/tests/test_configure.cpp | 2 +- inferencer-fluid-cpu/CMakeLists.txt | 2 -- .../include/fluid_cpu_engine.h | 2 +- inferencer-fluid-cpu/src/fluid_cpu_engine.cpp | 2 +- predictor/CMakeLists.txt | 9 ----- predictor/common/constant.cpp | 2 +- predictor/common/constant.h | 2 +- predictor/common/inner_common.h | 6 ++-- predictor/common/macros.h | 2 +- predictor/common/utils.h | 4 +-- predictor/framework/bsf-inl-tensor.h | 6 ++-- predictor/framework/bsf-inl.h | 2 +- predictor/framework/bsf.h | 2 +- predictor/framework/channel.h | 2 +- predictor/framework/dag.cpp | 8 ++--- predictor/framework/dag.h | 2 +- predictor/framework/dag_view.cpp | 6 ++-- predictor/framework/dag_view.h | 8 ++--- predictor/framework/factory.h | 2 +- predictor/framework/infer.h | 8 ++--- predictor/framework/infer_data.h | 2 +- predictor/framework/manager.h | 8 ++--- predictor/framework/memory.cpp | 4 +-- predictor/framework/memory.h | 4 +-- predictor/framework/merger.h | 2 +- predictor/framework/op_repository.cpp | 4 +-- predictor/framework/op_repository.h | 2 +- predictor/framework/resource.cpp | 6 ++-- predictor/framework/resource.h | 4 +-- predictor/framework/server.cpp | 10 +++--- predictor/framework/server.h | 2 +- predictor/framework/service.cpp | 18 +++++----- predictor/framework/service.h | 6 ++-- predictor/framework/service_manager.h | 2 +- predictor/framework/workflow.cpp | 6 ++-- predictor/framework/workflow.h | 6 ++-- predictor/mempool/mempool.cpp | 2 +- predictor/op/op.cpp | 10 +++--- predictor/op/op.h | 8 ++--- predictor/plugin/substitute.cc | 7 ++-- predictor/plugin/substitute.h | 2 +- predictor/src/pdcodegen.cpp | 18 +++++----- predictor/src/pdserving.cpp | 14 ++++---- sdk-cpp/CMakeLists.txt | 36 ------------------- serving/CMakeLists.txt | 3 +- serving/op/classify_op.cpp | 8 ++--- serving/op/common_echo_op.cpp | 2 +- serving/op/common_echo_op.h | 8 ++--- serving/op/dense_echo_op.cpp | 2 +- serving/op/dense_echo_op.h | 8 ++--- serving/op/int64tensor_echo_op.cpp | 2 +- serving/op/int64tensor_echo_op.h | 8 ++--- serving/op/reader_op.cpp | 4 +-- serving/op/reader_op.h | 8 ++--- serving/op/sparse_echo_op.cpp | 2 +- serving/op/sparse_echo_op.h | 8 ++--- serving/op/write_json_op.cpp | 4 +-- serving/op/write_json_op.h | 8 ++--- serving/op/write_op.cpp | 4 +-- serving/op/write_op.h | 8 ++--- 62 files changed, 151 insertions(+), 207 deletions(-) diff --git a/configure/CMakeLists.txt b/configure/CMakeLists.txt index f2afda8f..66b395a1 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 d7e8aa10..e19ec05b 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 de7555c1..0e118070 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 bb5f108c..f52f59f6 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 d7f3725e..84920edf 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 5ec5678a..9326f7e4 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 013e5254..57156f94 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 0dff9c8a..f9dac852 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 90eb45f4..857acd35 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 282bb74f..d9c689f6 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 b737d7cd..7636d714 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 271ac4ae..4a582ac3 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 7c193e40..81a59ff0 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 5a6e4931..e79a4c70 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 c594c24f..2dcb6c90 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 8282ddaf..25f68876 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 98b6835b..99476b45 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 98dfdb80..e6c5f711 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 141f8d14..cff94e6f 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 660f0e77..89e195bf 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 0bb157af..b615687c 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 8fd6bc5b..67c4ab55 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 be8857c0..8bb0b5d8 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 6e14fbdd..939ba15a 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 e0a69df2..32f25478 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 e2afc624..9cc12e8f 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 25568dc5..5188bed6 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 8a430e64..76396cd2 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 4f789e48..dca8f129 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 414e48dd..9ced89ff 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 9c741e44..3f3bdb91 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 23bda575..6c4525fe 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 0158e7e3..6c2e15c5 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 a9a2078d..053b0859 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 0d913acd..f9896e28 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 d6f05ac5..e456c5cd 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 ac5f2337..61f74c02 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 a89af74d..8e833602 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 65e77285..a6e1fcf5 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 5a2904cf..1a94bf5d 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 9e82ce3e..ce7352d9 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 7c432e52..b568ee19 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 c21cf381..3d24e6f1 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 f4e4f30b..fbfa9004 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 8d844ecd..b4d65b40 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 b87ea37e..b846a537 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 8d2018f8..928e7417 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 aa8c1453..3fa88872 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 570088cb..0d471796 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 f8da7883..4e648cbd 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 b63682aa..63b32f92 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 79f3d26e..ea528ac8 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 b17bb03e..5abb7bd8 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 4d238c17..4aa31c09 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 9f62c514..c4af477f 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 6ec6fd2b..9fb90234 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 dce79a39..8bdc8037 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 0b210588..fab13327 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 423f5afe..49a74f0a 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 6fbb2358..a3030cb3 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 7200070c..f957e2f4 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 f46a29b7..f86da442 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 { -- GitLab