提交 a50cc4dc 编写于 作者: D DannyIsFunny

test=develop

上级 41d46ab2
if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK OR LITE_SHUTDOWN_LOG)
lite_cc_library(place SRCS paddle_place.cc DEPS logging) lite_cc_library(place SRCS paddle_place.cc DEPS logging)
else() else()
lite_cc_library(place SRCS paddle_place.cc DEPS glog) lite_cc_library(place SRCS paddle_place.cc DEPS glog)
......
...@@ -56,9 +56,7 @@ class LITE_API Predictor { ...@@ -56,9 +56,7 @@ class LITE_API Predictor {
Program program(*desc.get(), scope_, valid_places); Program program(*desc.get(), scope_, valid_places);
optimizer_ = Optimizer(std::move(program), valid_places); optimizer_ = Optimizer(std::move(program), valid_places);
exec_scope_ = optimizer_.exec_scope(); exec_scope_ = optimizer_.exec_scope();
GenRuntimeProgram();
valid_places_ = valid_places; valid_places_ = valid_places;
PrepareFeedFetch();
} }
// Build from a model, with places set for hardware config. // Build from a model, with places set for hardware config.
......
...@@ -60,7 +60,6 @@ class Optimizer { ...@@ -60,7 +60,6 @@ class Optimizer {
program_ = &program; program_ = &program;
valid_places_ = valid_places; valid_places_ = valid_places;
CHECK(!valid_places.empty()) << "At least one valid_place should be set"; CHECK(!valid_places.empty()) << "At least one valid_place should be set";
CHECK(!graph_) << "duplicate optimize found";
graph_.reset(new mir::SSAGraph); graph_.reset(new mir::SSAGraph);
graph_->Build(program, valid_places); graph_->Build(program, valid_places);
......
...@@ -92,6 +92,7 @@ T PolyIoU(const T* box1, ...@@ -92,6 +92,7 @@ T PolyIoU(const T* box1,
const size_t box_size, const size_t box_size,
const bool normalized) { const bool normalized) {
LOG(FATAL) << "PolyIoU not implement."; LOG(FATAL) << "PolyIoU not implement.";
return *box1;
} }
template <class T> template <class T>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# else() # else()
# endif() # endif()
if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK OR LITE_ON_MODEL_OPTIMIZE_TOOL) if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK OR LITE_ON_MODEL_OPTIMIZE_TOOL OR LITE_SHUTDOWN_LOG)
lite_cc_library(logging SRCS logging.cc) lite_cc_library(logging SRCS logging.cc)
set(utils_DEPS logging) set(utils_DEPS logging)
lite_cc_test(test_logging SRCS logging_test.cc DEPS ${utils_DEPS}) lite_cc_test(test_logging SRCS logging_test.cc DEPS ${utils_DEPS})
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#pragma once #pragma once
#if defined(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) || \ #if defined(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK) || \
defined(LITE_ON_MODEL_OPTIMIZE_TOOL) defined(LITE_ON_MODEL_OPTIMIZE_TOOL) || defined(LITE_SHUTDOWN_LOG)
#include "lite/utils/logging.h" #include "lite/utils/logging.h"
#else // LITE_WITH_LIGHT_WEIGHT_FRAMEWORK #else // LITE_WITH_LIGHT_WEIGHT_FRAMEWORK
#include <glog/logging.h> #include <glog/logging.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册