Browse Source

fix bug

pull/197/head
baker 4 years ago
parent
commit
b3c3584c96
3 changed files with 12 additions and 6 deletions
  1. +4
    -2
      inc/external/parser/onnx_parser.h
  2. +1
    -1
      metadef
  3. +7
    -3
      parser/onnx/onnx_parser.cc

+ 4
- 2
inc/external/parser/onnx_parser.h View File

@@ -27,11 +27,13 @@

namespace ge {
graphStatus aclgrphParseONNX(const char *model_file,
std::map<ge::AscendString, ge::AscendString> &parser_params,
const std::map<ge::AscendString,
ge::AscendString> &parser_params,
ge::Graph &graph);

graphStatus aclgrphParseONNXFromMem(const char *buffer, size_t buffer_size,
std::map<ge::AscendString, ge::AscendString> &parser_params,
const std::map<ge::AscendString,
ge::AscendString> &parser_params,
ge::Graph &graph);
} // namespace ge



+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit bb65bddc85d786d59553cdd56e3cf70ce8c9ead4
Subproject commit f08320a6d699f5b537bf66da572bf225b9cd330e

+ 7
- 3
parser/onnx/onnx_parser.cc View File

@@ -40,7 +40,9 @@

namespace ge {
graphStatus aclgrphParseONNX(const char *model_file,
std::map<AscendString, AscendString> &parser_params, ge::Graph &graph) {
const std::map<AscendString,
AscendString> &parser_params,
ge::Graph &graph) {
GE_CHECK_NOTNULL(model_file);
GetParserContext().type = domi::ONNX;
std::map<string, string> options;
@@ -86,7 +88,9 @@ graphStatus aclgrphParseONNX(const char *model_file,
}

graphStatus aclgrphParseONNXFromMem(const char *buffer, size_t buffer_size,
std::map<AscendString, AscendString> &parser_params, ge::Graph &graph) {
const std::map<AscendString,
AscendString> &parser_params,
ge::Graph &graph) {
GE_CHECK_NOTNULL(buffer);
GetParserContext().type = domi::ONNX;
std::map<string, string> options;
@@ -672,4 +676,4 @@ ge::DataType OnnxModelParser::ConvertToGeDataType(const uint32_t type) {
namespace domi {
REGISTER_MODEL_PARSER_CREATOR(ONNX, ge::OnnxModelParser);
REGISTER_WEIGHTS_PARSER_CREATOR(ONNX, ge::OnnxWeightsParser);
}
}

Loading…
Cancel
Save