Function QnnSystemTensor_getMemoryFootprint

Function Documentation

Qnn_ErrorHandle_t QnnSystemTensor_getMemoryFootprint(Qnn_Tensor_t tensor, uint64_t *footprint)

A function to compute the maximum amount of memory in bytes required to contain tensor data. Currently supported data formats are:

  • QNN_DATA_FORMAT_DENSE

Parameters
  • tensor[in] A Qnn_Tensor_t data structure.

  • footprint[out] The maximum amount of memory required to fully contain tensor data.

Returns

Error code

  • QNN_SUCCESS: Successfully compute the tensor memory extent

  • QNN_SYSTEM_TENSOR_ERROR_INVALID_ARGUMENT: extent is NULL

  • QNN_SYSTEM_TENSOR_ERROR_INVALID_TENSOR: tensor is ill-configured

  • QNN_SYSTEM_TENSOR_ERROR_UNSUPPORTED_FEATURE: this API is not supported yet