Browse Source

add onnx parse api

pull/570/head
baker 4 years ago
parent
commit
8a4dbc9424
3 changed files with 13 additions and 1 deletions
  1. +1
    -0
      inc/framework/common/ge_types.h
  2. +11
    -0
      inc/framework/omg/parser/model_parser.h
  3. +1
    -1
      inc/framework/omg/parser/parser_inner_ctx.h

+ 1
- 0
inc/framework/common/ge_types.h View File

@@ -37,6 +37,7 @@ enum FrameworkType {
MINDSPORE = 1,
TENSORFLOW = 3,
ANDROID_NN,
ONNX,
FRAMEWORK_RESERVED,
};



+ 11
- 0
inc/framework/omg/parser/model_parser.h View File

@@ -65,6 +65,17 @@ class ModelParser {
virtual Status ParseFromMemory(const char *data, uint32_t size, ge::ComputeGraphPtr &graph) = 0;

/**
* @ingroup domi_omg
* @brief Parse relevant data from memory and save it to graph
* @param [in] input Model file memory data
* @param [in|out] graph A graph for saving the model information after analysis
* @return SUCCESS
* @return FAILED
* @author
*/
virtual Status ParseFromMemory(const char *data, uint32_t size, ge::Graph &graph) = 0;

/**
* @ingroup domi_omg
* @brief Analyze network model data
* @param [in] proto network model


+ 1
- 1
inc/framework/omg/parser/parser_inner_ctx.h View File

@@ -59,7 +59,7 @@ struct ParserContext {
bool train_flag = false;
domi::domiTensorFormat_t format = domi::DOMI_TENSOR_ND;
domi::FrameworkType type = domi::FRAMEWORK_RESERVED;
RunMode run_mode = ONLY_PRE_CHECK;
RunMode run_mode = GEN_OM_MODEL;
// save caffe custom proto path, used by caffe parse
std::string custom_proto_path;
// save caffe proto path, used by caffe parse


Loading…
Cancel
Save