SaveGraphsToPb

Description

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

Status SaveGraphsToPb(const char_t *file_path) const;

Restrictions

Weights cannot be shared inside a graph.

Parameters

Parameter

Input/Output

Description

file_path

Input

Path for storing graphs and weights. Must be a valid path.

Returns

Parameter

Type

Description

-

Status

SUCCESS: success.

FAILED: failure.