Typedef Qnn_FreeTensorRawDataFn_t

Typedef Documentation

typedef Qnn_ErrorHandle_t (*Qnn_FreeTensorRawDataFn_t)(Qnn_ContextHandle_t context, Qnn_GraphHandle_t graph, uint64_t id)

A client-defined function used to free tensor data previously obtained by Qnn_GetTensorDataFn_t. After the call to Qnn_FreeTensorDataFn_t the data provided in the client buffer clientBuf should be considered invalid. If Qnn_GetTensorRawDataRn_t has been called multiple times for the same tensor then Qnn_FreeTensorRawDataFn_t must be called an equivalent number of times to free all allocated data for this tensor. It is not required that this function be thread safe, unless needed to support releasing of tensor resources that may be shared between threads.

Param id

[in] The tensor ID.

Param context

[in] the context to which the tensor is associated

Param graph

[in] the graph to which the context is associated. For context tensors this field should be null.

Return

Error code:

  • QNN_SUCCESS: Client Buffer data successfully freed.

  • QNN_TENSOR_ERROR_DOES_NOT_EXIST: Tensor with id does not exist, was not created as QNN_TENSORMEMTYPE_RETRIEVE_RAW, or has already been free’d.