diff --git a/torch_npu/csrc/aten/ops/Atan2KernelNpu.cpp b/torch_npu/csrc/aten/ops/Atan2KernelNpu.cpp index 433cac4f6a19401a4339ce8dfd5e97a03340446a..3a8b976fb457b80a1956ee6fba9900d8dde28aa1 100644 --- a/torch_npu/csrc/aten/ops/Atan2KernelNpu.cpp +++ b/torch_npu/csrc/aten/ops/Atan2KernelNpu.cpp @@ -45,7 +45,7 @@ at::Tensor& NPUNativeFunctions::atan2_out( outputSize); if (!NpuUtils::check_match(&result)) { at::Tensor contiguousResult = NpuUtils::format_contiguous(result); - at::Tensor result = atan2_out_npu_nocheck(self, other, contiguousResult); + atan2_out_npu_nocheck(self, other, contiguousResult); NpuUtils::format_fresh_view(result, contiguousResult); } else { atan2_out_npu_nocheck(self, other, result);