Browse Source

!6284 Fix static check

Merge pull request !6284 from BowenK/master
tags/v1.0.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
63f0fb070f
18 changed files with 5 additions and 21 deletions
  1. +0
    -1
      mindspore/ccsrc/frontend/operator/ops_front_infer_function.cc
  2. +0
    -1
      mindspore/ccsrc/frontend/optimizer/cse_pass.h
  3. +0
    -2
      mindspore/ccsrc/frontend/optimizer/graph_transform.h
  4. +1
    -1
      mindspore/ccsrc/frontend/optimizer/pattern.cc
  5. +1
    -1
      mindspore/ccsrc/frontend/optimizer/pattern.h
  6. +0
    -1
      mindspore/ccsrc/frontend/optimizer/py_pass.cc
  7. +0
    -1
      mindspore/ccsrc/pipeline/jit/parse/parse_base.h
  8. +0
    -2
      mindspore/ccsrc/pipeline/jit/resource_base.h
  9. +0
    -2
      mindspore/ccsrc/pybind_api/ir/cell_py.h
  10. +1
    -0
      mindspore/ccsrc/pybind_api/ir/tensor_py.cc
  11. +0
    -1
      mindspore/ccsrc/utils/load_onnx/anf_converter.cc
  12. +0
    -1
      mindspore/core/ir/cell.h
  13. +0
    -1
      mindspore/core/ir/dtype.cc
  14. +0
    -1
      mindspore/core/ir/dtype.h
  15. +0
    -2
      mindspore/core/ir/dtype/tensor_type.cc
  16. +0
    -2
      mindspore/core/ir/dtype/tensor_type.h
  17. +1
    -0
      mindspore/core/ir/pattern_matcher.h
  18. +1
    -1
      mindspore/core/ir/primitive.h

+ 0
- 1
mindspore/ccsrc/frontend/operator/ops_front_infer_function.cc View File

@@ -666,6 +666,5 @@ REGISTER_FRONTENT_PRIMITIVE_EVAL_IMPL(J, prim::kPrimJ, InferImplJ);
REGISTER_FRONTENT_PRIMITIVE_EVAL_IMPL(BroadcastGradientArgs, prim::kPrimBroadcastGradientArgs,
InferImplBroadcastGradientArgs);
REGISTER_PRIMITIVE_EVAL_IMPL(Assign, prim::kPrimAssign, InferImplAssign);

} // namespace abstract
} // namespace mindspore

+ 0
- 1
mindspore/ccsrc/frontend/optimizer/cse_pass.h View File

