Function QnnTensor_updateContextTensors¶
Defined in File QnnTensor.h
Function Documentation¶
-
Qnn_ErrorHandle_t QnnTensor_updateContextTensors(Qnn_ContextHandle_t context, const Qnn_Tensor_t **tensor, uint64_t numTensors)¶
Update a context tensor with the new provided tensor information. Tensors provided here are associated with the tensor in the backend through the ID field. Valid fields to update are: data and quantization parameters for UPDATEABLE_STATIC tensors, quantization parameters for UPDATEABLE_NATIVE, UPDATEABLE_APP_READ, UPDATEABLE_APP_WRITE, and UPDATEABLE_APP_READWRITE tensors. Multiple calls to QnnTensor_updateContextTensors() can be made, but the updates will not take effect until QnnGraph_finalize() is called for one or more of the graphs to which the context tensors are associated. Backends may support a subset of updateable tensor types.
- Returns
Error code:
QNN_SUCCESS: Successfully updated the context tensor
QNN_TENSOR_ERROR_INVALID_HANDLE: Provided context handle is invalid
QNN_TENSOR_ERROR_INVALID_TENSOR_PARAM: One or more tensor parameters is invalid
QNN_TENSOR_ERROR_UNSUPPORTED_TENSOR_PARAM: One or more tensor parameters are unsupported
QNN_COMMON_ERROR_MEM_ALLOC: Failure in creating tensor due to issues with memory allocation
QNN_TENSOR_ERROR_INCOMPATIBLE_TENSOR_UPDATE: provided tensor is invalid and cannot be applied as an update.
QNN_TENSOR_ERROR_UNSUPPORTED_FEATURE: some API feature is not supported yet