From 34c00eaef5ad47d20236925d442d0647efd17240 Mon Sep 17 00:00:00 2001 From: dabaiji Date: Wed, 23 Nov 2022 17:23:01 +0800 Subject: [PATCH] fix scatter-nd-binary LongToSize coredump issue --- .../device/cpu/kernel/scatter_nd_arithmetic_cpu_kernel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/plugin/device/cpu/kernel/scatter_nd_arithmetic_cpu_kernel.cc b/mindspore/ccsrc/plugin/device/cpu/kernel/scatter_nd_arithmetic_cpu_kernel.cc index 9fdcb7e7f21..347657cb849 100644 --- a/mindspore/ccsrc/plugin/device/cpu/kernel/scatter_nd_arithmetic_cpu_kernel.cc +++ b/mindspore/ccsrc/plugin/device/cpu/kernel/scatter_nd_arithmetic_cpu_kernel.cc @@ -158,11 +158,11 @@ bool ScatterNdArithmeticCpuKernelMod::LaunchKernel(const std::vector= static_cast(input_shape_[i])) { invalid_index_pos = SizeToLong(index_idx); break; } + out_idx += batch_strides_[i] * LongToSize(index) * inner_size_; } if (invalid_index_pos != -1) { break;