diff --git a/lite/api/cxx_api.h b/lite/api/cxx_api.h index 5b9ef24b532a0acb8e889d5bb3b1d3bab05b6449..730acbe01ba0ab79fd674022bc88e16402dc9094 100644 --- a/lite/api/cxx_api.h +++ b/lite/api/cxx_api.h @@ -154,7 +154,7 @@ class LITE_API Predictor { class CxxPaddleApiImpl : public lite_api::PaddlePredictor { public: - CxxPaddleApiImpl() {} + CxxPaddleApiImpl() { raw_predictor_ = std::make_shared(); } explicit CxxPaddleApiImpl(const std::shared_ptr& raw_predictor) : raw_predictor_(raw_predictor) {} diff --git a/lite/api/cxx_api_impl.cc b/lite/api/cxx_api_impl.cc index 45e24a39ae7137d790801086ac55e5f3f6a85c14..152af063551a83d4e75bd9af8093b480da3c7d0c 100644 --- a/lite/api/cxx_api_impl.cc +++ b/lite/api/cxx_api_impl.cc @@ -80,7 +80,7 @@ std::vector CxxPaddleApiImpl::GetInputNames() { } std::vector CxxPaddleApiImpl::GetParamNames() { - return raw_predictor_.GetParamNames(); + return raw_predictor_->GetParamNames(); } std::vector CxxPaddleApiImpl::GetOutputNames() { @@ -114,7 +114,7 @@ std::unique_ptr CxxPaddleApiImpl::GetTensor( std::unique_ptr CxxPaddleApiImpl::GetMutableTensor( const std::string &name) { return std::unique_ptr( - new lite_api::Tensor(raw_predictor_.GetMutableTensor(name))); + new lite_api::Tensor(raw_predictor_->GetMutableTensor(name))); } std::unique_ptr CxxPaddleApiImpl::GetInputByName( diff --git a/lite/tools/build.sh b/lite/tools/build.sh index 4c74f75c91c7931ffba060eb9180d858bc7d54a7..c67be25954e14e3c627863a28b8b80c61f5fab87 100755 --- a/lite/tools/build.sh +++ b/lite/tools/build.sh @@ -358,6 +358,7 @@ function make_x86 { -DLITE_WITH_ARM=OFF \ -DLITE_WITH_PYTHON=$BUILD_PYTHON \ -DWITH_GPU=OFF \ + -DLITE_SHUTDOWN_LOG=ON \ -DLITE_WITH_PYTHON=${BUILD_PYTHON} \ -DLITE_BUILD_EXTRA=ON \ -DCMAKE_BUILD_TYPE=Release \