Function QnnContext_free

Function Documentation

Qnn_ErrorHandle_t QnnContext_free(Qnn_ContextHandle_t context, Qnn_ProfileHandle_t profile)

A function to free the context and all associated graphs, operations & tensors.

Parameters
  • context[in] A context handle.

  • profile[in] The profile handle on which metrics are populated and can be queried. Use NULL handle to disable profile collection. A handle being re-used would reset and is populated with values from the current call.

Returns

Error code:

  • QNN_SUCCESS: no error is encountered

  • QNN_CONTEXT_ERROR_INVALID_ARGUMENT: profile is not a valid handle

  • QNN_CONTEXT_ERROR_INVALID_HANDLE: context is not a valid handle

  • QNN_CONTEXT_ERROR_MEM_ALLOC: an error is encountered with de-allocation of associated memory

  • QNN_CONTEXT_ERROR_SET_PROFILE: failed to set profiling info

  • QNN_COMMON_ERROR_SYSTEM_COMMUNICATION: SSR occurence (successful recovery)

  • QNN_COMMON_ERROR_SYSTEM_COMMUNICATION_FATAL: SSR occurence (unsuccessful recovery)

Note

Use corresponding API through QnnInterface_t.