aclgrphParseONNXFromMem

Description

Parses an ONNX model loaded to the memory into a graph.

Prototype

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

Restrictions

None

Parameters

Parameter

Input/Output

Description

buffer

Input

Pointer to buffer of the ONNX model in binary mode. The pointer has not been deserialized.

size

Input

Size of the memory buffer.

parser_params

Input

A key-value mapping table of type AscendString, for describing the parsing parameters of original model.

For details, see Configuration Parameters of Model Parsing APIs.

graph

Output

Parsed graph.

Returns

Parameter

Type

Description

-

graphStatus

0 on success;

else, failure.