File QnnSystemInterface.h¶
↰ Parent directory (include/QNN/System)
QNN System Interface API.
Contents
Definition (include/QNN/System/QnnSystemInterface.h)¶
Detailed Description¶
QNN System Interface is an abstraction combining all QNN System APIs. QNN System Interface provides typedef variant of QNN System APIs and API to get QNN System interface object(s). QNN System Interface API can coexist with QNN System APIs. Visibility of Interface and System APIs is determined by build configuration, specifically by QNN_SYSTEM_API and QNN_SYSTEM_INTERFACE macro definitions.
Includes¶
System/QnnSystemCommon.h(File QnnSystemCommon.h)System/QnnSystemContext.h(File QnnSystemContext.h)System/QnnSystemDlc.h(File QnnSystemDlc.h)System/QnnSystemLog.h(File QnnSystemLog.h)System/QnnSystemProfile.h(File QnnSystemProfile.h)System/QnnSystemTensor.h(File QnnSystemTensor.h)
Defines¶
Typedefs¶
Full File Listing¶
QNN System Interface API.
QNN System Interface is an abstraction combining all QNN System APIs.
QNN System Interface provides typedef variant of QNN System APIs and
API to get QNN System interface object(s).
QNN System Interface API can coexist with QNN System APIs. Visibility
of Interface and System APIs is determined by build configuration,
specifically by QNN_SYSTEM_API and QNN_SYSTEM_INTERFACE macro definitions.
Defines
-
QNN_SYSTEM_INTERFACE¶
-
QNN_SYSTEM_INTERFACE_VER_EVAL(major, minor) QNN_PASTE_THREE(major, _, minor)¶
-
QNN_SYSTEM_INTERFACE_NAME_EVAL(prefix, body, suffix) QNN_PASTE_THREE(prefix, body, suffix)¶
-
QNN_SYSTEM_INTERFACE_VER_TYPE_EVAL(ver_major, ver_minor) QNN_SYSTEM_INTERFACE_NAME_EVAL
( \
QnnSystemInterface_ImplementationV,
QNN_SYSTEM_INTERFACE_VER_EVAL(ver_major, ver_minor), _t)¶
-
QNN_SYSTEM_INTERFACE_VER_NAME_EVAL(ver_major, ver_minor) QNN_SYSTEM_INTERFACE_NAME_EVAL(v, QNN_SYSTEM_INTERFACE_VER_EVAL(ver_major, ver_minor), )¶
-
QNN_SYSTEM_INTERFACE_VER_TYPE QNN_SYSTEM_INTERFACE_VER_TYPE_EVAL(QNN_SYSTEM_API_VERSION_MAJOR, QNN_SYSTEM_API_VERSION_MINOR)¶
-
QNN_SYSTEM_INTERFACE_VER_NAME QNN_SYSTEM_INTERFACE_VER_NAME_EVAL(QNN_SYSTEM_API_VERSION_MAJOR, QNN_SYSTEM_API_VERSION_MINOR)¶
-
QNN_SYSTEM_INTERFACE_VER_TYPE_INIT
{ \
NULL, /*systemContextCreate*/ \
NULL, /*systemContextGetBinaryInfo*/ \
NULL, /*systemContextGetMetaData*/ \
NULL, /*systemContextFree*/ \
NULL, /*systemTensorGetMemoryFootprint*/ \
NULL, /*systemLogCreate*/ \
NULL, /*systemLogSetLogLevel*/ \
NULL, /*systemLogFree*/ \
NULL, /*systemDlcCreateFromFile*/ \
NULL, /*systemDlcCreateFromBinary*/ \
NULL, /*systemDlcComposeGraphs*/ \
NULL, /*systemDlcGetOpMappings*/ \
NULL, /*systemDlcFree*/ \
NULL, /*systemProfileCreateSerializationTarget*/ \
NULL, /*systemProfileSerializeEventData*/ \
NULL, /*systemProfileFreeSerializationTarget*/ \
}
¶ QNN_INTERFACE_VER_TYPE initializer macro.
-
QNN_SYSTEM_INTERFACE_INIT { \
QNN_BACKEND_ID_NULL
, /*backendId*/ \
NULL, /*providerName*/ \
QNN_VERSION_INIT, /*apiVersion*/ \
{ \
QNN_SYSTEM_INTERFACE_VER_TYPE_INIT /*QNN_SYSTEM_INTERFACE_VER_NAME*/ \
} \
}
¶ QnnSystemInterface_t initializer macro.
Typedefs
-
typedef Qnn_ErrorHandle_t (*QnnSystemContext_CreateFn_t)(QnnSystemContext_Handle_t *sysCtxHandle)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemContext_GetBinaryInfoFn_t)(QnnSystemContext_Handle_t sysCtxHandle, void *binaryBuffer, uint64_t binaryBufferSize, const QnnSystemContext_BinaryInfo_t **binaryInfo, Qnn_ContextBinarySize_t *binaryInfoSize)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemContext_GetMetaDataFn_t)(QnnSystemContext_Handle_t sysCtxHandle, const void *binaryBuffer, uint64_t binaryBufferSize, const QnnSystemContext_BinaryInfo_t **binaryInfo)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemContext_FreeFn_t)(QnnSystemContext_Handle_t sysCtxHandle)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemTensor_getMemoryFootprintFn_t)(Qnn_Tensor_t tensor, uint64_t *footprint)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemLog_createFn_t)(QnnLog_Callback_t callback, QnnLog_Level_t maxLogLevel, Qnn_LogHandle_t *logger)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemLog_setLogLevelFn_t)(Qnn_LogHandle_t logger, QnnLog_Level_t maxLogLevel)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemLog_freeFn_t)(Qnn_LogHandle_t logger)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemDlc_createFromFileFn_t)(Qnn_LogHandle_t logger, const char *dlcPath, QnnSystemDlc_Handle_t *dlcHandle)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemDlc_createFromBinaryFn_t)(Qnn_LogHandle_t logger, const uint8_t *buffer, const Qnn_ContextBinarySize_t bufferSize, QnnSystemDlc_Handle_t *dlcHandle)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemDlc_composeGraphsFn_t)(QnnSystemDlc_Handle_t dlcHandle, const QnnSystemDlc_GraphConfigInfo_t **graphConfigs, const uint32_t numGraphConfigs, Qnn_BackendHandle_t backend, Qnn_ContextHandle_t context, QnnInterface_t interface, QnnSystemContext_GraphInfoVersion_t graphVersion, QnnSystemContext_GraphInfo_t **graphs, uint32_t *numGraphs)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemDlc_getOpMappingsFn_t)(QnnSystemDlc_Handle_t dlcHandle, const Qnn_OpMapping_t **opMappings, uint32_t *numOpMappings)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemDlc_freeFn_t)(QnnSystemDlc_Handle_t dlcHandle)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemProfile_createSerializationTargetFn_t)(QnnSystemProfile_SerializationTarget_t serializationTargetInfo, QnnSystemProfile_SerializationTargetConfig_t *configs, uint32_t numConfigs, QnnSystemProfile_SerializationTargetHandle_t *serializationTarget)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemProfile_serializeEventDataFn_t)(QnnSystemProfile_SerializationTargetHandle_t serializationTarget, const QnnSystemProfile_ProfileData_t **eventData, uint32_t numEvents)¶
-
typedef Qnn_ErrorHandle_t (*QnnSystemProfile_freeSerializationTargetFn_t)(QnnSystemProfile_SerializationTargetHandle_t serializationTarget)¶
Enums
-
enum QnnSystemInterface_Error_t¶
QNN System Interface API result / error codes.
Values:
-
enumerator QNN_SYSTEM_INTERFACE_MIN_ERROR = 30000¶
-
enumerator QNN_SYSTEM_INTERFACE_NO_ERROR = 0¶
-
enumerator QNN_SYSTEM_INTERFACE_ERROR_NOT_SUPPORTED = QNN_COMMON_ERROR_NOT_SUPPORTED¶
-
enumerator QNN_SYSTEM_INTERFACE_ERROR_INVALID_PARAMETER = QNN_COMMON_ERROR_INVALID_ARGUMENT¶
-
enumerator QNN_SYSTEM_INTERFACE_MAX_ERROR = 49999¶
-
enumerator QNN_SYSTEM_INTERFACE_MIN_ERROR = 30000¶
Functions
-
Qnn_ErrorHandle_t QnnSystemInterface_getProviders(const QnnSystemInterface_t ***providerList, uint32_t *numProviders)¶
Get list of available interface providers.
- Parameters
providerList – [out] A pointer to an array of available interface providers. The lifetime of returned interface object pointers corresponds to the lifetime of the provider library. Contents are to be considered invalid if the provider library is terminated/unloaded. This function can be called immediately after provider library has been loaded.
numProviders – [out] Number of available interface objects in providerList.
- Returns
Error code:
QNN_SUCCESS: No error.
QNN_SYSTEM_INTERFACE_INVALID_PARAMETER: Invalid parameter was provided. Either providerList or numProviders was NULL.
QNN_SYSTEM_INTERFACE_ERROR_NOT_SUPPORTED: API not supported.
-
struct QnnSystemInterface_ImplementationV1_5_t¶
- #include <QnnSystemInterface.h>
This struct defines Qnn system interface specific to version. Interface functions are allowed to be NULL if not supported/available.
Public Members
-
QnnSystemContext_CreateFn_t systemContextCreate¶
-
QnnSystemContext_GetBinaryInfoFn_t systemContextGetBinaryInfo¶
-
QnnSystemContext_GetMetaDataFn_t systemContextGetMetaData¶
-
QnnSystemContext_FreeFn_t systemContextFree¶
-
QnnSystemTensor_getMemoryFootprintFn_t systemTensorGetMemoryFootprint¶
-
QnnSystemLog_createFn_t systemLogCreate¶
-
QnnSystemLog_setLogLevelFn_t systemLogSetLogLevel¶
-
QnnSystemLog_freeFn_t systemLogFree¶
-
QnnSystemDlc_createFromFileFn_t systemDlcCreateFromFile¶
-
QnnSystemDlc_createFromBinaryFn_t systemDlcCreateFromBinary¶
-
QnnSystemDlc_composeGraphsFn_t systemDlcComposeGraphs¶
-
QnnSystemDlc_getOpMappingsFn_t systemDlcGetOpMappings¶
-
QnnSystemDlc_freeFn_t systemDlcFree¶
-
QnnSystemProfile_createSerializationTargetFn_t systemProfileCreateSerializationTarget¶
-
QnnSystemProfile_serializeEventDataFn_t systemProfileSerializeEventData¶
-
QnnSystemProfile_freeSerializationTargetFn_t systemProfileFreeSerializationTarget¶
-
QnnSystemContext_CreateFn_t systemContextCreate¶
-
struct QnnSystemInterface_t¶
- #include <QnnSystemInterface.h>
Public Members
-
uint32_t backendId¶
Backend identifier. See QnnCommon.h for details. Allowed to be QNN_BACKEND_ID_NULL in case of single backend library or a dedicated system library, in which case clients can deduce backend identifier based on library being loaded.
-
const char *providerName¶
Interface provider name. Allowed to be NULL.
-
Qnn_Version_t systemApiVersion¶
-
union unnamed
- #include <QnnSystemInterface.h>
Public Members
-
uint32_t backendId¶