Function: unload

C Prototype

aclError aclmdlUnload(uint32_t modelId)

Python Function

ret = acl.mdl.unload(model_id)

Function Usage

Uninstalls the model and releases resources after the model inference is complete.

Input Description

model_id: int, ID of the model to be uninstalled.

Return Value

ret: int, error code.

Restrictions

  • When calling acl.mdl.unload to unload a specified model, ensure that the model is not used by other APIs.
  • 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 acl.rt.set_device and acl.rt.create_context.

Reference

For details about the API call sequence, see pyACL API Call Sequence.