Function QnnSystemContext_getMetadata

Function Documentation

Qnn_ErrorHandle_t QnnSystemContext_getMetadata(QnnSystemContext_Handle_t sysCtxHandle, const void *binaryBuffer, Qnn_ContextBinarySize_t binaryBufferSize, const QnnSystemContext_BinaryInfo_t **binaryInfo)

A function to get meta data from the serialized binary buffer.

Parameters
  • sysCtxHandle[in] Handle to the systemContext object

  • binaryBuffer[in] Serialized buffer representing a const context binary.

  • binaryBufferSize[in] Size of context binary in bytes

  • binaryInfo[out] Pointer to memory that will be populated with user-visible information about the context binary. Memory for this information is internally allocated and managed by QNN, and is associated with the handle sysCtxHandle created with QnnSystemContext_create(). This memory has to be released by calling QnnSystemContext_free() when it is no longer needed.

Returns

Error code

  • QNN_SUCCESS: Successfully returned context binary info to caller

  • QNN_SYSTEM_CONTEXT_ERROR_INVALID_HANDLE: Invalid System Context handle

  • QNN_SYSTEM_CONTEXT_ERROR_INVALID_ARGUMENT: One or more arguments to the API is/are NULL/invalid.

  • QNN_SYSTEM_CONTEXT_ERROR_OPERATION_FAILED: Failed to obtain context binary info

  • QNN_SYSTEM_CONTEXT_ERROR_MALFORMED_BINARY: The binary is either malformed or cannot be parsed successfully.

  • QNN_SYSTEM_CONTEXT_ERROR_UNSUPPORTED_FEATURE: not supported