SaveGraphsToPb

Applicable Products

  • Ascend 950PR/Ascend 950DT: not supported
  • Atlas A3 training products/Atlas A3 inference products: not supported
  • Atlas A2 training products/Atlas A2 inference products: supported
  • Atlas 200I/500 A2 inference products: not supported
  • Atlas inference products: supported
  • Atlas training products: supported

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.