Browse Source

Fix codecheck for master

tags/v1.3.0
l00591931 4 years ago
parent
commit
d1651800bf
6 changed files with 6 additions and 5 deletions
  1. +2
    -1
      mindspore/_extends/parse/standard_method.py
  2. +1
    -1
      mindspore/ccsrc/debug/anf_ir_dump.cc
  3. +1
    -1
      mindspore/ccsrc/pipeline/jit/pipeline_ge.cc
  4. +1
    -0
      mindspore/common/_decorator.py
  5. +1
    -1
      mindspore/core/abstract/prim_structures.cc
  6. +0
    -1
      mindspore/ops/operations/array_ops.py

+ 2
- 1
mindspore/_extends/parse/standard_method.py View File

@@ -1454,7 +1454,8 @@ def enumerate_(x, start=0):
x_type = F.typeof(x)
ret = ()
op_name = "enumerate"
if check_is_tuple_or_list_or_tensor(x_type, op_name, "first input") and check_is_const_int(start, op_name, "start"):
if check_is_tuple_or_list_or_tensor(x_type, op_name, "first input") and \
check_is_const_int(start, op_name, "start"):
if check_is_tensor(x_type):
for i in range(x.shape[0]):
ret += ((start + i, x[i]),)


+ 1
- 1
mindspore/ccsrc/debug/anf_ir_dump.cc View File

@@ -67,7 +67,7 @@ void PrintNodeOutputType(std::ostringstream &buffer, const AnfNodePtr &nd) {

abstract::ShapePtr shape = dyn_cast<abstract::Shape>(nd->Shape());
TypePtr type = dyn_cast<Type>(nd->Type());
if ((nullptr != shape) && (nullptr != type)) {
if ((shape != nullptr) && (type != nullptr)) {
buffer << "<" << type << "x" << shape->shape() << ">";
} else if (nullptr != type) {
buffer << "<" << type << ">";


+ 1
- 1
mindspore/ccsrc/pipeline/jit/pipeline_ge.cc View File

@@ -524,7 +524,7 @@ void ExportDFGraph(const std::string &file_name, const std::string &phase) {
}

transform::DfGraphPtr ge_graph = wrap_ptr->graph_ptr_;
if (nullptr == ge_graph) {
if (ge_graph == nullptr) {
MS_LOG(ERROR) << "Graph is null!";
return;
}


+ 1
- 0
mindspore/common/_decorator.py View File

@@ -16,6 +16,7 @@

from mindspore import log


def deprecated(version, substitute, use_substitute_name=False):
"""deprecated warning



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

@@ -202,7 +202,7 @@ AbstractBasePtr InferTupleOrListSetItem(const std::string &op_name, const Abstra
int64_t idx_t = idx_v >= 0 ? idx_v : idx_v + SizeToLong(nelems);
if (idx_t < 0 || idx_t >= SizeToLong(nelems)) {
MS_EXCEPTION(IndexError) << op_name << " evaluator the index: " << idx_v << " to set out of range: [-" << nelems
<< "," << nelems - 1 << "].";
<< "," << (nelems - 1) << "].";
}
size_t uidx_v = LongToSize(idx_t);
elements[uidx_v] = args_spec_list[2];


+ 0
- 1
mindspore/ops/operations/array_ops.py View File

@@ -850,7 +850,6 @@ class GatherV2(PrimitiveWithCheck):
Please use Gather instead.
"""

# deprecate_new_name = "Gather"

@deprecated("1.1", "Gather", True)
@prim_attr_register


Loading…
Cancel
Save