!48603 [MS][LITE][parallel predict] fix graph executor session

Merge pull request !48603 from yefeng/518-fix_graph_executor
This commit is contained in:
i-robot 2023-02-09 03:14:52 +00:00 committed by Gitee
commit eeb4a8ce56
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 4 additions and 0 deletions

View File

@ -122,6 +122,10 @@ bool LiteRTGraphExecutor::CompileGraph(const FuncGraphPtr &graph, const std::map
MS_LOG(INFO) << "the graph is the same as the last time. We do not need to convert, and we can directly use the " MS_LOG(INFO) << "the graph is the same as the last time. We do not need to convert, and we can directly use the "
"cached model buf."; "cached model buf.";
} }
if (lite_session_ == nullptr) {
MS_LOG(ERROR) << "lite session is nullptr.";
return false;
}
int ret = lite_session_->LoadModelAndCompileByBuf(reinterpret_cast<char *>(fb_model_buf_), kMindIR_Lite, data_size, int ret = lite_session_->LoadModelAndCompileByBuf(reinterpret_cast<char *>(fb_model_buf_), kMindIR_Lite, data_size,
helpers_.get()); helpers_.get());
delete meta_graph; delete meta_graph;