Browse Source

clean code

pull/14942/head
hwjiaorui 4 years ago
parent
commit
f01c3fca8b
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_}; std::vector<TypeId> output_dtypes = {dtype_};
// obtain input & output shapes // obtain input & output shapes
size_t dtype_size = abstract::TypeIdSize(dtype_); size_t dtype_size = abstract::TypeIdSize(dtype_);
int64_t shape = total_size_ / dtype_size;
if (dtype_size == 0) { if (dtype_size == 0) {
MS_LOG(EXCEPTION) << "Divide by zero."; 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<int64_t>> input_shapes = {{shape}, {1}};
std::vector<std::vector<size_t>> output_shapes = {{static_cast<size_t>(shape)}}; std::vector<std::vector<size_t>> output_shapes = {{static_cast<size_t>(shape)}};
auto mul_graph = session::SingleKernelGraph::ConstructKernelGraphBasedOnSingleOp( auto mul_graph = session::SingleKernelGraph::ConstructKernelGraphBasedOnSingleOp(


Loading…
Cancel
Save