fix bug when reset taskinfo core dump

This commit is contained in:
jjfeing 2020-05-12 09:00:57 +08:00
parent f89d081942
commit c258062166
1 changed files with 4 additions and 1 deletions

View File

@ -245,7 +245,10 @@ void ParallelBuildManager::ResetTaskInfo() {
}
task_map_.clear();
same_op_list_.clear();
(void)PyObject_CallMethod(tbe_parallel_compiler_, kResetTaskInfo, "O");
if (tbe_parallel_compiler_ != nullptr) {
PyObject *pArg = Py_BuildValue("()");
(void)PyObject_CallMethod(tbe_parallel_compiler_, kResetTaskInfo, "O", pArg);
}
}
} // namespace kernel
} // namespace mindspore