Browse Source

!14942 clean code

From: @hwjiaorui
Reviewed-by: @jjfeing,@zhoufeng54
Signed-off-by: @zhoufeng54
pull/14942/MERGE
mindspore-ci-bot Gitee 4 years ago
parent
commit
a91fd3acd4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      mindspore/ccsrc/runtime/device/launch_mul.cc

+ 1
- 1
mindspore/ccsrc/runtime/device/launch_mul.cc View File

@@ -28,10 +28,10 @@ std::shared_ptr<session::KernelGraph> LaunchMul::ObtainMulKernelGraph() {
std::vector<TypeId> 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<std::vector<int64_t>> input_shapes = {{shape}, {1}};
std::vector<std::vector<size_t>> output_shapes = {{static_cast<size_t>(shape)}};
auto mul_graph = session::SingleKernelGraph::ConstructKernelGraphBasedOnSingleOp(


Loading…
Cancel
Save