Browse Source

!439 code check clean

Merge pull request !439 from 徐睿/br_com
pull/442/MERGE
i-robot Gitee 4 years ago
parent
commit
16655c8a28
20 changed files with 4 additions and 57 deletions
  1. +1
    -0
      parser/caffe/caffe_parser.h
  2. +1
    -1
      parser/common/acl_graph_parser_util.h
  3. +0
    -5
      parser/common/op_def/arg_op.cc
  4. +0
    -2
      parser/common/op_def/arg_op.h
  5. +0
    -5
      parser/common/op_def/constant_op.cc
  6. +0
    -1
      parser/common/op_def/constant_op.h
  7. +0
    -6
      parser/common/op_def/frameworkop_op.cc
  8. +0
    -2
      parser/common/op_def/frameworkop_op.h
  9. +0
    -5
      parser/common/op_def/no_op_op.cc
  10. +0
    -2
      parser/common/op_def/no_op_op.h
  11. +1
    -1
      parser/common/op_def/operator.h
  12. +0
    -5
      parser/common/op_def/ref_switch_op.cc
  13. +0
    -2
      parser/common/op_def/ref_switch_op.h
  14. +0
    -5
      parser/common/op_def/shape_n_op.cc
  15. +0
    -2
      parser/common/op_def/shape_n_op.h
  16. +0
    -5
      parser/common/op_def/var_is_initialized_op_op.cc
  17. +0
    -1
      parser/common/op_def/var_is_initialized_op_op.h
  18. +0
    -5
      parser/common/op_def/variable_op.cc
  19. +0
    -2
      parser/common/op_def/variable_op.h
  20. +1
    -0
      parser/onnx/subgraph_adapter/subgraph_adapter_factory.h

+ 1
- 0
parser/caffe/caffe_parser.h View File

@@ -50,6 +50,7 @@ using std::set;
using std::string; using std::string;
using std::unordered_map; using std::unordered_map;
using std::vector; using std::vector;
using domi::Status;
static std::map<std::vector<std::string>, std::vector<std::string>> params_share_map; static std::map<std::vector<std::string>, std::vector<std::string>> params_share_map;


