File UdoImplDsp.h

Parent directory (include/QNN/DSP/Udo)

Definition (include/QNN/DSP/Udo/UdoImplDsp.h)

Includes

Full File Listing

Typedefs

typedef SnpeUdo_ErrorType_t (*SnpeUdo_ValidateOperationFunction_t)(SnpeUdo_String_t, uint32_t, const SnpeUdo_Param_t*)
typedef SnpeUdo_ValidateOperationFunction_t Udo_ValidateOperationFunction_t
typedef SnpeUdo_HexNNTensorLayout_t Udo_HexNNTensorLayout_t
typedef SnpeUdo_ErrorType_t (*SnpeUdo_QueryOperationFunction_t)(SnpeUdo_String_t, uint32_t, const SnpeUdo_Param_t*, uint32_t*, SnpeUdo_QuantizationType_t**, SnpeUdo_HexNNTensorLayout_t**, uint32_t*, SnpeUdo_QuantizationType_t**, SnpeUdo_HexNNTensorLayout_t**)
typedef SnpeUdo_QueryOperationFunction_t Udo_QueryOperationFunction_t
typedef void (*workerThread_t)(void *perOpInfrastructure, void *userData)
typedef int (*udoSetOutputTensorSize_t)(void *perOpInfrastructure, uint32_t outIdx, uint32_t size)
typedef int (*udoGetInputD32Paddings_t)(void *perOpInfrastructure, uint32_t inIdx, uint32_t *heightPadBefore, uint32_t *heightPadAfter, uint32_t *widthPadBefore, uint32_t *widthPadAfter, uint32_t *depthPadBefore, uint32_t *depthPadAfter)
typedef int (*udoSetOutputD32ShapeSizePaddings_t)(void *perOpInfrastructure, uint32_t outIdx, uint32_t batch, uint32_t height, uint32_t heightPadBefore, uint32_t heightPadAfter, uint32_t width, uint32_t widthPadBefore, uint32_t widthPadAfter, uint32_t depth, uint32_t depthPadBefore, uint32_t depthPadAfter, SnpeUdo_DataType_t dataType)
typedef void *(*udoMemalign_t)(size_t n, size_t size)
typedef void *(*udoMalloc_t)(size_t size)
typedef void *(*udoCalloc_t)(size_t n, size_t size)
typedef void (*udoFree_t)(void *ptr)
typedef uint32_t (*udoGetVtcmSize_t)(void *perOpInfrastructure)
typedef void *(*udoGetVtcmPtr_t)(void *perOpInfrastructure)
typedef uint32_t (*udoVtcmIsReal_t)(void *perOpInfrastructure)
typedef void (*udoRunWorkerThreads_t)(void *perOpInfrastructure, uint32_t nThreads, workerThread_t w, void *userData)
typedef struct hexNNv2GlobalInfra SnpeUdo_HexNNv2GlobalInfra_t
typedef SnpeUdo_HexNNv2GlobalInfra_t Udo_HexNNv2GlobalInfra_t
typedef enum hexnnInfraType SnpeUdo_HexNNInfraType_t
typedef SnpeUdo_HexNNInfraType_t Udo_HexNNInfraType_t
typedef struct dspGlobalInfrastructure SnpeUdo_DspGlobalInfrastructure_t

Infrastructures needed by a developer of DSP Hexnn UDO Implementation library.

The framework/runtime which loads the Hexnn UDO implementation library provides this infrastructure to the loaded library by calling “SnpeUdo_initImplLibrary” function, and passing it (cast to void*). The Hexnn UDO library is expected to cast it back to this structure.

typedef SnpeUdo_DspGlobalInfrastructure_t Udo_DspGlobalInfrastructure_t
typedef struct hexnnv2OpFactoryInfra SnpeUdo_HexNNv2OpFactoryInfra_t

hexnn v2 per op factory infrastructure

The framework/runtime passes per op factory infrastructure as a void pointer to HexNN UDO implementation library by calling function “SnpeUdo_createOpFactory”. UDO implementation library is expected to cast it back to this following struct.

typedef SnpeUdo_HexNNv2OpFactoryInfra_t Udo_HexNNv2OpFactoryInfra_t
typedef void *SnpeUdo_HexNNv2OpInfra_t

hexnn v2 per operation infrastructure

The framework/runtime passes per operation infrastructure as a void pointer to HexNN UDO implementation library by calling function “SnpeUdo_createOperation”. UDO implementation library is expected to cast it to the following type and save it.

This is needed to be passed back into some functions from global infrastructure.

typedef SnpeUdo_HexNNv2OpInfra_t Udo_HexNNv2OpInfra_t

Enums

enum SnpeUdo_HexNNTensorLayout_t

Values:

enumerator SNPE_UDO_DSP_TENSOR_LAYOUT_PLAIN = 0x00
enumerator UDO_DSP_TENSOR_LAYOUT_PLAIN = 0x00
enumerator SNPE_UDO_DSP_TENSOR_LAYOUT_D32 = 0x01
enumerator UDO_DSP_TENSOR_LAYOUT_D32 = 0x01
enumerator SNPE_UDO_DSP_TENSOR_LAYOUT_PLAIN = 0x00
enumerator UDO_DSP_TENSOR_LAYOUT_PLAIN = 0x00
enumerator SNPE_UDO_DSP_TENSOR_LAYOUT_D32 = 0x01
enumerator UDO_DSP_TENSOR_LAYOUT_D32 = 0x01
enum hexnnInfraType

Values:

enumerator UDO_INFRA_HEXNN_V2
enumerator UDO_INFRA_HEXNN_V3
enumerator UDO_INFRA_HEXNN_V2
enumerator UDO_INFRA_HEXNN_V3
struct hexNNv2GlobalInfra
#include <UdoImplDsp.h>
struct udo_func_package_t
#include <UdoImplDsp.h>
struct dspGlobalInfrastructure
#include <UdoImplDsp.h>
struct hexnnv2OpFactoryInfra
#include <UdoImplDsp.h>