aclmdlBundleLoadFromMem
Description
Loads offline model data from memory, if variables need to be dynamically updated during model execution. The model workspace is managed by the system.
This API needs to work with other APIs to dynamically update variables. For details, see the description of aclmdlBundleLoadFromFile.
Prototype
aclError aclmdlBundleLoadFromMem(const void *model, size_t modelSize, uint32_t *bundleId)
Command-Line Options
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
model |
Input |
Pointer to the memory address for storing model data. The model file is built based on Ascend Graph. Call the aclgrphBundleBuildModel API to build the model, call the aclgrphBundleSaveModel API to save the model, and then read the saved .om model file into the memory, for details about the Ascend Graph APIs, see the aclgrphBundleBuildModel . Allocate memory on the host or device based on where the app runs. For details about the memory allocation APIs, see Memory Management. |
|
modelSize |
Input |
Size of the model in the memory, in bytes. |
|
bundleId |
Output |
Returns the bundle ID after the model is successfully loaded. The bundle ID is used for model identification in subsequent operations. |
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.