提交 f66e4a5e 编写于 作者: D DannyIsFunny

test=develop

上级 97c10e3e
......@@ -34,6 +34,7 @@ namespace lite {
void CxxPaddleApiImpl::Init(const lite_api::CxxConfig &config) {
config_ = config;
if (!status_is_cloned_) {
auto places = config.valid_places();
std::vector<std::string> passes{};
#ifdef LITE_WITH_CUDA
......@@ -67,6 +68,10 @@ void CxxPaddleApiImpl::Init(const lite_api::CxxConfig &config) {
passes = {"type_layout_cast_preprocess_pass"};
VLOG(1) << "add pass:" << passes[0];
}
raw_predictor_->Build(config, places, passes);
} else {
CHECK(raw_predictor_) << "The Predictor can not be nullptr in Clone mode.";
}
mode_ = config.power_mode();
threads_ = config.threads();
#if (defined LITE_WITH_X86) && (defined PADDLE_WITH_MKLML) && \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册