# QairtGraph

Graph execution API.

**Include:** `#include "QairtGraph/QairtGraph.h"`

- struct QairtGraph\_V1\_t

    - *#include &lt;QairtGraph.h&gt;*

Public Members

- uint64\_t size

    - 

- [Qairt\_GetInterfaceFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv422Qairt_GetInterfaceFn_t) getInterface

    - 

- [QairtGraph\_FreeFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_FreeFn_t) free

    - 

- [QairtGraph\_CreateSubgraphFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv429QairtGraph_CreateSubgraphFn_t) createSubgraph

    - 

- [QairtGraph\_SetConfigFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv424QairtGraph_SetConfigFn_t) setConfig

    - 

- [QairtGraph\_AddNodeFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv422QairtGraph_AddNodeFn_t) addNode

    - 

- [QairtGraph\_FinalizeFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv423QairtGraph_FinalizeFn_t) finalize

    - 

- [QairtGraph\_CreateGraphTensorFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv432QairtGraph_CreateGraphTensorFn_t) createGraphTensor

    - 

- [QairtGraph\_UpdateGraphTensorsFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv433QairtGraph_UpdateGraphTensorsFn_t) updateGraphTensors

    - 

- [QairtGraph\_ExecuteFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv422QairtGraph_ExecuteFn_t) execute

    - 

- [QairtGraph\_ExecuteAsyncFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv427QairtGraph_ExecuteAsyncFn_t) executeAsync

    -

