aclmdlLoadFromFileWithQ
Description
Loads offline model data (offline model adapted to the Ascend AI Processor) from a file. The inputs and outputs of the model are stored in queues.
Restrictions
- This API can be used to load only models with static-shape inputs.
- The operations of loading, executing, and unloading a model must be performed in the same context. For details about how to create a context, see aclrtSetDevice or aclrtCreateContext.
Prototype
aclError aclmdlLoadFromFileWithQ(const char *modelPath, uint32_t *modelId, const uint32_t *inputQ, size_t inputQNum, const uint32_t *outputQ, size_t outputQNum)
Parameters
Returns
The value 0 indicates success, and other values indicate failure. For details, see aclError.
Related APIs
AscendCL also provides the aclmdlSetConfigOpt and aclmdlLoadWithConfig APIs 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.
Parent topic: Model Loading and Unloading