From b0a2a74bf81d743b753ca7f158586f2ce2910d80 Mon Sep 17 00:00:00 2001 From: chujinjin Date: Mon, 21 Dec 2020 14:35:19 +0800 Subject: [PATCH] fix coredump on cpu --- mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc b/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc index 3c56162763..d724155ecf 100644 --- a/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc +++ b/mindspore/ccsrc/runtime/device/cpu/cpu_kernel_runtime.cc @@ -225,7 +225,7 @@ void CPUKernelRuntime::CreateOutputTensors(session::KernelGraph *kernel_graph, if (input_nodes.size() != inputs.size()) { MS_LOG(EXCEPTION) << "Input size not equal to input node size!"; } - input_param_tensor_map_.clear(); + size_t input_idx = 0; for (auto &item : input_nodes) { MS_EXCEPTION_IF_NULL(item); @@ -240,6 +240,7 @@ void CPUKernelRuntime::CreateOutputTensors(session::KernelGraph *kernel_graph, auto out = CreatTensorForOutput(kernel_graph, item_with_index, tensor_to_node); outputs->push_back(std::move(out)); } + input_param_tensor_map_.clear(); } void CPUKernelRuntime::BindInputTensorAddressPtr(const session::KernelGraph &kernel_graph,