Function QnnContext_releaseIncrementalBinary

Function Documentation

Qnn_ErrorHandle_t QnnContext_releaseIncrementalBinary(Qnn_ContextHandle_t context, const void *binaryBuffer, Qnn_ContextBinarySize_t startOffset)

A function to release a incrementally allocated portion of the context binary retrieved from a previous call to QnnContext_getIncrementalBinary.

Parameters
  • context[in] A context handle.

  • binaryBuffer[out] Pointer to backend provided/owned buffer

  • startOffset[out] Starting offset for binary data.

  • writtenBufferSize[out] Amount of memory actually written into binaryBuffer, in bytes.

Returns

Error code:

  • QNN_SUCCESS: no error is encountered

  • QNN_CONTEXT_ERROR_UNSUPPORTED_FEATURE: a feature is not supported

  • QNN_CONTEXT_ERROR_INVALID_HANDLE: context is not a valid handle

  • QNN_CONTEXT_ERROR_INVALID_ARGUMENT: one of the arguments to the API is invalid/NULL

  • QNN_CONTEXT_ERROR_NOT_FINALIZED: if there were any non-finalized entities in the context

  • QNN_COMMON_ERROR_OPERATION_NOT_PERMITTED: Attempting to get binary for a context re-created from a cached binary.

  • QNN_CONTEXT_ERROR_INCREMENT_INVALID_BUFFER: The buffer binaryBuffer starting at startOffset was not allocated by the backend.

  • QNN_CONTEXT_ERROR_MEM_ALLOC: Not enough memory is available to retrieve the context content.

Note

Use corresponding API through QnnInterface_t.