Functions

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_free([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle)

    - Frees a graph handle.

- Parameters

    - **graphHandle** – **[in]** A handle to a created graph.

- Returns

    - Error code:

- QAIRT\_SUCCESS: No error encountered.
- QAIRT\_GRAPH\_ERROR\_MEM\_ALLOC: error related to memory deallocation
- QAIRT\_GRAPH\_ERROR\_TERMINATE\_FAILED: indicates failure to free resources or failure to invalidate handles and pointers allocated by the library
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *graph* is not a valid handle
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION: SSR occurence (successful recovery)
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION\_FATAL: SSR occurence (unsuccessful recovery)

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_createSubgraph([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, const char \*graphName, [QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) \*subgraphHandle)

    - A function to create an empty graph which will be a subgraph of another graph.

The function returns a handle to the created subgraph. A subgraph can not be explicitly finalized or executed. Only a graph with no parent graphs can be finalized and executed.

- Parameters

    - - **graphHandle** – **[in]** Handle to the graph in which the subgraph is created.
- **graphName** – **[in]** A string which identifies the graph. Graph name allows retrieval of the graph after creating the context from cached binary. *graphName* must be unique within the *context*.
- **subgraphHandle** – **[out]** The created subgraph handle.

- Returns

    - Error code:

- QAIRT\_SUCCESS: the graph was successfully created
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: *subgraphHandle* is NULL
- QAIRT\_GRAPH\_ERROR\_INVALID\_NAME: *graphName* is NULL or not unique within the *context*
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *graphHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_MEM\_ALLOC: create failed due to memory/resource allocation
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: This API is not yet supported
- QAIRT\_GRAPH\_ERROR\_CREATE\_FAILED: create failed due to some other reason
- QAIRT\_COMMON\_ERROR\_OPERATION\_NOT\_PERMITTED: create failed when context is re-created from binary using [QairtContext\_createFromBinary()](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtContext.html#QairtContext_8h_1a16aa2b1ff1a7281111d90669eb3f4cc5).

Note

A subgraph can have another subgraph as a parent.

Note

Nodes and tensors can be added to a subgraph before and/or after the subgraph handle has been included as part of an op config added as a node.

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_setConfig([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, const [QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) configHandle)

    - A function to set/modify configuration options on an already created graph.

Backends are not required to support this API.

- Parameters

    - - **graphHandle** – **[in]** A graph handle.
- **configHandle** – **[in]** A created graph config handle. NULL is allowed and indicates no config options are provided. All config options have default value, in case not provided. If a backend cannot support all provided configs it will fail.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *graphHandle* or *configHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one config option is invalid
- QAIRT\_GRAPH\_ERROR\_GRAPH\_FINALIZED: at least one valid config option is not valid on a finalized graph
- QAIRT\_GRAPH\_ERROR\_SUBGRAPH: operation not permitted on a subgraph
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: at least one valid config option is not supported
- QAIRT\_GRAPH\_ERROR\_PROFILE\_IN\_USE: when a profile handle is passed as graph config, that profile handle can only be bound to one graph at a time
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION: SSR occurence (successful recovery)
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION\_FATAL: SSR occurence (unsuccessful recovery)

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_addNode([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, [QairtOpConfig\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtOpConfig.html#_CPPv422QairtOpConfig_Handle_t) opConfigHandle)

    - A function to add a node to the graph.

- Parameters

    - - **graphHandle** – **[in]** A handle to the graph to which the node will be added.
- **opConfigHandle** – **[in]** A handle to the operation configuration which should be added as a node in the graph. The tensors associated with this handle must be created with QairtTensor APIs which register them with a backend. Unrecognized tensors in the opConfig result in failure. Since the tensor ID is provided by the backend and is unique, it is sufficient to only specify a valid tensor ID in the Tensor handles associated with the opConfig. All other fields including any static data are ignored by the backend when parsing these tensors.

- Returns

    - Error code:

- QAIRT\_SUCCESS: Node was successfully added to the graph.
- QAIRT\_GRAPH\_ERROR\_INVALID\_OP\_CONFIG: The operation configuration is invalid or inconsistent with registered op packages or tensor metadata.
- QAIRT\_GRAPH\_ERROR\_INVALID\_TENSOR: One or more tensors referenced in the opConfig are invalid.
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: The graph handle is invalid.
- QAIRT\_GRAPH\_ERROR\_GRAPH\_FINALIZED: Cannot add nodes to a finalized graph.
- QAIRT\_GRAPH\_ERROR\_UNCONNECTED\_NODE: Node added before its dependencies.
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: One or more features in the opConfig are not supported.

Note

The following conditions must be honored by tensors specified as part of opConfig:

1. No tensor in the opConfig’s output tensors can be of type QAIRT\_TENSOR\_TYPE\_APP\_WRITE or QAIRT\_TENSOR\_TYPE\_STATIC.
2. All parameters in the opConfig that happen to be tensors must be of the type QAIRT\_TENSOR\_TYPE\_STATIC.
3. Tensors express connectivity between nodes, but it is permissible for tensors to remain unconsumed (i.e., not act as inputs to any other node in the graph).

Note

QairtGraph does not validate opConfig used in creating node beyond checks for basic sanity. A thorough validation of opConfig for this node defined in a certain op package has to be done via the QairtBackend\_validateOpConfig API.

Note

Nodes must be added in dependency order. i.e. all QAIRT\_TENSOR\_TYPE\_NATIVE inputs to the node must be outputs of a previously added node.

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_finalize([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t) profileHandle, [QairtSignal\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtSignal.html#_CPPv420QairtSignal_Handle_t) signalHandle)

    - Finalize the graph for execution.

If called on a composed graph, the runtime will process the graph, validate that all operations are created successfully and that connectivity is correct. If called on a graph that was retrieved from a context binary (subject to backend support, see QAIRT\_CAPABILITY\_GRAPH\_SUPPORT\_FINALIZE\_DESERIALIZED\_GRAPH), the runtime will perform additional setup required before execution.

- Parameters

    - - **graphHandle** – **[in]** Handle to the graph to be finalized.
- **profileHandle** – **[in]** Optional handle to a profiling object. If provided, performance metrics will be collected during finalization. Use NULL to disable profiling. If continuous profiling has been configured via QAIRT\_GRAPH\_CONFIG\_OPTION\_PROFILE\_HANDLE, this handle must be NULL.
- **signalHandle** – **[in]** Optional signal object used to control the execution of the finalize process. If NULL, the finalize operation proceeds uninterrupted. If provided, the signal object is considered in-use for the duration of the call.

- Returns

    - Error code:

- QAIRT\_SUCCESS: Graph finalized successfully.
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: Graph handle is invalid.
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: Invalid parameters passed, or continuous graph profiling is enabled and the per-API handle is not NULL.
- QAIRT\_GRAPH\_ERROR\_CREATE\_FAILED: Op/kernel creation failed.
- QAIRT\_GRAPH\_ERROR\_OPTIMIZATION\_FAILED: Graph optimization failed.
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: One or more features (e.g., signal or profile) are not supported by the backend.
- QAIRT\_GRAPH\_ERROR\_SET\_PROFILE: Failed to set profile handle.
- QAIRT\_GRAPH\_ERROR\_SIGNAL\_IN\_USE: Signal handle is already in use by another call.
- QAIRT\_GRAPH\_ERROR\_ABORTED: Finalization aborted due to user cancellation.
- QAIRT\_GRAPH\_ERROR\_TIMED\_OUT: Finalization aborted due to timeout.
- QAIRT\_GRAPH\_ERROR\_FINALIZE\_FAILED: Finalization failed due to an unspecified error.
- QAIRT\_GRAPH\_ERROR\_SUBGRAPH: Finalization not permitted on subgraphs.
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION: SSR occurence (successful recovery)
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION\_FATAL: SSR occurence (unsuccessful recovery)

Note

Graphs with zero nodes cannot be finalized and will result in an error.

Note

Some backends may require that this function is called before execution of a graph restored from serialized contexts. Refer to backend-specific documentation for details.

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_createGraphTensor([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t) tensorHandle)

    - A function to create a new tensor on QairtGraph\_Handle\_t.

This call may or may not allocate memory, depending on the tensor type
       and the accelerator implementation. Optionally it may be initialized with
       data provided in the tensor if present.
    Copy to clipboard

- Parameters

    - - **graphHandle** – **[in]** The graph or sub-graph in which the tensor would be created.
- **tensorHandle** – **[inout]** A pre-configured tensor handle to be used for tensor creation. The tensor ID will be assigned by the backend directly to this handle as part of this call.

- Returns

    - Error code:

- QAIRT\_SUCCESS: Successfully created a graph tensor
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: Provided graph or tensor handle is invalid
- QAIRT\_TENSOR\_ERROR\_INVALID\_TENSOR\_PARAM: One or more tensor parameters is invalid
- QAIRT\_TENSOR\_ERROR\_UNSUPPORTED\_TENSOR\_PARAM: One or more tensor parameters are unsupported
- QAIRT\_GRAPH\_ERROR\_MEM\_ALLOC: Failure in creating tensor due to issues with memory allocation
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: some API feature is not supported yet

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

Warning

Graph tensors cannot be both inputs and outputs. R/W tensors connect multiple graphs.

Warning

Graph tensors cannot be of datatype QAIRT\_DATATYPE\_STRING.

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_updateGraphTensors([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, const [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t) \*tensorHandles, uint64\_t numTensors)

    - Update tensors previously created on a graph.

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.

- Parameters

    - - **graphHandle** – **[in]** The graph on which the tensors were created.
- **tensorHandles** – **[in]** Array of tensor handles to update. Each handle must carry the ID assigned during tensor creation.
- **numTensors** – **[in]** Number of tensor handles in the *tensorHandles* array.

- Returns

    - Error code:

- QAIRT\_SUCCESS: Successfully updated graph tensors
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: Provided graph or tensor handle is invalid
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: *tensorHandles* is NULL
- QAIRT\_TENSOR\_ERROR\_INCOMPATIBLE\_TENSOR\_UPDATE: Tensor type does not support updates
- QAIRT\_GRAPH\_ERROR\_GRAPH\_NOT\_FINALIZED: graph must be finalized before updating tensors
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: some API feature is not supported yet

Note

Multiple calls can be made, but updates will not take effect until QairtGraph\_finalize() is called.

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_execute([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, const [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t) \*inputHandlesHandle, const uint32\_t numInputs, [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t) \*outputHandlesHandle, const uint32\_t numOutputs, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t) profileHandle, [QairtSignal\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtSignal.html#_CPPv420QairtSignal_Handle_t) signalHandle)

    - Synchronously execute a finalized graph with the provided input and output tensors.

- Parameters

    - - **graphHandle** – **[in]** Handle to a finalized graph. Must be created and finalized via QairtGraph\_create() and QairtGraph\_finalize().
- **inputHandlesHandle** – **[in]** Array of input tensor handles to populate graph inputs. Each tensor must carry the same ID assigned during creation and registration with the backend.
- **numInputs** – **[in]** Number of input tensor handles in the *inputHandlesHandle* array.
- **outputHandlesHandle** – **[out]** Array of output tensor handles to be populated with results from graph execution. Each tensor must carry the same ID assigned during creation.
- **numOutputs** – **[in]** Number of output tensors in the *outputHandlesHandle* array.
- **profileHandle** – **[in]** Optional handle to a profiling object. If provided, performance metrics will be collected during execution. A handle being reused would reset and is populated with values from the current call. Use NULL to disable profiling. This handle must be NULL if continuous profiling was configured via the QAIRT\_GRAPH\_CONFIG\_OPTION\_PROFILE\_HANDLE option.
- **signalHandle** – **[in]** Optional signal object used to control execution. If NULL, execution proceeds uninterrupted. If provided, the signal handle is considered in-use for the duration of the call.

- Returns

    - Error code:

- QAIRT\_SUCCESS: Graph executed successfully.
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: Graph handle is invalid.
- QAIRT\_GRAPH\_ERROR\_GRAPH\_NOT\_FINALIZED: Graph has not been finalized.
- QAIRT\_GRAPH\_ERROR\_SUBGRAPH: Execution not permitted on subgraphs.
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: Invalid inputs, outputs, or profile handle.
- QAIRT\_GRAPH\_ERROR\_INVALID\_TENSOR: One or more tensors are invalid or unrecognized.
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: Feature not supported (e.g., signal, profile, batch multiplier).
- QAIRT\_GRAPH\_ERROR\_SET\_PROFILE: Failed to set profile handle.
- QAIRT\_GRAPH\_ERROR\_SIGNAL\_IN\_USE: Signal handle is already in use.
- QAIRT\_GRAPH\_ERROR\_ABORTED: Execution aborted due to user cancellation.
- QAIRT\_GRAPH\_ERROR\_TIMED\_OUT: Execution aborted due to timeout.
- QAIRT\_GRAPH\_ERROR\_DISABLED: Graph was disabled during context deserialization.
- QAIRT\_GRAPH\_ERROR\_DYNAMIC\_TENSOR\_SHAPE: Error due to dynamic tensor shape exceeding limits.
- QAIRT\_GRAPH\_ERROR\_TENSOR\_SPARSITY: Error due to tensor sparsity constraints.
- QAIRT\_GRAPH\_ERROR\_EARLY\_TERMINATION: Execution terminated early due to op behavior.
- QAIRT\_GRAPH\_ERROR\_INVALID\_CONTEXT: Context was freed prior to execution.
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION: Recoverable system-level communication error.
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION\_FATAL: Unrecoverable system-level communication error.

Note

Input and output tensors must match the IDs and metadata used during registration. However, the following exceptions apply:

- Client-provided buffers (e.g., *clientBuf*) may change between executions.
- Batch dimension may be an integer multiple of the original dimension, provided all tensors share the same multiple.
- Output dimensions may vary post-execution for dynamic tensors.
- Dynamic input dimensions must be provided if marked as dynamic during tensor creation.
- Output tensors with dynamic dimensions will be populated by the backend.
- Data type changes may be permitted for certain ops that support conversion.
- Execution may proceed without inputs if the graph contains no application-writable tensors.
- Only application-readable/writeable tensor types are supported. Optional tensors may be excluded from *inputs* or *outputs* depending on backend support.
- Mixing tensor versions (e.g., V1 and V2) may impact performance.

Note

Execution is synchronous and blocks until completion. If other executions are enqueued, this call will wait in queue. Execution priority is equal to asynchronous calls.

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_executeAsync([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t) graphHandle, const [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t) \*inputHandlesHandle, const uint32\_t numInputs, [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t) \*outputHandlesHandle, const uint32\_t numOutputs, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t) profileHandle, [QairtSignal\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtSignal.html#_CPPv420QairtSignal_Handle_t) signalHandle, [Qairt\_NotifyFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv416Qairt_NotifyFn_t) notifyFn, void \*notifyParam)

    - Asynchronously execute a finalized graph.

Graphs will be enqueued for execution in FIFO order. There is no guarantee that graphs will finish execution in the same order they were enqueued. If the execution queue is full, this function will block until space is available.

- Parameters

    - - **graphHandle** – **[in]** Handle of finalized graph to execute.
- **inputHandlesHandle** – **[in]** Array of input tensor handles with which to populate graph inputs.
- **numInputs** – **[in]** Number of input tensor handles in the *inputHandlesHandle* array.
- **outputHandlesHandle** – **[out]** Array of tensors handles which the graph will populate with output values.
- **numOutputs** – **[in]** Number of output tensor handles in the *outputHandlesHandle* array.
- **profileHandle** – **[in]** The profile handle on which metrics is populated and can be queried. Use NULL handle to disable profile collection. A handle being reused would reset and is populated with values from the enqueued execute call. Profile handle management/reuse across asynchronous calls is client’s responsibility. Behavior is undefined if same profile handle is used by two enqueued execute instances at the same time. This handle must be NULL when a continuous profile handle has been configured via the QAIRT\_GRAPH\_CONFIG\_OPTION\_PROFILE\_HANDLE option
- **signalHandle** – **[in]** Signal object which may be used to control the execution of this call. NULL indicates execution should proceed as normal. All pending executions in the queue are affected by Signal control. Instance executing when Signal control is issued may not be affected. The signal object, if not NULL, is considered to be in-use for the duration of the call. For timeout signals, the timeout duration applies from the QairtGraph\_executeAsync call until the callback is called. The same QairtGraph\_Handle\_t can be used for multiple calls to QairtGraph\_executeAsync, however, different Qairt\_SignalHandle\_t must be supplied.
- **notifyFn** – **[in]** Pointer to notification function, called when execution is finished. NULL indicates no notification is requested. *notifyFn* will be called in context of backend owned thread, with priority equal or lower than client’s calling thread. Please note that a failed call to QairtGraph\_executeAsync does not call the notification function.
- **notifyParam** – **[in]** Client-supplied data object which will be passed back via *notifyFn* and can be used to identify asynchronous execution instance. Can be NULL.

- Returns

    - Error code:

- QAIRT\_SUCCESS: the graph was successfully executed
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *graph* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_GRAPH\_NOT\_FINALIZED: graph was not finalized
- QAIRT\_GRAPH\_ERROR\_SUBGRAPH: cannot execute a subgraph
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT:
- *inputHandlesHandle* or *outputHandlesHandle* is NULL or ill-formed OR
- *inputHandlesHandle* is NOT NULL and *numInputs* is 0 OR
- *outputHandlesHandle* is NOT NULL and *numOutputs* is 0 OR
- *profileHandle* handle is invalid OR
- continuous graph profiling is enabled and the per-API handle is not NULL.
- QAIRT\_GRAPH\_ERROR\_INVALID\_TENSOR: one or more tensors in *inputHandlesHandle* or *outputHandlesHandle* is invalid or not recognized by graph
- QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE: asynchronous graph execution is not supported on this backend or some API feature is not supported yet, e.g. signal, profile, or batch multiplier
- QAIRT\_GRAPH\_ERROR\_SIGNAL\_IN\_USE: the supplied control signal is already in-use by another call.
- QAIRT\_GRAPH\_ERROR\_ABORTED: the call is aborted before completion due to user cancellation
- QAIRT\_GRAPH\_ERROR\_TIMED\_OUT: the call is aborted before completion due to a timeout
- QAIRT\_GRAPH\_ERROR\_DISABLED: the graph was not enabled when the context was deserialized
- QAIRT\_GRAPH\_ERROR\_DYNAMIC\_TENSOR\_SHAPE: An error occurred that is related to dynamic tensor shape. For example, a tensor maximum dimension was exceeded.
- QAIRT\_GRAPH\_ERROR\_TENSOR\_SPARSITY: An error occurred that is related to tensor sparsity. For example, the maximum number of specified elements was exceeded.
- QAIRT\_GRAPH\_ERROR\_EARLY\_TERMINATION: Graph execution terminated early due to defined op behavior.
- QAIRT\_GRAPH\_ERROR\_INVALID\_CONTEXT: Graph execution failed due to context already being freed.
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION: SSR occurence (successful recovery)
- QAIRT\_COMMON\_ERROR\_SYSTEM\_COMMUNICATION\_FATAL: SSR occurence (unsuccessful recovery)

Note

Tensors in *inputs* and *outputs* must carry the same ID that was assigned when they were created. Values for all other attributes in QairtTensor are assumed from the point at which they were registered with a backend at the time of tensor creation, with the following exceptions:

- Tensor data provided by client such as in *clientBuf* can be changed between invocations to execute().
- Batch multiple: An *inputHandlesHandle* or *outputHandlesHandle* tensor *dimensions* value, if non-null, should match the values provided at tensor creation, with the following exception. The batch dimension, as determined by the op definition, can be an integer multiple of the respective dimension provided at tensor creation. All *inputHandlesHandle* and *outputHandlesHandle* tensors must have the same batch multiple.
- Dynamic output dimensions: An *outputsHandles* tensor QairtTensor *dimensions* value, if non-null, can vary after graph execution. As determined by the op definition, non-batch dimensions may be less than the respective dimension at tensor creation.
- Dynamic dimensions: If an *inputHandlesHandle* tensor was created with a non-null *isDynamicDimensions* value, the corresponding dynamic dimensions must be provided by the caller. If an *outputHandlesHandle* tensor was created with a non-null *isDynamicDimensions* value, the *dimensions* must be non-null and the output dimensions will be written by the backend. In a scenario where maximum dimensions will be exceeded, the backend will generate an error code indicating loss of data and will fill the tensor with as much data as possible.
- Other Tensor values like *dataType* can also be permitted to change between invocations to QairtGraph\_execute()/QairtGraph\_executeAsync() for certain ops that perform data type conversions.
- Some backends may be able to execute a graph with no *inputHandlesHandle* provided the graph has no application-writable tensors.
- QairtGraph\_executeAsync() can only accept tensors of type QAIRT\_TENSOR\_TYPE\_APP\_READ, QAIRT\_TENSOR\_TYPE\_APP\_WRITE, QAIRT\_TENSOR\_TYPE\_APP\_READ\_WRITE, QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_READ, QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_WRITE, and QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_READWRITE. Tensors provided with a different type will result in QairtGraph\_execute() failure.
- Clients may exclude tensors of type QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_READ, QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_WRITE, and QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_READ from the *inputHandlesHandle* and *outputHandlesHandle* arguments. If a QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_WRITE tensor is excluded from the *inputHandlesHandle* argument, the value of that tensor will be dictated by the backend defined behavior for that model. QAIRT\_TENSOR\_TYPE\_OPTIONAL\_APP\_READ tensors may be excluded from the *outputHandlesHandle* argument. In this case a backend will not populate the tensor on the QairtGraph\_execute() call, and the data of these tensors is null. This is an optional feature. Backends broadcast support for this feature with QAIRT\_CAPABILITY\_TENSOR\_SUPPORT\_OPTIONAL\_APP\_WRITE, QAIRT\_CAPABILITY\_TENSOR\_SUPPORT\_OPTIONAL\_APP\_READ, and QAIRT\_CAPABILITY\_TENSOR\_SUPPORT\_OPTIONAL\_APP\_READWRITE.

Note

If there are simultaneous calls to QairtGraph\_execute() and QairtGraph\_executeAsync(), the priority for enqueuing or executing is equal. Both functions will add to the same queue, the only difference in behavior is whether the function returns when the execution is enqueued, or when the execution finishes.

Note

Use corresponding API through [QairtGraph\_V1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__V1__t).

Enums

- enum QairtGraph\_Error\_t

    - QAIRT Graph API result / error codes.

*Values:*

- enumerator QAIRT\_GRAPH\_MIN\_ERROR = QAIRT\_MIN\_ERROR\_GRAPH

    - 

- enumerator QAIRT\_GRAPH\_NO\_ERROR = QAIRT\_SUCCESS

    - QAIRT Graph success.

- enumerator QAIRT\_GRAPH\_ERROR\_UNSUPPORTED\_FEATURE = [QAIRT\_COMMON\_ERROR\_NOT\_SUPPORTED](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv4N19QairtCommon_Error_t32QAIRT_COMMON_ERROR_NOT_SUPPORTEDE)

    - There is an optional API component that is not supported yet.

See QairtCapability.

- enumerator QAIRT\_GRAPH\_ERROR\_MEM\_ALLOC = [QAIRT\_COMMON\_ERROR\_MEM\_ALLOC](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv4N19QairtCommon_Error_t28QAIRT_COMMON_ERROR_MEM_ALLOCE)

    - General error relating to memory allocation in processing graph API.

- enumerator QAIRT\_GRAPH\_ERROR\_GENERAL = [QAIRT\_COMMON\_ERROR\_GENERAL](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv4N19QairtCommon_Error_t26QAIRT_COMMON_ERROR_GENERALE)

    - General type of graph error, which has not been identified as any other error type.

Any Graph API can return this error code.

- enumerator QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT = 6000

    - An argument to QNN API is deemed invalid by a backend.

- enumerator QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE = 6001

    - Invalid graph handle.

- enumerator QAIRT\_GRAPH\_ERROR\_GRAPH\_DOES\_NOT\_EXIST = 6002

    - No graph with specified info is registered in the backend.

- enumerator QAIRT\_GRAPH\_ERROR\_INVALID\_NAME = 6003

    - Invalid or duplicate graph name.

- enumerator QAIRT\_GRAPH\_ERROR\_INVALID\_TENSOR = 6004

    - Invalid or NULL QNN tensor.

- enumerator QAIRT\_GRAPH\_ERROR\_INVALID\_OP\_CONFIG = 6005

    - Some elements in the op config data are invalid.

- enumerator QAIRT\_GRAPH\_ERROR\_SET\_PROFILE = 6006

    - Failure to set profile.

- enumerator QAIRT\_GRAPH\_ERROR\_UNCONNECTED\_NODE = 6007

    - Node added before its dependent node(s)

- enumerator QAIRT\_GRAPH\_ERROR\_CREATE\_FAILED = 6020

    - Failure in creating graph with specified configuration.

- enumerator QAIRT\_GRAPH\_ERROR\_OPTIMIZATION\_FAILED = 6021

    - Graph couldn’t be optimized with specified list of ops or config.

- enumerator QAIRT\_GRAPH\_ERROR\_FINALIZE\_FAILED = 6022

    - Graph finalize failed.

- enumerator QAIRT\_GRAPH\_ERROR\_GRAPH\_NOT\_FINALIZED = 6023

    - Attempt to execute graph before finalizing it.

- enumerator QAIRT\_GRAPH\_ERROR\_GRAPH\_FINALIZED = 6024

    - Attempt to modify graph after finalizing it.

- enumerator QAIRT\_GRAPH\_ERROR\_EXECUTION\_ASYNC\_FIFO\_FULL = 6025

    - FIFO queue cannot register any more async execution requests.

- enumerator QAIRT\_GRAPH\_ERROR\_SIGNAL\_IN\_USE = 6030

    - A control signal object was provided to a call, but that signal object is already in-use by another call.

- enumerator QAIRT\_GRAPH\_ERROR\_ABORTED = 6031

    - Call aborted early due to a QnnSignal\_trigger call issued to the observed signal object.

- enumerator QAIRT\_GRAPH\_ERROR\_PROFILE\_IN\_USE = 6032

    - Attempt to bind to a graph a profile handle that is already in-use by another graph.

- enumerator QAIRT\_GRAPH\_ERROR\_TIMED\_OUT = 6033

    - Call aborted early due to a QnnSignal timeout.

- enumerator QAIRT\_GRAPH\_ERROR\_SUBGRAPH = 6034

    - Operation not permitted on a subgraph.

- enumerator QAIRT\_GRAPH\_ERROR\_DISABLED = 6035

    - Graph is not enabled.

- enumerator QAIRT\_GRAPH\_ERROR\_DYNAMIC\_TENSOR\_SHAPE = 6036

    - Dynamic tensor shape error.

- enumerator QAIRT\_GRAPH\_ERROR\_TENSOR\_SPARSITY = 6037

    - Tensor sparsity error.

- enumerator QAIRT\_GRAPH\_ERROR\_EARLY\_TERMINATION = 6038

    - Early termination error.

- enumerator QAIRT\_GRAPH\_ERROR\_INVALID\_CONTEXT = 6039

    - Invalid context error.

- enumerator QAIRT\_GRAPH\_ERROR\_TERMINATE\_FAILED = 6040

    - Failed to terminate.

- enumerator QAIRT\_GRAPH\_MAX\_ERROR = QAIRT\_MAX\_ERROR\_GRAPH

    - 

- enumerator QAIRT\_GRAPH\_ERROR\_UNDEFINED = 0x7FFFFFFF

    -

Typedefs

- typedef struct \_QairtGraph\_Handle\_t \*QairtGraph\_Handle\_t

    - Graph handle used to interface with Graph APIs.

The handle itself is created and freed by the client.
    Copy to clipboard

- typedef void (\*Qairt\_NotifyFn\_t)(void \*notifyParam, [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) status)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_FreeFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_CreateSubgraphFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), const char\*, [QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t)\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_SetConfigFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), const [QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_AddNodeFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), [QairtOpConfig\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtOpConfig.html#_CPPv422QairtOpConfig_Handle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_FinalizeFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t), [QairtSignal\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtSignal.html#_CPPv420QairtSignal_Handle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_CreateGraphTensorFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_UpdateGraphTensorsFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), const [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t)\*, uint64\_t)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_ExecuteFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), const [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t)\*, uint32\_t, [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t)\*, uint32\_t, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t), [QairtSignal\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtSignal.html#_CPPv420QairtSignal_Handle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_ExecuteAsyncFn\_t)([QairtGraph\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv419QairtGraph_Handle_t), const [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t)\*, uint32\_t, [QairtTensor\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtTensor.html#_CPPv420QairtTensor_Handle_t)\*, uint32\_t, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t), [QairtSignal\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtSignal.html#_CPPv420QairtSignal_Handle_t), [Qairt\_NotifyFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv416Qairt_NotifyFn_t), void\*)

    -

Defines

- QAIRT\_GRAPH\_V1\_ID QAIRT\_MIN\_ID\_GRAPH

    - 

- QAIRT\_GRAPH\_CONFIG\_V1\_ID QAIRT\_MIN\_ID\_GRAPH + 2

    -

* * *

Graph configuration options.

**Include:** `#include "QairtGraph/QairtGraphConfig.h"`

- struct QairtGraph\_ConfigV1\_t

    - *#include &lt;QairtGraphConfig.h&gt;*

Public Members

- uint64\_t size

    - 

- [Qairt\_GetInterfaceFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv422Qairt_GetInterfaceFn_t) getInterface

    - 

- [QairtGraph\_Config\_CreateFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv428QairtGraph_Config_CreateFn_t) create

    - 

- [QairtGraph\_Config\_FreeFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv426QairtGraph_Config_FreeFn_t) free

    - 

- [QairtGraph\_Config\_GetNumCustomConfigsFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv441QairtGraph_Config_GetNumCustomConfigsFn_t) getNumCustomConfigs

    - 

- [QairtGraph\_Config\_GetCustomConfigAtFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv439QairtGraph_Config_GetCustomConfigAtFn_t) getCustomConfigAt

    - 

- [QairtGraph\_Config\_GetPriorityFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv433QairtGraph_Config_GetPriorityFn_t) getPriority

    - 

- [QairtGraph\_Config\_GetProfileHandleFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv438QairtGraph_Config_GetProfileHandleFn_t) getProfileHandle

    - 

- [QairtGraph\_Config\_GetProfilingStateFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv439QairtGraph_Config_GetProfilingStateFn_t) getProfilingState

    - 

- [QairtGraph\_Config\_GetNumProfilingExecutionsFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv447QairtGraph_Config_GetNumProfilingExecutionsFn_t) getNumProfilingExecutions

    - 

- [QairtGraph\_Config\_SetCustomConfigsFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv438QairtGraph_Config_SetCustomConfigsFn_t) setCustomConfigs

    - 

- [QairtGraph\_Config\_SetPriorityFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv433QairtGraph_Config_SetPriorityFn_t) setPriority

    - 

- [QairtGraph\_Config\_SetProfileHandleFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv438QairtGraph_Config_SetProfileHandleFn_t) setProfileHandle

    - 

- [QairtGraph\_Config\_SetProfilingStateFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv439QairtGraph_Config_SetProfilingStateFn_t) setProfilingState

    - 

- [QairtGraph\_Config\_SetNumProfilingExecutionsFn\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv447QairtGraph_Config_SetNumProfilingExecutionsFn_t) setNumProfilingExecutions

    -

Functions

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_create([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) \*cfgHandle)

    - Creates a graph config handle.

- Parameters

    - **cfgHandle** – **[out]** A handle to the created graph config.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* is not an assignable handle

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_free([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) configHandle)

    - Frees a graph config handle.

- Parameters

    - **configHandle** – **[in]** A handle to the created graph config.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *configHandle* is not a valid handle

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_getNumCustomConfigs([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, uint32\_t \*numConfigs)

    - Gets the number of custom configs stored.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **numConfigs** – **[out]** number of custom configs.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_getCustomConfigAt([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, uint32\_t index, [QairtGraph\_CustomConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv431QairtGraph_CustomConfigHandle_t) \*customConfigHandle)

    - Gets a custom config at a particular index.

Index must be less than the result of QairtGraph\_Config\_getNumCustomConfigs.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created config.
- **index** – **[in]** Index of the custom config
- **customConfigHandle** – **[out]** A referenced graph custom config handle. Reference handles should not be freed. Referenced handles are invalidated if modification operations are performed from the same component API.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_getPriority([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, [Qairt\_Priority\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv416Qairt_Priority_t) \*priority)

    - Gets the priority handle associated with a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **priorityHandle** – **[out]** A referenced priority handle. Reference handles should not be freed. Referenced handles are invalidated if modification operations are performed from the same component API.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* or *priorityHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_getProfileHandle([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t) \*profileHandle)

    - Gets the priority handle associated with a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **profileHandle** – **[out]** A referenced profile handle. Reference handles should not be freed. Referenced handles are invalidated if modification operations are performed from the same component API.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* or *profileHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_getProfilingState([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, [QairtGraph\_ProfilingState\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv427QairtGraph_ProfilingState_t) \*profilingState)

    - Gets the profiling state associated with a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **profilingState** – **[out]** The config’s profiling state.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_getNumProfilingExecutions([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, uint32\_t \*numProfilingExecutions)

    - Gets the number of profiling executions associated with a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **numProfilingExecutions** – **[out]** The number of profiling executions.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_setCustomConfigs([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, [QairtGraph\_CustomConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv431QairtGraph_CustomConfigHandle_t) \*customCfgHandles, uint32\_t numCustomConfigs)

    - Sets an array of custom graph config handles onto a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **customCfgHandles** – **[in]** An array of custom config handles.
- **numCustomConfigs** – **[in]** The number of handles in the array.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* or one or more handles in *customCfgHandles* are not valid handles
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: *customCfgHandles* is NULL when *numCustomConfigs* is greater than zero

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_setPriority([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, [Qairt\_Priority\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv416Qairt_Priority_t) priority)

    - Sets a priority handle onto a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **priorityHandle** – **[in]** A priority handle, created and configured via the Priority component’s APIs.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* or *priorityHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_setProfileHandle([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t) profileHandle)

    - Sets a profile handle onto a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **profileHandle** – **[in]** A profile handle, created and configured via the Profiling component’s APIs.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* or *profileHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_setProfilingState([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, const [QairtGraph\_ProfilingState\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv427QairtGraph_ProfilingState_t) profilingState)

    - Sets the profiling state on a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **profilingState** – **[in]** The profiling state to set.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

- [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) QairtGraph\_Config\_setNumProfilingExecutions([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t) cfgHandle, const uint32\_t numProfilingExecutions)

    - Sets the number of profiling executions on a graph config handle.

- Parameters

    - - **cfgHandle** – **[in]** A handle to the created graph config.
- **numProfilingExecutions** – **[in]** The number of profiling executions to perform.

- Returns

    - Error code:

- QAIRT\_SUCCESS: no error is encountered
- QAIRT\_GRAPH\_ERROR\_INVALID\_HANDLE: *cfgHandle* is not a valid handle
- QAIRT\_GRAPH\_ERROR\_INVALID\_ARGUMENT: at least one argument is invalid

Note

Use corresponding API through [QairtGraph\_ConfigV1\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#structQairtGraph__ConfigV1__t).

Enums

- enum QairtGraph\_ProfilingState\_t

    - This enum defines graph profiling states.

*Values:*

- enumerator QAIRT\_GRAPH\_PROFILING\_STATE\_ENABLED = 1

    - Profiling is enabled for the graph.

- enumerator QAIRT\_GRAPH\_PROFILING\_STATE\_DISABLED = 2

    - Profiling is disabled for the graph.

- enumerator QAIRT\_GRAPH\_PROFILING\_STATE\_UNDEFINED = 0x7FFFFFFF

    -

Typedefs

- typedef struct \_QairtGraph\_ConfigHandle\_t \*QairtGraph\_ConfigHandle\_t

    - Graph Config handle used to interface with Graph Config APIs.

The handle itself is created and freed by the client.
    Copy to clipboard

- typedef struct \_QairtGraph\_CustomConfigHandle\_t \*QairtGraph\_CustomConfigHandle\_t

    - Graph Custom Config handle used to interface with Graph Custom Config APIs, which are specific to each backend.

The handle itself is created and freed by the client.

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_CreateFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t)\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_FreeFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_GetNumCustomConfigsFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), uint32\_t\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_GetCustomConfigAtFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), uint32\_t, [QairtGraph\_CustomConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv431QairtGraph_CustomConfigHandle_t)\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_GetPriorityFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), [Qairt\_Priority\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv416Qairt_Priority_t)\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_GetProfileHandleFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t)\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_GetProfilingStateFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), [QairtGraph\_ProfilingState\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv427QairtGraph_ProfilingState_t)\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_GetNumProfilingExecutionsFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), uint32\_t\*)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_SetCustomConfigsFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), [QairtGraph\_CustomConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv431QairtGraph_CustomConfigHandle_t)\*, uint32\_t)

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_SetPriorityFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), [Qairt\_Priority\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv416Qairt_Priority_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_SetProfileHandleFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), [QairtProfile\_Handle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtProfile.html#_CPPv421QairtProfile_Handle_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_SetProfilingStateFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), const [QairtGraph\_ProfilingState\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv427QairtGraph_ProfilingState_t))

    - 

- typedef [Qairt\_Status\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtCommon.html#_CPPv414Qairt_Status_t) (\*QairtGraph\_Config\_SetNumProfilingExecutionsFn\_t)([QairtGraph\_ConfigHandle\_t](https://docs.qualcomm.com/doc/80-63442-10/topic/QairtGraph.html#_CPPv425QairtGraph_ConfigHandle_t), const uint32\_t)

    -

* * *

Graph execution environment setup.

**Include:** `#include "QairtGraph/QairtGraphExecutionEnvironment.h"`

Warning

doxygenfile: Cannot find file “QairtGraph/QairtGraphExecutionEnvironment.h

* * *

Custom graph property callbacks.

**Include:** `#include "QairtGraph/QairtGraphProperty.h"`

Warning

doxygenfile: Cannot find file “QairtGraph/QairtGraphProperty.h

Last Published: Jun 04, 2026

[Previous Topic
QairtContext](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/QairtContext.md) [Next Topic
QairtTensor](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/QairtTensor.md)