File QnnCommon.h¶
↰ Parent directory (include/QNN)
Common API components.
Contents
Definition (include/QNN/QnnCommon.h)¶
Detailed Description¶
A header which contains common components shared between different parts of the API, for example, definition of “context” type. This simplifies the cross-inclusion of headers.
Includes¶
stdint.h
Included By¶
Enums¶
Defines¶
Typedefs¶
Full File Listing¶
Common API components.
A header which contains common components shared between different
parts of the API, for example, definition of "context" type. This
simplifies the cross-inclusion of headers.
Defines
-
QNN_API
-
QNN_API_VERSION_MAJOR 2
-
QNN_API_VERSION_MINOR 29
-
QNN_API_VERSION_PATCH 0
-
QNN_BACKEND_ID_NULL 0
NULL backend identifier.
-
QNN_SUCCESS 0
Global value indicating success.
-
QNN_MIN_ERROR_COMMON 1000
-
QNN_MAX_ERROR_COMMON 1999
-
QNN_MIN_ERROR_PROPERTY 2000
-
QNN_MAX_ERROR_PROPERTY 2999
-
QNN_MIN_ERROR_OP_PACKAGE 3000
-
QNN_MAX_ERROR_OP_PACKAGE 3999
-
QNN_MIN_ERROR_BACKEND 4000
-
QNN_MIN_ERROR_BACKEND_SAVER 4950
-
QNN_MAX_ERROR_BACKEND_SAVER 4998
-
QNN_MAX_ERROR_BACKEND 4999
-
QNN_MIN_ERROR_CONTEXT 5000
-
QNN_MAX_ERROR_CONTEXT 5999
-
QNN_MIN_ERROR_GRAPH 6000
-
QNN_MAX_ERROR_GRAPH 6999
-
QNN_MIN_ERROR_TENSOR 7000
-
QNN_MAX_ERROR_TENSOR 7999
-
QNN_MIN_ERROR_MEM 8000
-
QNN_MAX_ERROR_MEM 8999
-
QNN_MIN_ERROR_SIGNAL 9000
-
QNN_MAX_ERROR_SIGNAL 9999
-
QNN_MIN_ERROR_ERROR 10000
-
QNN_MAX_ERROR_ERROR 10999
-
QNN_MIN_ERROR_LOG 11000
-
QNN_MAX_ERROR_LOG 11999
-
QNN_MIN_ERROR_PROFILE 12000
-
QNN_MAX_ERROR_PROFILE 12999
-
QNN_MIN_ERROR_PERF_INFRASTRUCTURE 13000
-
QNN_MAX_ERROR_PERF_INFRASTRUCTURE 13999
-
QNN_MIN_ERROR_DEVICE 14000
-
QNN_MAX_ERROR_DEVICE 14999
-
QNN_MIN_ERROR_GLOBAL_CONFIG 15000
-
QNN_MAX_ERROR_GLOBAL_CONFIG 15999
-
QNN_MIN_ERROR_SYSTEM 30000
-
QNN_MAX_ERROR_SYSTEM 49999
-
QNN_MIN_ERROR_INTERFACE 60000
-
QNN_MAX_ERROR_INTERFACE 60999
-
QNN_PASTE_THREE(a, b, c) a##b##c
-
QNN_GET_ERROR_CODE(errorHandle) (errorHandle & 0xFFFF)
Simple utility to extract 16-bit error code from 64-bit Qnn_ErrorHandle_t.
Typedefs
-
typedef uint64_t Qnn_ErrorHandle_t¶
A typedef to indicate QNN API return handle. Return error codes from APIs are to be read out from the least significant 16 bits of the field. The higher order bits are reserved for internal tracking purposes.
-
typedef void *Qnn_Handle_t¶
Definition of the QNN handle type. This handle type is the base type for all other QNN handle types. Handles typically have corresponding create and free API functions.
-
typedef Qnn_Handle_t Qnn_BackendHandle_t¶
Definition of the QNN backend handle. Backend handles are often used as a parent when creating handles other QNN components (e.g. contexts).
-
typedef Qnn_Handle_t Qnn_ContextHandle_t¶
Definition of the QNN context handle.
-
typedef Qnn_Handle_t Qnn_DeviceHandle_t¶
Definition of the QNN device handle.
-
typedef Qnn_Handle_t Qnn_GraphHandle_t¶
Definition of the QNN graph handle. Graph handles cannot be free’d.
-
typedef Qnn_Handle_t Qnn_LogHandle_t¶
Definition of the QNN log handle.
-
typedef Qnn_Handle_t Qnn_MemHandle_t¶
Definition of the QNN memory handle.
-
typedef Qnn_Handle_t Qnn_ProfileHandle_t¶
Definition of the QNN profile handle.
-
typedef Qnn_Handle_t Qnn_SignalHandle_t¶
An opaque control object which may be used to control the execution behavior of various QNN functions. A signal object may only be used by one call at a time; if the same signal object is supplied to a second call before the first has terminated, the second call will immediately fail with an error. When the call using a signal returns gracefully, the signal object is made available again.
Enums
-
enum QnnCommon_Error_t
An enum which defines error codes commonly used across API components.
Values:
-
enumerator QNN_COMMON_MIN_ERROR = 1000
-
enumerator QNN_COMMON_ERROR_NOT_SUPPORTED = 1000 + 0
API or feature is not supported by implementation.
-
enumerator QNN_COMMON_ERROR_MEM_ALLOC = 1000 + 2
Memory allocation related error.
-
enumerator QNN_COMMON_ERROR_SYSTEM = 1000 + 3
System level error, such as related to platform / OS services.
-
enumerator QNN_COMMON_ERROR_INVALID_ARGUMENT = 1000 + 4
Invalid function argument.
-
enumerator QNN_COMMON_ERROR_OPERATION_NOT_PERMITTED = 1000 + 5
Illegal operation or sequence of operations.
-
enumerator QNN_COMMON_ERROR_PLATFORM_NOT_SUPPORTED = 1000 + 6
Attempt to use QNN API on an unsupported platform.
-
enumerator QNN_COMMON_ERROR_SYSTEM_COMMUNICATION = 1000 + 7
Communication errors with platform / OS service (service is recoverable)
-
enumerator QNN_COMMON_ERROR_INCOMPATIBLE_BINARIES = 1000 + 8
Loaded libraries are of incompatible versions.
-
enumerator QNN_COMMON_ERROR_LOADING_BINARIES = 1000 + 9
Attempt to reload library already loaded in this process.
-
enumerator QNN_COMMON_ERROR_RESOURCE_UNAVAILABLE = 1000 + 10
Resource allocation related error.
-
enumerator QNN_COMMON_ERROR_SYSTEM_COMMUNICATION_FATAL = 1000 + 11
Communication errors with platform / OS service (service is non-recoverable)
-
enumerator QNN_COMMON_ERROR_GENERAL = 1000 + 100
General error, which has not been identified as any other error type.
-
enumerator QNN_COMMON_MAX_ERROR = 1999
-
enumerator QNN_COMMON_ERROR_UNDEFINED = 0x7FFFFFFF
-
enumerator QNN_COMMON_MIN_ERROR = 1000