Skip to content

Commit

Permalink
Update internal for 22Q2 release (#432)
Browse files Browse the repository at this point in the history
* Update internal for 22Q2 release

update to internal commit-id: e96103281b08404cabb9b65306587627cfa3cb93

Signed-off-by: yuenan.li <[email protected]>

* Update prebuilt for 22Q2 release

Signed-off-by: yuenan.li <[email protected]>

Co-authored-by: yuenan.li <[email protected]>
  • Loading branch information
liyuenan2333 and yuenan.li authored Jul 25, 2022
1 parent 9f331ed commit 7d88a66
Show file tree
Hide file tree
Showing 256 changed files with 28,782 additions and 26,470 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,4 @@ ASALocalRun/
# IDE
.settings/
build/
*_build/
2 changes: 1 addition & 1 deletion prebuilt-sdk/x86_64_linux/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REL/6.4.10.2
6.4.11
2 changes: 2 additions & 0 deletions prebuilt-sdk/x86_64_linux/include/VX/vx_kernels.h
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,8 @@ enum vx_kernel_e {

VX_KERNEL_NN_DECONV_3D_LAYER = VX_KERNEL_BASE(VX_ID_VIVANTE, VX_LIBRARY_KHR_BASE) + 0x31,

VX_KERNEL_STREAM_PROCESSOR = VX_KERNEL_BASE(VX_ID_VIVANTE, VX_LIBRARY_KHR_BASE) + 0x32,

VX_KERNEL_MAX_1_2, /*!< \internal Used for VX1.2 bounds checking in the conformance test. */
};

Expand Down
41 changes: 41 additions & 0 deletions prebuilt-sdk/x86_64_linux/include/VX/vx_khr_compatible.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,45 @@ VX_DECONV_3D_API_SUPPORT is used to declare that vsi openvx driver can support d
#define VX_TENSOR_STRIDE_X_BITS_SUPPORT 1
#endif

/*
VX_REMOVE_RESHAPE_SUPPORT is used to declare if graph opt support to remove reshape op, if support, it's not need to remove reshape in ovxlib.
0: not support
1: support
*/
/*
#ifndef VX_REMOVE_RESHAPE_SUPPORT
#define VX_REMOVE_RESHAPE_SUPPORT 0
#endif
*/

/*
VX_STREAM_PROCESSOR_SUPPORT is used to declare that vsi openvx driver can support vxStreamProcessorNode API
[value]
0: not support
1: support
*/
#ifndef VX_STREAM_PROCESSOR_SUPPORT
#define VX_STREAM_PROCESSOR_SUPPORT 0
#endif

/*
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL is used to declare that this tensor connect to fixed DMA channel.
[value]
0: not support
1: support
*/
#ifndef VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL
#define VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL 1
#endif

/*
VX_SCALE_EXTRA_PARAMETER_SUPPORT is used to declare that RESIZE can support align_cornor and half_pixel_center parameter
[value]
0: not support
1: support
*/
#ifndef VX_SCALE_EXTRA_PARAMETER_SUPPORT
#define VX_SCALE_EXTRA_PARAMETER_SUPPORT 1
#endif

#endif /* __VX_KHR_COMPATIBLE_H__ */
89 changes: 88 additions & 1 deletion prebuilt-sdk/x86_64_linux/include/VX/vx_khr_nn.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ enum vx_graph_attribute_internal_type_e
VX_GRAPH_AXI_SRAM_PRE_LOAD = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x2,
/*! \brief Queries a graph for its running priority (read-write. Use a <tt>\ref vx_uint32</tt> parameter. */
VX_GRAPH_PRIORITY_VALUE_VIV = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x3,
VX_GRAPH_PSI_EXTRATOR_PARAMETER = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x4,
VX_GRAPH_PSI_FILLER_PARAMETER = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x5,
VX_GRAPH_DENOISE_POSTPROCESS_PARAMETER = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x6,
VX_GRAPH_DATA_COMPRESSION_RATIO = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x7,
VX_GRAPH_ISP_EMULATION_PARAMETER = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x8,
VX_GRAPH_PROCESS_FPS = VX_ATTRIBUTE_BASE(VX_ID_VIVANTE, VX_TYPE_GRAPH) + 0x9,
};

