SaveGraphsToPb

Applicability

Product

Supported

Atlas 350 Accelerator Card

x

Atlas A3 training product/Atlas A3 inference product

x

Atlas A2 training product/Atlas A2 inference product

Atlas 200I/500 A2 inference product

x

Atlas inference product

Atlas training product

Header File/Library File

  • Header file: #include <ge/ge_api.h>
  • Library file: libge_runner.so

Function Usage

This API is deprecated. Avoid using it.

Saves graphs in a session as a .pb file. Weight sharing in a session is supported. That is, if two graphs in a session have the same weight, only one weight is saved.

Difference between this API and ShardGraphsToFile:

This API applies to any graph, while ShardGraphsToFile applies to the distributed compilation and partitioning of foundation models.

Prototype

1
Status SaveGraphsToPb(const char_t *file_path) const

Parameters

Parameter

Input/Output

Description

file_path

Input

Directory for storing the graph and weight. It must be a valid path.

Returns

Parameter

Type

Description

-

Status

SUCCESS: success.

FAILED: failure.

Restrictions

Weights cannot be shared inside a graph.