From c25806216695044772b187a8f031246fcd71bd0d Mon Sep 17 00:00:00 2001 From: jjfeing Date: Tue, 12 May 2020 09:00:57 +0800 Subject: [PATCH] fix bug when reset taskinfo core dump --- mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc b/mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc index bac2cae8711..577af45d595 100644 --- a/mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc +++ b/mindspore/ccsrc/kernel/tbe/tbe_kernel_parallel_build.cc @@ -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