This commit is contained in:
yefeng 2022-09-24 14:00:33 +08:00
parent 2e53861895
commit 2acbbbaa4c
2 changed files with 4 additions and 0 deletions

View File

@ -187,10 +187,12 @@ int InnerContext::Init() {
}
InnerContext::~InnerContext() {
MS_LOG(INFO) << "delete InnerContext.";
if (this->thread_pool_ != nullptr) {
delete thread_pool_;
this->thread_pool_ = nullptr;
}
MS_LOG(INFO) << "delete InnerContext done.";
}
int InnerContext::IsValid() {

View File

@ -408,8 +408,10 @@ int MindrtInit() { return mindspore::Initialize("", "", "", ""); }
void MindrtTerminate(const std::vector<std::shared_ptr<LiteOpActor>> &actor_list,
const std::shared_ptr<ActorMgr> &actor_mgr) {
MS_LOG(INFO) << "start terminating mindrt.";
for (const auto &actor : actor_list) {
mindspore::Terminate(actor->GetAID(), actor_mgr);
}
MS_LOG(INFO) << "successfully terminated mindrt.";
}
} // namespace mindspore::lite