/*! \brief Size Alignment of User Memory
Expand Down Expand Up @@ -209,7 +215,8 @@ enum vx_nn_activation_function_e
VX_NN_ACTIVATION_LEAKYRELU_MAX_POOLING = VX_ENUM_BASE(VX_ID_VIVANTE, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x4,
VX_NN_ACTIVATION_SWISH = VX_ENUM_BASE(VX_ID_VIVANTE, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x5,
VX_NN_ACTIVATION_HSWISH = VX_ENUM_BASE(VX_ID_VIVANTE, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x6,
VX_NN_ACTIVATION_NONE = VX_ENUM_BASE(VX_ID_VIVANTE, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x7,
VX_NN_ACTIVATION_CUSTOM = VX_ENUM_BASE(VX_ID_VIVANTE, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x7,
VX_NN_ACTIVATION_NONE = VX_ENUM_BASE(VX_ID_VIVANTE, VX_ENUM_NN_ACTIVATION_FUNCTION_TYPE) + 0x8,
};

/*! \brief The Convolutional network type
Expand Down Expand Up @@ -285,6 +292,59 @@ enum vx_tensor_rank_type_e
VX_TENSOR_RANK_SN,
};

/*! \brief The attribute of tensor.
* \ingroup group_tensor
* \version 0.4
*/
enum vx_tensor_priority_e
{
/*! \brief no special requirement */
VX_TENSOR_DEFAULT = 0,

/*! \brief 2nd input(reference) */
/*VX_TENSOR_2ND_INPUT_FOR = 1,*/
VX_TENSOR_FOR_GRAPH_REFERENCE = 1,
};


/*! \brief The attribute of tensor memory.
* \ingroup group_tensor
* \version 0.4
*/
enum vx_tensor_memory_attribute_e
{
/*! \brief no special requirement */
VX_TENSOR_MEMORY_DEFAULT = 0,

VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_0 = (0x1 << 0),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_1 = (0x1 << 1),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_2 = (0x1 << 2),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_3 = (0x1 << 3),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_4 = (0x1 << 4),
/*
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_5 = (0x1 << VX_DMA5_IN_ISP_OCM_PSI),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_6 = (0x1 << VX_DMA6_DDR_DECOMPRESS),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_7 = (0x1 << VX_DMA7_POSTOUT_OCM_ISP),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_8 = (0x1 << VX_DMA8_COMPRESS_DDR),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_9 = (0x1 << VX_DMA9_ISP_PATTERN_GENERATOR),
VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL_10 = (0x1 << VX_DMA10_ISP_CHECKSUM_GENERATOR),
*/
/*! \brief DMA transfer data to VIP and enable circular buffer */
#if !VX_TENSOR_MEMORY_CONNECT_DMA_CHANNEL
VX_TENSOR_MEMORY_ENABLE_CIRCULAR_BY_DMA = 0xFFFFFFFF,
#endif
};

enum vx_dma_extrator_pad_mode_e
{
/*! \brief no special requirement */
VX_DMA_EXTRATOR_PAD_CONST = 0,

/*! \brief DMA extrator pad with nearest edge */
VX_DMA_EXTRATOR_PAD_WITH_NEAREAST_EDGE = 1,
};


/*! \brief The precision of tensor.
* \ingroup group_tensor
* \version 0.4
Expand Down Expand Up @@ -601,6 +661,19 @@ VX_API_ENTRY vx_tensor VX_API_CALL vxReshapeTensor(vx_tensor tensor, vx_int32* n
*/
VX_API_ENTRY vx_status VX_API_CALL vxSetTensorAttribute(vx_tensor tensor, vx_enum attribute, const void *ptr, vx_size size);

/*! \brief Creates an opaque reference to a tensor data buffer.
* \details The tensor is a dummy tensor which will not allocate any memory. And it cannot reshape or view.
* Not guaranteed to exist until the <tt>vx_graph</tt> containing it has been verified.
* \param [in] context The reference to the implementation context.
* \param [in] number_of_dims The number of dimensions.
* \param [in] dims Dimensions sizes in elements.
* \param [in] data_format The <tt>\ref vx_type_e</tt> that represents the data format of the tensor data elements.
* \return A tensor data reference or zero when an error is encountered.
* \ingroup group_tensor
* \version 0.3
*/
VX_API_ENTRY vx_tensor VX_API_CALL vxCreateDummyTensor(vx_context context, vx_size number_of_dims, const vx_size *dims, vx_enum data_format);


/*! \brief The type enumeration lists all NN extension types.
* \ingroup group_cnn
Expand Down Expand Up @@ -1317,6 +1390,13 @@ typedef struct _vx_nn_scale_params_t
vx_enum type; /*!< \brief The interpolation type, only support VX_INTERPOLATION_BILINEAR. */
} vx_nn_scale_params_t, * vx_nn_scale_params;

typedef struct _vx_nn_scale_params_ext_t
{
vx_nn_scale_params_t base;
vx_bool align_corners;
vx_bool half_pixel_centers;
} vx_nn_scale_params_ext_t, * vx_nn_scale_params_ext;

