aclgrphBundleBuildModel
Applicability
|
Product |
Supported or Not |
|---|---|
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Header File/Library File
- Header file: #include <ge/ge_ir_build.h>
- Library file: libge_compiler.so
Function Usage
Builds a group of input graphs into an offline model adapted to the Ascend AI Processor.
The difference between this API and aclgrphBuildModel is that this API applies to the weight update scenario. After the offline model cache is generated using the aclgrphBundleBuildModel API, aclgrphBundleSaveModel needs to be called to flush the cache to disks.
Prototype
1
|
graphStatus aclgrphBundleBuildModel(const std::vector<ge::GraphWithOptions> &graph_with_options, ModelBufferData &model) |
Parameters
|
Parameter |
Input/Output |
Description |
||||
|---|---|---|---|---|---|---|
|
graph_with_options |
Input |
A group of graphs to be compiled and compilation parameters. The input parameter is a structure, including:
A group of graphs include the weight initialization graph, weight update graph, and inference graph. Only the inference graph supports the following options argument. Pass the options argument to set the build configuration for offline model generation. For details about the supported parameters, see aclgrphBuildModel Configuration Parameters. The following is a configuration example.
|
||||
|
model |
Output |
Buffer of the generated offline model. For details, see ModelBufferData.
data points to the generated model data, and length indicates the actual model size. |
Returns
Restrictions
If multiple graphs in this API share the variable operator with the same name, the variable operator is accelerated and fused in the API. You are advised to use the aclgrphConvertToWeightRefreshableGraphs API for generation. Otherwise, the formats of the variable operators may be inconsistent.
Example
For details about the call example, see Example.