Function QnnGraph_retrieve

Function Documentation

Qnn_ErrorHandle_t QnnGraph_retrieve(Qnn_ContextHandle_t contextHandle, const char *graphName, Qnn_GraphHandle_t *graphHandle)

A function to retrieve a graph based on name. This function is typically used when a context was created from cached binary. The re-created context has graph(s) which are also re-created. The function returns the graph handle to be used for all graph APIs (addNode, finalize, execute, …).

Parameters
  • contextHandle[in] An opaque ID to the context.

  • graphName[in] A string which identifies the graph.

  • graphHandle[out] A pointer to the graph handle that is being retrieved.

Returns

Error code:

  • QNN_SUCCESS: the graph was successfully retrieved

  • QNN_GRAPH_ERROR_INVALID_NAME: graphName or graph is NULL

  • QNN_GRAPH_ERROR_INVALID_HANDLE: context is not a valid handle

  • QNN_GRAPH_ERROR_GRAPH_DOES_NOT_EXIST: graph not found/created

  • QNN_GRAPH_ERROR_SUBGRAPH: operation not permitted on a subgraph

Note

Use corresponding API through QnnInterface_t.