edge::qnn namespace

Contents

Classes

class Backend
Class for handling QNN backends.
template<typename ConfigType, typename CustomConfigType>
class Config
A class template for managing QNN backend configurations.
class Graph
Class for managing QNN graphs.
class ModelImpl
Implementation of the Model interface for QNN models.
class TensorImpl
Concrete implementation of the Tensor interface for QNN.

Typedefs

using GraphErrorT = enum GraphError { GRAPH_NO_ERROR=0, GRAPH_TENSOR_ERROR=1, GRAPH_PARAMS_ERROR=2, GRAPH_NODES_ERROR=3, GRAPH_GRAPH_ERROR=4, GRAPH_CONTEXT_ERROR=5, GRAPH_GENERATION_ERROR=6, GRAPH_SETUP_ERROR=7, GRAPH_INVALID_ARGUMENT_ERROR=8, GRAPH_FILE_ERROR=9, GRAPH_MEMORY_ALLOCATE_ERROR=10, GRAPH_UNKNOWN_ERROR=0x7FFFFFFF }
Enum representing possible errors that can occur during graph operations.
using GraphInfoT = struct GraphInfo { Qnn_GraphHandle_t graph
Struct representing information about a graph.
using GraphConfigInfoT = struct GraphConfigInfo { char*graphName
Struct representing configuration information for a graph.
using ComposeGraphsFnHandleTypeT = GraphErrorT(*)(Qnn_BackendHandle_t, QNN_INTERFACE_VER_TYPE, Qnn_ContextHandle_t, const GraphConfigInfoT**, const uint32_t, GraphInfoT***, uint32_t*, bool, QnnLog_Callback_t, QnnLog_Level_t)
Function pointer type for composing graphs.
using FreeGraphInfoFnHandleTypeT = GraphErrorT(*)(GraphInfoT***, uint32_t)
Function pointer type for freeing graph information.
using TensorVariant = std::variant<std::reference_wrapper<Qnn_TensorV1_t>, std::reference_wrapper<Qnn_TensorV2_t>>
using ConstTensorVariant = std::variant<std::reference_wrapper<const Qnn_TensorV1_t>, std::reference_wrapper<const Qnn_TensorV2_t>>
using TensorMemoryVariant = std::variant<Qnn_MemHandle_t, std::reference_wrapper<Qnn_ClientBuffer_t>>

Functions

auto getTensorTypeVariant(Qnn_Tensor_t& tensor) -> TensorVariant
auto getTensorTypeVariant(const Qnn_Tensor_t& tensor) -> ConstTensorVariant
auto getTensorMemoryPtr(const Qnn_Tensor_t& tensor) -> void *
auto getQnnTensorId(const Qnn_Tensor_t& tensor) -> uint32_t
auto getQnnTensorName(const Qnn_Tensor_t& tensor) -> const char *
auto getQnnTensorType(const Qnn_Tensor_t& tensor) -> Qnn_TensorType_t
auto getQnnTensorDataFormat(const Qnn_Tensor_t& tensor) -> Qnn_TensorDataFormat_t
auto getQnnTensorDataType(const Qnn_Tensor_t& tensor) -> Qnn_DataType_t
auto getQnnTensorQuantParams(const Qnn_Tensor_t& tensor) -> Qnn_QuantizeParams_t
auto getQnnTensorRank(const Qnn_Tensor_t& tensor) -> uint32_t
auto getQnnTensorDimensions(const Qnn_Tensor_t& tensor) -> uint32_t *
auto getQnnTensorIsDynamicDimensions(const Qnn_Tensor_t& tensor) -> uint8_t *
auto getQnnTensorSparseParams(const Qnn_Tensor_t& tensor) -> Qnn_SparseParams_t
auto getQnnTensorMemType(const Qnn_Tensor_t& tensor) -> Qnn_TensorMemType_t
auto getQnnTensorClientBuf(const Qnn_Tensor_t& tensor) -> Qnn_ClientBuffer_t
auto getQnnTensorMemHandle(const Qnn_Tensor_t& tensor) -> Qnn_MemHandle_t
void setQnnTensorId(Qnn_Tensor_t& tensor, uint32_t tensorId)
void setQnnTensorName(Qnn_Tensor_t& tensor, const char* name)
void setQnnTensorType(Qnn_Tensor_t& tensor, Qnn_TensorType_t type)
void setQnnTensorDataFormat(Qnn_Tensor_t& tensor, Qnn_TensorDataFormat_t dataFormat)
void setQnnTensorDataType(Qnn_Tensor_t& tensor, Qnn_DataType_t dataType)
void setQnnTensorQuantParams(Qnn_Tensor_t& tensor, Qnn_QuantizeParams_t quantizeParams)
void setQnnTensorRank(Qnn_Tensor_t& tensor, uint32_t rank)
void setQnnTensorDimensions(Qnn_Tensor_t& tensor, uint32_t*const dimensions)
void setQnnTensorIsDynamicDimensions(Qnn_Tensor_t& tensor, uint8_t* isDynamicDimensions)
void setQnnTensorSparseParams(Qnn_Tensor_t& tensor, Qnn_SparseParams_t sparseParams)
void setQnnTensorMemType(Qnn_Tensor_t& tensor, Qnn_TensorMemType_t memType)
void setQnnTensorClientBuf(Qnn_Tensor_t& tensor, Qnn_ClientBuffer_t clientBuf)
void setQnnTensorMemHandle(Qnn_Tensor_t& tensor, Qnn_MemHandle_t memHandle)
void freeQnnTensor(Qnn_Tensor_t& tensor)
auto deepCopyQnnTensorInfo(Qnn_Tensor_t& dst, const Qnn_Tensor_t& src) -> bool
auto createTensorsFromInfo(const Qnn_Tensor_t* tensorsInfoSrc, uint32_t tensorsCount) -> std::vector< Qnn_Tensor_t >

Variables

char* graphName
Qnn_Tensor_t* inputTensors
uint32_t numInputTensors
Qnn_Tensor_t* outputTensors
uint32_t numOutputTensors
const QnnGraph_Config_t** graphConfigs

Typedef documentation

using edge::qnn::GraphErrorT = enum GraphError { GRAPH_NO_ERROR=0, GRAPH_TENSOR_ERROR=1, GRAPH_PARAMS_ERROR=2, GRAPH_NODES_ERROR=3, GRAPH_GRAPH_ERROR=4, GRAPH_CONTEXT_ERROR=5, GRAPH_GENERATION_ERROR=6, GRAPH_SETUP_ERROR=7, GRAPH_INVALID_ARGUMENT_ERROR=8, GRAPH_FILE_ERROR=9, GRAPH_MEMORY_ALLOCATE_ERROR=10, GRAPH_UNKNOWN_ERROR=0x7FFFFFFF }

Enum representing possible errors that can occur during graph operations.

using edge::qnn::GraphInfoT = struct GraphInfo { Qnn_GraphHandle_t graph

Struct representing information about a graph.

using edge::qnn::GraphConfigInfoT = struct GraphConfigInfo { char*graphName

Struct representing configuration information for a graph.

using edge::qnn::ComposeGraphsFnHandleTypeT = GraphErrorT(*)(Qnn_BackendHandle_t, QNN_INTERFACE_VER_TYPE, Qnn_ContextHandle_t, const GraphConfigInfoT**, const uint32_t, GraphInfoT***, uint32_t*, bool, QnnLog_Callback_t, QnnLog_Level_t)

Function pointer type for composing graphs.

using edge::qnn::FreeGraphInfoFnHandleTypeT = GraphErrorT(*)(GraphInfoT***, uint32_t)

Function pointer type for freeing graph information.

using edge::qnn::TensorVariant = std::variant<std::reference_wrapper<Qnn_TensorV1_t>, std::reference_wrapper<Qnn_TensorV2_t>>

using edge::qnn::ConstTensorVariant = std::variant<std::reference_wrapper<const Qnn_TensorV1_t>, std::reference_wrapper<const Qnn_TensorV2_t>>

using edge::qnn::TensorMemoryVariant = std::variant<Qnn_MemHandle_t, std::reference_wrapper<Qnn_ClientBuffer_t>>

Function documentation

auto edge::qnn::getTensorTypeVariant(Qnn_Tensor_t& tensor) -> TensorVariant

auto edge::qnn::getTensorTypeVariant(const Qnn_Tensor_t& tensor) -> ConstTensorVariant

auto edge::qnn::getTensorMemoryPtr(const Qnn_Tensor_t& tensor) -> void *

auto edge::qnn::getQnnTensorId(const Qnn_Tensor_t& tensor) -> uint32_t

auto edge::qnn::getQnnTensorName(const Qnn_Tensor_t& tensor) -> const char *

auto edge::qnn::getQnnTensorType(const Qnn_Tensor_t& tensor) -> Qnn_TensorType_t

auto edge::qnn::getQnnTensorDataFormat(const Qnn_Tensor_t& tensor) -> Qnn_TensorDataFormat_t

auto edge::qnn::getQnnTensorDataType(const Qnn_Tensor_t& tensor) -> Qnn_DataType_t

auto edge::qnn::getQnnTensorQuantParams(const Qnn_Tensor_t& tensor) -> Qnn_QuantizeParams_t

auto edge::qnn::getQnnTensorRank(const Qnn_Tensor_t& tensor) -> uint32_t

auto edge::qnn::getQnnTensorDimensions(const Qnn_Tensor_t& tensor) -> uint32_t *

auto edge::qnn::getQnnTensorIsDynamicDimensions(const Qnn_Tensor_t& tensor) -> uint8_t *

auto edge::qnn::getQnnTensorSparseParams(const Qnn_Tensor_t& tensor) -> Qnn_SparseParams_t

auto edge::qnn::getQnnTensorMemType(const Qnn_Tensor_t& tensor) -> Qnn_TensorMemType_t

auto edge::qnn::getQnnTensorClientBuf(const Qnn_Tensor_t& tensor) -> Qnn_ClientBuffer_t

auto edge::qnn::getQnnTensorMemHandle(const Qnn_Tensor_t& tensor) -> Qnn_MemHandle_t

void edge::qnn::setQnnTensorId(Qnn_Tensor_t& tensor, uint32_t tensorId)

void edge::qnn::setQnnTensorName(Qnn_Tensor_t& tensor, const char* name)

void edge::qnn::setQnnTensorType(Qnn_Tensor_t& tensor, Qnn_TensorType_t type)

void edge::qnn::setQnnTensorDataFormat(Qnn_Tensor_t& tensor, Qnn_TensorDataFormat_t dataFormat)

void edge::qnn::setQnnTensorDataType(Qnn_Tensor_t& tensor, Qnn_DataType_t dataType)

void edge::qnn::setQnnTensorQuantParams(Qnn_Tensor_t& tensor, Qnn_QuantizeParams_t quantizeParams)

void edge::qnn::setQnnTensorRank(Qnn_Tensor_t& tensor, uint32_t rank)

void edge::qnn::setQnnTensorDimensions(Qnn_Tensor_t& tensor, uint32_t*const dimensions)

void edge::qnn::setQnnTensorIsDynamicDimensions(Qnn_Tensor_t& tensor, uint8_t* isDynamicDimensions)

void edge::qnn::setQnnTensorSparseParams(Qnn_Tensor_t& tensor, Qnn_SparseParams_t sparseParams)

void edge::qnn::setQnnTensorMemType(Qnn_Tensor_t& tensor, Qnn_TensorMemType_t memType)

void edge::qnn::setQnnTensorClientBuf(Qnn_Tensor_t& tensor, Qnn_ClientBuffer_t clientBuf)

void edge::qnn::setQnnTensorMemHandle(Qnn_Tensor_t& tensor, Qnn_MemHandle_t memHandle)

void edge::qnn::freeQnnTensor(Qnn_Tensor_t& tensor)

auto edge::qnn::deepCopyQnnTensorInfo(Qnn_Tensor_t& dst, const Qnn_Tensor_t& src) -> bool

auto edge::qnn::createTensorsFromInfo(const Qnn_Tensor_t* tensorsInfoSrc, uint32_t tensorsCount) -> std::vector< Qnn_Tensor_t >

Variable documentation

char* edge::qnn::graphName

Qnn_Tensor_t* edge::qnn::inputTensors

uint32_t edge::qnn::numInputTensors

Qnn_Tensor_t* edge::qnn::outputTensors

uint32_t edge::qnn::numOutputTensors

const QnnGraph_Config_t** edge::qnn::graphConfigs