aclmdlBundleInitFromMem
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Initializes a model from the memory if variables need to be dynamically updated during model execution.
Prototype
1
|
aclError aclmdlBundleInitFromMem(const void* model, size_t modelSize, void *varWeightPtr, size_t varWeightSize, uint32_t *bundleId) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
model |
Input |
Pointer to the memory address for storing model data. The memory is managed by the user and cannot be freed during aclmdlBundleLoadModel loading. The model file is built using the graph build API. Call aclgrphBundleBuildModel to compile the model, call aclgrphBundleSaveModel to save the model, and then load the saved .om model file into the memory. For details about the graph APIs, see aclgrphBundleBuildModel in Graph Development. In In In Ctrl CPU open form, allocate memory on the device. |
|
modelSize |
Input |
Size of the model data in the memory, in bytes. |
|
varWeightPtr |
Input |
Pointer to the address of the refreshable weight memory required by the model. The memory is managed by the user and cannot be freed during model execution. If a null pointer is passed, the memory is managed by the system. |
|
varWeightSize |
Input |
Size of the refreshable weight memory required by the model, in bytes. Invalid when varWeightPtr is a null pointer. |
|
bundleId |
Output |
Bundle ID returned after the bundle model is successfully initialized. The bundle ID is used for model identification in subsequent operations. |
Returns
0 on success; else, failure. For details, see aclError.