#include <jevois/DNN/NetworkNPU.H>
#include <jevois/Util/Utils.H>
#include <jevois/DNN/Utils.H>
#include <jevois/Core/DynamicLoader.H>
#include <jevois/Debug/Timer.H>
#include <vsi_nn_version.h>
#include <filesystem>
Go to the source code of this file.
|
#define | VNN_APP_DEBUG (FALSE) |
|
#define | NEW_VXNODE(_node, _type, _in, _out, _uid) |
|
#define | NEW_VIRTUAL_TENSOR(_id, _attr, _dtype) |
|
#define | NEW_CONST_TENSOR(_id, _attr, _dtype, _ofst, _size) |
|
#define | NEW_NORM_TENSOR(_id, _attr, _dtype) |
|
#define | NEW_NORM_TENSOR_FROM_HANDLE(_id, _attr, _dtype) |
|
◆ NEW_CONST_TENSOR
#define NEW_CONST_TENSOR |
( |
|
_id, |
|
|
|
_attr, |
|
|
|
_dtype, |
|
|
|
_ofst, |
|
|
|
_size |
|
) |
| |
Value: do { \
data = load_data(fp, _ofst, _size); \
_attr.vtl = FALSE; \
_attr.is_const = TRUE; \
_attr.dtype.vx_type = _dtype; \
_id = vsi_nn_AddTensor(itsGraph, VSI_NN_TENSOR_ID_AUTO, & _attr, data); \
free(data); \
if (VSI_NN_TENSOR_ID_NA == _id)
LFATAL(
"NEW_CONST_TENSOR failed"); \
} while(0)
#define LFATAL(msg)
Convenience macro for users to print out console or syslog messages, FATAL level.
Definition at line 51 of file NetworkNPU.C.
◆ NEW_NORM_TENSOR
#define NEW_NORM_TENSOR |
( |
|
_id, |
|
|
|
_attr, |
|
|
|
_dtype |
|
) |
| |
Value: do { \
_attr.vtl = FALSE; \
_attr.is_const = FALSE; \
_attr.dtype.vx_type = _dtype; \
_id = vsi_nn_AddTensor(itsGraph, VSI_NN_TENSOR_ID_AUTO, & _attr, NULL); \
if (VSI_NN_TENSOR_ID_NA == _id)
LFATAL(
"NEW_NORM_TENSOR failed"); \
} while(0)
Definition at line 62 of file NetworkNPU.C.
◆ NEW_NORM_TENSOR_FROM_HANDLE
#define NEW_NORM_TENSOR_FROM_HANDLE |
( |
|
_id, |
|
|
|
_attr, |
|
|
|
_dtype |
|
) |
| |
Value: do { \
_attr.vtl = FALSE; \
_attr.is_const = FALSE; \
_attr.dtype.vx_type = _dtype; \
_id = vsi_nn_AddTensorFromHandle(itsGraph, VSI_NN_TENSOR_ID_AUTO, & _attr, NULL); \
if (VSI_NN_TENSOR_ID_NA == _id)
LFATAL(
"NEW_NORM_TENSOR_FROM_HANDLE failed"); \
} while(0)
Definition at line 71 of file NetworkNPU.C.
◆ NEW_VIRTUAL_TENSOR
#define NEW_VIRTUAL_TENSOR |
( |
|
_id, |
|
|
|
_attr, |
|
|
|
_dtype |
|
) |
| |
Value: do { \
memset(_attr.size, 0, VSI_NN_MAX_DIM_NUM *
sizeof(
vsi_size_t)); \
_attr.dim_num = VSI_NN_DIM_AUTO; \
_attr.is_const = FALSE; \
_attr.dtype.vx_type = _dtype; \
_id = vsi_nn_AddTensor(itsGraph, VSI_NN_TENSOR_ID_AUTO, & _attr, NULL); \
if (VSI_NN_TENSOR_ID_NA == _id)
LFATAL(
"NEW_VIRTUAL_TENSOR failed"); \
} while(0)
Definition at line 40 of file NetworkNPU.C.
◆ NEW_VXNODE
#define NEW_VXNODE |
( |
|
_node, |
|
|
|
_type, |
|
|
|
_in, |
|
|
|
_out, |
|
|
|
_uid |
|
) |
| |
Value: do { \
_node = vsi_nn_AddNode(itsGraph, _type, _in, _out, NULL); \
_node->uid = (uint32_t)_uid; \
if (NULL == _node)
LFATAL(
"NEW_VXNODE failed"); \
} while(0)
Definition at line 34 of file NetworkNPU.C.
◆ VNN_APP_DEBUG
#define VNN_APP_DEBUG (FALSE) |
◆ vsi_size_t
◆ vsi_ssize_t