Browse Source

code clean

tags/v1.3.0
hwjiaorui 5 years ago
parent
commit
9afd1e5174
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      mindspore/ccsrc/backend/optimizer/ascend/mindir/sparse_softmax_cross_entropy_with_logits_unify_mindir.cc
  2. +1
    -1
      mindspore/ccsrc/runtime/device/launch_mul.cc
  3. +1
    -1
      mindspore/core/abstract/prim_arrays.cc

+ 1
- 1
mindspore/ccsrc/backend/optimizer/ascend/mindir/sparse_softmax_cross_entropy_with_logits_unify_mindir.cc View File

@@ -59,7 +59,7 @@ CNodePtr CreateOneHot(const FuncGraphPtr &graph, const CNodePtr &sparse_softmax_
int64_t depth = 0;
if (logits_shape.size() >= 1) {
size_t index = logits_shape.size() - 1;
depth = logits_shape[index];
depth = SizeToLong(logits_shape[index]);
} else {
MS_LOG(EXCEPTION) << "logits's shape of sparse_softmax_cross_entropy_with_logits is empty.";
}


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

@@ -31,7 +31,7 @@ std::shared_ptr<session::KernelGraph> LaunchMul::ObtainMulKernelGraph() {
if (dtype_size == 0) {
MS_LOG(EXCEPTION) << "Divide by zero.";
}
int64_t shape = total_size_ / dtype_size;
int64_t shape = SizeToLong(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(


+ 1
- 1
mindspore/core/abstract/prim_arrays.cc View File

@@ -829,7 +829,7 @@ AbstractBasePtr InferImplReshape(const AnalysisEnginePtr &, const PrimitivePtr &
if (it_second != shape.end()) {
MS_LOG(EXCEPTION) << "At most one component of input shape can be -1";
}
int index = std::distance(shape.begin(), it_first);
auto index = std::distance(shape.begin(), it_first);
int infer_value = x_num;
int infer_min_value = x_min_num;
int infer_max_value = x_max_num;


Loading…
Cancel
Save