forked from mindspore-Ecosystem/mindspore
!2414 reset pynative flag in the resource clear
Merge pull request !2414 from limingqi107/master
This commit is contained in:
commit
be635d6100
|
@ -937,6 +937,11 @@ void PynativeExecutor::Clear(const std::string &flag) {
|
|||
if (flag == "resource") {
|
||||
MS_LOG(INFO) << "Clear res";
|
||||
Clean();
|
||||
// Maybe exit in the pynative runing op, so need reset pynative flag.
|
||||
auto ms_context = MsContext::GetInstance();
|
||||
if (ms_context != nullptr) {
|
||||
ms_context->set_enable_pynative_infer(false);
|
||||
}
|
||||
return;
|
||||
}
|
||||
MS_LOG(INFO) << "Clear";
|
||||
|
|
Loading…
Reference in New Issue