DumpToFile

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product / Atlas A3 inference product

Atlas A2 training product / Atlas A2 inference product

Atlas 200I/500 A2 inference product

Atlas inference product

Atlas training product

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.

Restrictions

None