DumpToFile

Applicability

Product

Supported or Not

Atlas A3 training products / Atlas A3 inference products

Atlas A2 training products / Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Header File/Library File

  • Header file: #include <graph/graph.h>
  • Library file: libgraph.so

Function Usage

Serializes a graph to a file in the execution path.

Data such as weights is not included. Only the graph structure and related attributes are included.

Prototype

1
graphStatus DumpToFile(DumpFormat format, const AscendString &suffix) const

Parameters

Parameter

Input/Output

Description

format

Input

Dump file format, such as onnx and txt. For details about the DumpFormat enumerations, see DumpFormat.

suffix

Input

File name prefix. For example, GraphPreRunBegin in ge_proto_xxxx_GraphPreRunBegin.txt is the prefix.

Returns

Parameter

Type

Description

-

graphStatus

GRAPH_SUCCESS(0): success.

Other values: failure. For details, see ge::graphStatus.

Constraints

None