class PARSER_FUNC_VISIBILITY CaffeModelParser : public domi::ModelParser { class PARSER_FUNC_VISIBILITY CaffeModelParser : public domi::ModelParser {


+ 1
- 1
parser/common/acl_graph_parser_util.h View File

@@ -157,7 +157,7 @@ bool ValidateStr(const std::string &filePath, const std::string &mode);
std::string CurrentTimeInStr(); std::string CurrentTimeInStr();


template <typename T, typename... Args> template <typename T, typename... Args>
static inline std::shared_ptr<T> MakeShared(Args &&... args) {
inline std::shared_ptr<T> MakeShared(Args &&... args) {
using T_nc = typename std::remove_const<T>::type; using T_nc = typename std::remove_const<T>::type;
std::shared_ptr<T> ret(new (std::nothrow) T_nc(std::forward<Args>(args)...)); std::shared_ptr<T> ret(new (std::nothrow) T_nc(std::forward<Args>(args)...));
return ret; return ret;


+ 0
- 5
parser/common/op_def/arg_op.cc View File

@@ -23,11 +23,6 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ArgOpOperator::ArgOpOperator()


ArgOpOperator::~ArgOpOperator() {} ArgOpOperator::~ArgOpOperator() {}


FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ArgOpOperator &ArgOpOperator::Name(const std::string &name) {
(void)ParserOperator::Name(name);
return *this;
}

FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ArgOpOperator &ArgOpOperator::Index(int64_t index) { FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ArgOpOperator &ArgOpOperator::Index(int64_t index) {
Attr("index", static_cast<int64_t>(index)); Attr("index", static_cast<int64_t>(index));




+ 0
- 2
parser/common/op_def/arg_op.h View File

@@ -25,8 +25,6 @@ class ArgOpOperator : public ParserOperator {


~ArgOpOperator() override; ~ArgOpOperator() override;


ArgOpOperator &Name(const std::string &name);

ArgOpOperator &Index(int64_t index); ArgOpOperator &Index(int64_t index);


int64_t GetIndex() const; int64_t GetIndex() const;


+ 0
- 5
parser/common/op_def/constant_op.cc View File

@@ -25,11 +25,6 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ConstantOperator::ConstantOpera


FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ConstantOperator::~ConstantOperator() {} FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ConstantOperator::~ConstantOperator() {}


FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ConstantOperator &ConstantOperator::Name(const std::string &name) {
ParserOperator::Name(name);
return *this;
}

FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ConstantOperator &ConstantOperator::VectorAttr( FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY ConstantOperator &ConstantOperator::VectorAttr(
std::string key, std::vector<int64_t> &value) { std::string key, std::vector<int64_t> &value) {
Attr(key, value); Attr(key, value);


+ 0
- 1
parser/common/op_def/constant_op.h View File

@@ -26,7 +26,6 @@ class ConstantOperator : public ParserOperator {
ConstantOperator(); ConstantOperator();
~ConstantOperator() override; ~ConstantOperator() override;


ConstantOperator &Name(const std::string &name);
ConstantOperator &VectorAttr(std::string key, std::vector<int64_t> &value); ConstantOperator &VectorAttr(std::string key, std::vector<int64_t> &value);


ConstantOperator &DType(ge::DataType t); ConstantOperator &DType(ge::DataType t);


+ 0
- 6
parser/common/op_def/frameworkop_op.cc View File

@@ -24,12 +24,6 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY FrameworkOpOperator::FrameworkO


FrameworkOpOperator::~FrameworkOpOperator() {} FrameworkOpOperator::~FrameworkOpOperator() {}


FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY FrameworkOpOperator &FrameworkOpOperator::Name(
const std::string &name) {
ParserOperator::Name(name);
return *this;
}

FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY FrameworkOpOperator &FrameworkOpOperator::Index(int64_t index) { FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY FrameworkOpOperator &FrameworkOpOperator::Index(int64_t index) {
Attr(RETVAL_ATTR_NAME_INDEX, static_cast<int64_t>(index)); Attr(RETVAL_ATTR_NAME_INDEX, static_cast<int64_t>(index));
return *this; return *this;


+ 0
- 2
parser/common/op_def/frameworkop_op.h View File

@@ -26,8 +26,6 @@ class FrameworkOpOperator : public ParserOperator {


~FrameworkOpOperator() override; ~FrameworkOpOperator() override;


FrameworkOpOperator &Name(const std::string &name);

FrameworkOpOperator &OriginalType(const std::string &type); FrameworkOpOperator &OriginalType(const std::string &type);


FrameworkOpOperator &NodeDefPkg(const std::string &nodedef_pkg); FrameworkOpOperator &NodeDefPkg(const std::string &nodedef_pkg);


+ 0
- 5
parser/common/op_def/no_op_op.cc View File

@@ -22,9 +22,4 @@ namespace ge {
FMK_FUNC_HOST_VISIBILITY NoOpOperator::NoOpOperator() : ParserOperator("NoOp") {} FMK_FUNC_HOST_VISIBILITY NoOpOperator::NoOpOperator() : ParserOperator("NoOp") {}


FMK_FUNC_HOST_VISIBILITY NoOpOperator::~NoOpOperator() {} FMK_FUNC_HOST_VISIBILITY NoOpOperator::~NoOpOperator() {}

FMK_FUNC_HOST_VISIBILITY NoOpOperator &NoOpOperator::Name(const std::string &name) {
ParserOperator::Name(name);
return *this;
}
} // namespace ge } // namespace ge

+ 0
- 2
parser/common/op_def/no_op_op.h View File

@@ -25,8 +25,6 @@ class NoOpOperator : public ParserOperator {
public: public:
NoOpOperator(); NoOpOperator();
~NoOpOperator() override; ~NoOpOperator() override;

NoOpOperator &Name(const std::string &name);
}; };
} // namespace ge } // namespace ge




+ 1
- 1
parser/common/op_def/operator.h View File

@@ -45,7 +45,7 @@ class FMK_FUNC_HOST_VISIBILITY ParserOperator {
ParserOperator &AttrVector(std::string key, std::vector<int32_t> &value); ParserOperator &AttrVector(std::string key, std::vector<int32_t> &value);
ParserOperator &AttrVector(std::string key, std::vector<int64_t> &value); ParserOperator &AttrVector(std::string key, std::vector<int64_t> &value);


ParserOperator &Name(const std::string &name);
virtual ParserOperator &Name(const std::string &name);


ParserOperator &Type(const std::string &type); ParserOperator &Type(const std::string &type);




+ 0
- 5
parser/common/op_def/ref_switch_op.cc View File

@@ -22,11 +22,6 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY RefSwitchOperator::RefSwitchOpe


FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY RefSwitchOperator::~RefSwitchOperator() {} FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY RefSwitchOperator::~RefSwitchOperator() {}


FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY RefSwitchOperator &RefSwitchOperator::Name(const std::string &name) {
ParserOperator::Name(name);
return *this;
}

FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY RefSwitchOperator &RefSwitchOperator::T(ge::DataType t) { FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY RefSwitchOperator &RefSwitchOperator::T(ge::DataType t) {
Attr("T", (int64_t)t); Attr("T", (int64_t)t);
return *this; return *this;


+ 0
- 2
parser/common/op_def/ref_switch_op.h View File

@@ -25,8 +25,6 @@ class RefSwitchOperator : public ParserOperator {
public: public:
RefSwitchOperator(); RefSwitchOperator();
~RefSwitchOperator() override; ~RefSwitchOperator() override;

RefSwitchOperator &Name(const std::string &name);
RefSwitchOperator &T(ge::DataType t); RefSwitchOperator &T(ge::DataType t);
}; };
} // namespace ge } // namespace ge


+ 0
- 5
parser/common/op_def/shape_n_op.cc View File

@@ -24,11 +24,6 @@ FMK_FUNC_HOST_VISIBILITY ShapeNOperator::ShapeNOperator() : ParserOperator("Shap


FMK_FUNC_HOST_VISIBILITY ShapeNOperator::~ShapeNOperator() {} FMK_FUNC_HOST_VISIBILITY ShapeNOperator::~ShapeNOperator() {}


FMK_FUNC_HOST_VISIBILITY ShapeNOperator &ShapeNOperator::Name(const std::string &name) {
ParserOperator::Name(name);
return *this;
}

FMK_FUNC_HOST_VISIBILITY ShapeNOperator &ShapeNOperator::N(int64_t n) { FMK_FUNC_HOST_VISIBILITY ShapeNOperator &ShapeNOperator::N(int64_t n) {
Attr(SHAPEN_ATTR_N, n); Attr(SHAPEN_ATTR_N, n);
return *this; return *this;


+ 0
- 2
parser/common/op_def/shape_n_op.h View File

@@ -26,8 +26,6 @@ class ShapeNOperator : public ParserOperator {
ShapeNOperator(); ShapeNOperator();
~ShapeNOperator() override; ~ShapeNOperator() override;


ShapeNOperator &Name(const std::string &name);

ShapeNOperator &N(int64_t n); ShapeNOperator &N(int64_t n);
int64_t GetN() const; int64_t GetN() const;
ShapeNOperator &InType(ge::DataType t); ShapeNOperator &InType(ge::DataType t);


+ 0
- 5
parser/common/op_def/var_is_initialized_op_op.cc View File

@@ -24,11 +24,6 @@ VarIsInitializedOpOperator::VarIsInitializedOpOperator() : ParserOperator(ge::pa


VarIsInitializedOpOperator::~VarIsInitializedOpOperator() {} VarIsInitializedOpOperator::~VarIsInitializedOpOperator() {}


VarIsInitializedOpOperator &VarIsInitializedOpOperator::Name(const std::string &name) {
ParserOperator::Name(name);
return *this;
}

VarIsInitializedOpOperator &VarIsInitializedOpOperator::VectorAttr(const std::string &key, VarIsInitializedOpOperator &VarIsInitializedOpOperator::VectorAttr(const std::string &key,
std::vector<int64_t> &value) { std::vector<int64_t> &value) {
Attr(key, value); Attr(key, value);


+ 0
- 1
parser/common/op_def/var_is_initialized_op_op.h View File

@@ -26,7 +26,6 @@ class VarIsInitializedOpOperator : public ParserOperator {
VarIsInitializedOpOperator(); VarIsInitializedOpOperator();
~VarIsInitializedOpOperator() override; ~VarIsInitializedOpOperator() override;


VarIsInitializedOpOperator &Name(const std::string &name);
VarIsInitializedOpOperator &VectorAttr(const std::string &key, std::vector<int64_t> &value); VarIsInitializedOpOperator &VectorAttr(const std::string &key, std::vector<int64_t> &value);
}; };
} // namespace ge } // namespace ge


+ 0
- 5
parser/common/op_def/variable_op.cc View File

@@ -23,11 +23,6 @@ VariableOperator::VariableOperator() : ParserOperator(ge::parser::VARIABLE) {}


VariableOperator::~VariableOperator() {} VariableOperator::~VariableOperator() {}


VariableOperator &VariableOperator::Name(const std::string &name) {
ParserOperator::Name(name);
return *this;
}

VariableOperator &VariableOperator::Container(const std::string &container) { VariableOperator &VariableOperator::Container(const std::string &container) {
Attr(VAR_ATTR_CONTAINER, container); Attr(VAR_ATTR_CONTAINER, container);
return *this; return *this;


+ 0
- 2
parser/common/op_def/variable_op.h View File

@@ -27,8 +27,6 @@ class VariableOperator : public ParserOperator {
VariableOperator(); VariableOperator();
~VariableOperator() override; ~VariableOperator() override;


VariableOperator &Name(const std::string &name);

VariableOperator &Container(const std::string &container); VariableOperator &Container(const std::string &container);


VariableOperator &SharedName(const std::string &sharedname); VariableOperator &SharedName(const std::string &sharedname);


+ 1
- 0
parser/onnx/subgraph_adapter/subgraph_adapter_factory.h View File

@@ -32,6 +32,7 @@
#endif #endif


#include <map> #include <map>
#include <memory>
#include <functional> #include <functional>
#include "subgraph_adapter.h" #include "subgraph_adapter.h"




Loading…
Cancel
Save