aclmdlBundleLoadFromMem
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
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 must be used with other APIs to dynamically update variables. For details, see aclmdlBundleLoadFromFile.
Prototype
aclError aclmdlBundleLoadFromMem(const void *model, size_t modelSize, uint32_t *bundleId)
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
model |
Input |
Pointer to the memory address for storing model data. The model file is built using the graph build API. Call aclgrphBundleBuildModel to build the model, call aclgrphBundleSaveModel to save the model, and then read the saved the .om model file to the memory. 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
0 on success; else, failure. For details, see aclError.