/*! \brief [Graph] Creates a scale Layer Node.
* \param [in] graph The reference to the parent graph.
* \param [in] input The input tensor data to scale.
Expand Down Expand Up @@ -2054,8 +2134,15 @@ typedef struct _vx_hardware_caps_params_ext_t
vx_hardware_caps_params_t base;
vx_uint32 subGroupSize; /*!< \brief shader sub-group size.*/
vx_bool supportVA40; /*!< \brief support 40bit virtual address.*/
vx_uint32 supportStreamProcessor; /*!< \brief support stream processor.*/
} vx_hardware_caps_params_ext_t;

typedef struct _vx_hardware_caps_params_ext2_t
{
vx_hardware_caps_params_ext_t base;
vx_uint32 streamProcessorExecCount; /*!< \brief streamprocess execution count. */
} vx_hardware_caps_params_ext2_t;

/*! \brief Queries hardware caps information.
* \param [in] context The reference to the context.
* \param [in] hardware_caps_params <tt>\ref vx_hardware_caps_params_t </tt>.
Expand Down
9 changes: 9 additions & 0 deletions prebuilt-sdk/x86_64_linux/include/VX/vx_khr_nn_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ typedef struct _vx_nn_convolution_relu_pooling_params_ext4_t
vx_bool enable_nn_tensor_add_relu; /*!< \brief Enable Relu function after tensor add. */
} vx_nn_convolution_relu_pooling_params_ext4_t, * vx_nn_convolution_relu_pooling_params_ext4;

typedef struct _vx_nn_convolution_relu_pooling_params_ext5_t
{
vx_nn_convolution_relu_pooling_params_ext4_t ext4; /*!< \brief convolution relu pooling params <tt>\ref vx_nn_convolution_relu_pooling_params_ext_t</tt> */

vx_object_array inputs_list;
vx_object_array outputs_list;
vx_spinst spinst_obj;
} vx_nn_convolution_relu_pooling_params_ext5_t, * vx_nn_convolution_relu_pooling_params_ext5;

/*! \brief [Graph] Creates a Convolutional Network Convolution and Activation(Relu) and Pooling Layer Node, this fucntion match kronos NN Extension 1.2 verion.
* \details This function implement Convolutional Network Convolution and Activation(Relu) and Pooling layer.
* For fixed-point data types, a fixed point calculation is performed with round and saturate according to the number of accumulator bits. The number of the accumulator bits are implementation defined,
Expand Down
34 changes: 34 additions & 0 deletions prebuilt-sdk/x86_64_linux/include/VX/vx_nodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,40 @@ VX_API_ENTRY vx_node VX_API_CALL vxBatchGemmNode(vx_graph graph,
vx_scalar trans_c,
vx_tensor output);

typedef struct _vx_lut_params_s
{
vx_enum lut_function; /*!< \brief Set VX_NN_ACTIVATION_NONE to disable lut table or set VX_NN_ACTIVATION_CUSTOM to customize lut table or set others to use fixed lut table */
vx_float32 float_values[4]; /*!< \brief Float parameters of fixed lut table */
vx_uint32 fvalues_count; /*!< \brief Count of float_values */
vx_int32 int_values[4]; /*!< \brief Int parameters of fixed lut table */
vx_uint32 ivalues_count; /*!< \brief Count of int_values */
vx_lut in_lut; /*!< \brief Only valid when lut_function is VX_NN_ACTIVATION_CUSTOM */
vx_lut out_lut; /*!< \brief Only valid when lut_function is VX_NN_ACTIVATION_CUSTOM */
} vx_lut_params_s, * vx_lut_params;

/*! \brief Create a stream processor node.
* \param [in] graph The reference to the graph.
* \param [in] input_list The input tensor list.
* \param [in] input_count The input tensor count.
* \param [in] output_list The output tensor list.
* \param [in] output_count The output tensor count.
* \param [in] spinst_obj The stream processor instrunction object. Use vxCreateSPINST() to create.
* \param [in] lut_params The lut parameters. Refer to vx_lut_params_s.
* \return <tt>\ref vx_node</tt>.
* \retval vx_node A node reference. Any possible errors preventing a successful creation
* should be checked using <tt>\ref vxGetStatus</tt>
* \ingroup group_vision_function_sp
*/
VX_API_ENTRY vx_node VX_API_CALL vxStreamProcessorNode(
vx_graph graph,
vx_tensor* input_list,
vx_uint32 input_count,
vx_tensor* output_list,
vx_uint32 output_count,
vx_spinst spinst_obj,
vx_lut_params lut_params
);

#ifdef __cplusplus
}
#endif
Expand Down
Loading

0 comments on commit 7d88a66

Please sign in to comment.