Function QnnDevice_free

Function Documentation

Qnn_ErrorHandle_t QnnDevice_free(Qnn_DeviceHandle_t device)

Free the created device and perform any deallocation of the resources allocated during device create.

Parameters

device[in] A device handle.

Returns

Error code:

  • QNN_SUCCESS: no error is encountered

  • QNN_DEVICE_ERROR_INVALID_HANDLE: device is not a valid handle

  • QNN_DEVICE_ERROR_MEM_ALLOC: an error is encountered with de-allocation of associated memory, failure to invalidate handles or other allocated resources

  • QNN_DEVICE_ERROR_ASSOCIATED_TO_CONTEXT: One or more contexts associated with the device handle is not freed

  • QNN_DEVICE_ERROR_UNSUPPORTED_FEATURE: API is not supported

Note

Use corresponding API through QnnInterface_t.