CPU¶
This section provides information specific to QNN CPU backend.
API Specializations¶
This section contains information related to API specialization for the CPU backend. All QNN CPU
backend specialization is available under <QNN_SDK_ROOT>/include/CPU/ directory.
The current version of the QNN CPU backend API is:
-
QNN_CPU_API_VERSION_MAJOR 1
-
QNN_CPU_API_VERSION_MINOR 1
-
QNN_CPU_API_VERSION_PATCH 0
Supported Operations¶
QNN CPU supports running quantized 8-bit and float 32-bit networks on currently enabled Qualcomm chipsets and platform targets. List of operations supported by QNN CPU in quantized and floating point precision can be seen under Backend Support CPU column in Supported Operations.
Note that even though FP32 and INT8 are listed under separate columns in Supported Operations they are enabled by the same CPU backend library.
Op Package¶
The CPU Op Package provides interface to interact with OpPackage libraries registered with the CPU backend. More details about the interface could be found here File QnnCpuOpPackage.h.
Op Package Writing Guidelines¶
Detailed information regarding op package writing will be provided in a future release.
In the meantime, please refer to the op package example which can be found in ${QNN_SDK_ROOT}/examples/OpPackage/CPU/.
Debug CallBack¶
Debug Callback is a feature that allows user to receive intermediate output as CPU backend execute it. QNN CPU provides a configuration option for users to enable it through client usage like below:
1 QnnCpuGraph_CustomConfig_t customConfig;
2 customConfig.option = QNN_CPU_GRAPH_CONFIG_OPTION_OP_DEBUG_CALLBACK;
3 customConfig.cpuGraphOpDebug.cpuGraphOpDebugCallback = <QnnCpuGraph_OpDebugCallback_t funtion>;
4 customConfig.cpuGraphOpDebug.callBackParam = <param to be returned with callback funtion>;
5
6 QnnGraph_Config_t graphConfig;
7 graphConfig.option = QNN_GRAPH_CONFIG_OPTION_CUSTOM;
8 graphConfig.customConfig = &customConfig;
9
10 const QnnGraph_Config_t* pGraphConfig[] = {&graphConfig, NULL};