@@ -30,7 +30,6 @@
namespace mindspore {
/* namespace to support opt */
namespace opt {

// Common subexpression elimination.
class CSEPass : public CSE {
public:


+ 0
- 2
mindspore/ccsrc/frontend/optimizer/graph_transform.h View File

@@ -27,7 +27,6 @@

namespace mindspore {
namespace opt {

bool CNodeHasTupleInput(const CNodePtr &cnode);
bool FuncGraphHasTupleInput(const FuncGraphPtr &fg);
std::vector<AnfNodePtr> TransformTupleArgument(const FuncGraphPtr &fg, const AnfNodePtr &node,
@@ -102,7 +101,6 @@ class GraphTupleParamTransform {
}
std::unordered_map<FuncGraphPtr, FuncGraphPtr> cache_;
};

} // namespace opt
} // namespace mindspore
#endif // MINDSPORE_CCSRC_FRONTEND_OPTIMIZER_GRAPH_TRANSFORM_H

+ 1
- 1
mindspore/ccsrc/frontend/optimizer/pattern.cc View File

@@ -145,7 +145,7 @@ AnfNodePtr MatchResult::get_node(const PatternPtr &pattern) {
}

void MatchResult::merge(const MatchResultPtr &other_result) {
auto other_result_map = other_result->_result();
auto other_result_map = other_result->result();
// add/update entries in other_result
for (auto &iter : other_result_map) {
match_result_[iter.first] = iter.second;


+ 1
- 1
mindspore/ccsrc/frontend/optimizer/pattern.h View File

@@ -259,7 +259,7 @@ class MatchResult {
MatchResult() {}
~MatchResult() = default;
void add_entry(PatternPtr pattern, AnfNodePtr node) { match_result_[pattern] = node; }
PatternNodeMap &_result() { return match_result_; }
PatternNodeMap &result() { return match_result_; }
AnfNodePtr get_node(const PatternPtr &pattern);
void merge(const MatchResultPtr &other_result);
void clear() { match_result_.clear(); }


+ 0
- 1
mindspore/ccsrc/frontend/optimizer/py_pass.cc View File

@@ -243,7 +243,6 @@ void Reset(PatternPtr pattern) {
}
return;
}

} // namespace internal

AnfNodePtr PythonPass::Run(const FuncGraphPtr &func_graph, const FuncGraphPtr &top_graph, const AnfNodePtr &node,


+ 0
- 1
mindspore/ccsrc/pipeline/jit/parse/parse_base.h View File

@@ -150,7 +150,6 @@ FuncGraphPtr ParsePythonCode(const py::object &obj,
const std::string &python_mod_get_parse_method = PYTHON_MOD_GET_PARSE_METHOD);
// add wrap for cell top graph.
FuncGraphPtr MakeTopGraph(const py::object &cell, const ValuePtr &cell_ptr);

} // namespace parse
} // namespace mindspore



+ 0
- 2
mindspore/ccsrc/pipeline/jit/resource_base.h View File

@@ -28,7 +28,6 @@

namespace mindspore {
namespace pipeline {

class ResourceBase {
public:
ResourceBase() { manager_ = MakeManager(); }
@@ -59,7 +58,6 @@ class ResourceBase {
};

using ResourceBasePtr = std::shared_ptr<pipeline::ResourceBase>;

} // namespace pipeline
} // namespace mindspore



+ 0
- 2
mindspore/ccsrc/pybind_api/ir/cell_py.h View File

@@ -32,13 +32,11 @@ namespace py = pybind11;
// mindspore namespace is the top level namespace of Mindsporeession project.
// Other namespace should be a sub namespace of mindspore namespace in the ME project.
namespace mindspore {

// Cell python wrapper and adapter class.
class CellPy {
public:
static void AddAttr(CellPtr cell, const std::string &name, const py::object &obj);
};

} // namespace mindspore

#endif // MINDSPORE_CCSRC_UTILS_CELL_PY_H_

+ 1
- 0
mindspore/ccsrc/pybind_api/ir/tensor_py.cc View File

@@ -19,6 +19,7 @@
#include <vector>
#include <sstream>
#include <string>
#include <utility>

#include "pybind_api/api_register.h"
#include "abstract/abstract_value.h"


+ 0
- 1
mindspore/ccsrc/utils/load_onnx/anf_converter.cc View File

@@ -30,7 +30,6 @@

namespace mindspore {
namespace lite {

const char WHITESPACE[] = "\t\n\v\f\r ";
const int FLAG_PREFIX_LEN = 2;



+ 0
- 1
mindspore/core/ir/cell.h View File

@@ -64,6 +64,5 @@ class Cell : public Named {
};

using CellPtr = std::shared_ptr<Cell>;

} // namespace mindspore
#endif // MINDSPORE_CCSRC_IR_CELL_H_

+ 0
- 1
mindspore/core/ir/dtype.cc View File

@@ -206,5 +206,4 @@ std::ostream &operator<<(std::ostream &os, const std::shared_ptr<Problem> proble

const TypePtr kTensorTypeFP16 = std::make_shared<TensorType>(std::make_shared<Float>(16));
const TypePtr kTensorTypeFP32 = std::make_shared<TensorType>(std::make_shared<Float>(32));

} // namespace mindspore

+ 0
- 1
mindspore/core/ir/dtype.h View File

@@ -264,7 +264,6 @@ extern const TypePtr kKeyword;
extern const TypePtr kTensorType;
extern const TypePtr kTensorTypeFP16;
extern const TypePtr kTensorTypeFP32;

} // namespace mindspore

#endif // MINDSPORE_CORE_IR_DTYPE_H_

+ 0
- 2
mindspore/core/ir/dtype/tensor_type.cc View File

@@ -21,7 +21,6 @@
#include "utils/log_adapter.h"

namespace mindspore {

TypePtr UndeterminedType::DeepCopy() const {
MS_EXCEPTION_IF_NULL(element_type_);
if (IsGeneric()) {
@@ -190,5 +189,4 @@ bool SparseTensorType::operator==(const Type &other) const {
}
return *element_type_ == *other_elem_type;
}

} // namespace mindspore

+ 0
- 2
mindspore/core/ir/dtype/tensor_type.h View File

@@ -34,7 +34,6 @@
#include "ir/dtype/type.h"

namespace mindspore {

class UndeterminedType : public Object {
public:
UndeterminedType() : Object(kObjectTypeUndeterminedType) {}
@@ -126,7 +125,6 @@ class SparseTensorType : public Object {
TypePtr element_type_;
};
using SparseTensorTypePtr = std::shared_ptr<SparseTensorType>;

} // namespace mindspore

#endif // MINDSPORE_CORE_IR_DTYPE_TENSORTYPE_H_

+ 1
- 0
mindspore/core/ir/pattern_matcher.h View File

@@ -641,6 +641,7 @@ class PConstant : public PBase<PConstant<T> > {
}
int ret = 0;
char *source_data = reinterpret_cast<char *>(GetPointerToTensorData(x));
MS_EXCEPTION_IF_NULL(source_data);
if (x_tensor_ptr->DataSize() == 1) {
for (int i = 0; i < new_tensor_ptr->ElementsNum(); i++) {
ret = memcpy_s(data + i * GetTypeByte(tensor_type_ptr), GetTypeByte(tensor_type_ptr), source_data,


+ 1
- 1
mindspore/core/ir/primitive.h View File

@@ -115,7 +115,7 @@ class Primitive : public Named {
void set_const_input_indexes(const std::vector<size_t> &const_input_indexes) {
const_input_indexes_ = const_input_indexes;
}
std::vector<size_t> &get_const_input_indexes() { return const_input_indexes_; }
const std::vector<size_t> &get_const_input_indexes() { return const_input_indexes_; }
std::string id() const { return id_; }

protected:


Loading…
Cancel
Save