aclmdlLoadFromMemWithQ
Applicability
|
Product |
Supported |
|---|---|
|
Atlas 350 Accelerator Card |
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
|
|
√ |
Function Usage
Loads OM model file data from memory. The inputs and outputs of the model are stored in queues. This API can be used to load only models with static-shape inputs.
For details about how to obtain the OM model file, see Command-Line Options > Basic Options > General Options > --mode in ATC.
Prototype
1
|
aclError aclmdlLoadFromMemWithQ(const void *model, size_t modelSize, uint32_t *modelId, const uint32_t *inputQ, size_t inputQNum, const uint32_t *outputQ, size_t outputQNum) |
Parameters
|
Parameter |
Input/Output |
Description |
|---|---|---|
|
model |
Input |
Pointer to the address of the memory that stores the model. |
|
modelSize |
Input |
Size of the model data in the memory, in bytes. |
|
modelId |
Output |
Pointer to the model ID. Returns the model ID after the model is successfully loaded. The model ID is used for model identification in subsequent operations. |
|
inputQ |
Input |
Pointer to the queue ID. Each model input corresponds to a queue ID. |
|
inputQNum |
Input |
Number of input queues. |
|
outputQ |
Input |
Pointer to the queue ID. Each model output corresponds to a queue ID. |
|
outputQNum |
Input |
Number of output queues. |
Returns
0 on success; else, failure. For details, see aclError.
Reference
The aclmdlSetConfigOpt and aclmdlLoadWithConfig APIs are provided for model loading. The caller needs to set the attributes in the configuration object passed to the API call to decide how the model will be loaded and who will manage the memory.