From f01c3fca8b13a321ac47cbcdc4535e48e9afd079 Mon Sep 17 00:00:00 2001 From: hwjiaorui Date: Mon, 12 Apr 2021 09:23:47 +0800 Subject: [PATCH] clean code --- mindspore/ccsrc/runtime/device/launch_mul.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/runtime/device/launch_mul.cc b/mindspore/ccsrc/runtime/device/launch_mul.cc index c11f1f135e..1f82b1d28e 100644 --- a/mindspore/ccsrc/runtime/device/launch_mul.cc +++ b/mindspore/ccsrc/runtime/device/launch_mul.cc @@ -28,10 +28,10 @@ std::shared_ptr LaunchMul::ObtainMulKernelGraph() { std::vector output_dtypes = {dtype_}; // obtain input & output shapes size_t dtype_size = abstract::TypeIdSize(dtype_); - int64_t shape = total_size_ / dtype_size; if (dtype_size == 0) { MS_LOG(EXCEPTION) << "Divide by zero."; } + int64_t shape = total_size_ / dtype_size; std::vector> input_shapes = {{shape}, {1}}; std::vector> output_shapes = {{static_cast(shape)}}; auto mul_graph = session::SingleKernelGraph::ConstructKernelGraphBasedOnSingleOp(