Loads a model based on the given configuration.
aclError aclmdlLoadWithConfig(const aclmdlConfigHandle *handle, uint32_t *modelId)
Parameter |
Input/Output |
Description |
|---|---|---|
handle |
Input |
Pointer to the configuration object for loading a model. Call aclmdlCreateConfigHandle to create an object in advance, which must be consistent with handle output by the aclmdlSetConfigOpt call. |
modelId |
Output |
Pointer to the model ID. The model ID will be returned after a model is loaded to the system. |
0 on success; else, failure.
For model loading by using aclmdlSetConfigOpt and aclmdlLoadWithConfig, 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.
By choosing from the following AscendCL APIs, you can directly determine whether to load a model from a file or from memory and whether the memory is managed by the system or the user.