From c3d04200799911a69617c3b1339a8e94bcd1276b Mon Sep 17 00:00:00 2001 From: DannyIsFunny <912790387@qq.com> Date: Tue, 31 Mar 2020 05:50:30 +0000 Subject: [PATCH] test=develop --- lite/api/cxx_api.h | 2 +- lite/api/cxx_api_impl.cc | 4 ++-- lite/tools/build.sh | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lite/api/cxx_api.h b/lite/api/cxx_api.h index 5b9ef24b53..730acbe01b 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 45e24a39ae..152af06355 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 4c74f75c91..c67be25954 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 \ -- GitLab