29 #ifndef _VX_KHR_CNN_H_
30 #define _VX_KHR_CNN_H_
44 #define OPENVX_KHR_CNN "vx_khr_cnn"
46 #if defined(OPENVX_CNN_1_0)
75 VX_CONTEXT_MAX_CONVOLUTIONAL_NETWORK_ACCUMULATION_BITS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x1
77 VX_CONTEXT_MIN_CONVOLUTIONAL_NETWORK_ACCUMULATION_BITS = VX_ATTRIBUTE_BASE(VX_ID_KHRONOS, VX_TYPE_CONTEXT) + 0x2
163 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_LOGISTIC = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x0,
164 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_HYPERBOLIC_TAN = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x1,
165 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_RELU = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x2,
166 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_BRELU = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x3,
167 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_SOFTRELU = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x4,
168 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_ABS = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x5,
169 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_SQUARE = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x6,
170 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_SQRT = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x7,
171 VX_CONVOLUTIONAL_NETWORK_ACTIVATION_LINEAR = VX_ENUM_BASE(VX_ID_KHRONOS, VX_ENUM_CONVOLUTIONAL_NETWORK_ACTIVATION_FUNC) + 0x8,
189 VX_API_ENTRY
vx_tensor VX_API_CALL
vxCreateTensor(vx_context context, vx_uint32 num_of_dims, vx_uint32 *sizes, vx_enum data_format,vx_uint8 fixed_point_pos);
237 VX_API_ENTRY
vx_tensor VX_API_CALL
vxCreateVirtualTensor(vx_graph graph, vx_uint32 num_of_dims, vx_uint32 *sizes, vx_enum data_format, vx_uint8 fixed_point_pos);
283 VX_API_ENTRY vx_status VX_API_CALL
vxQueryTensor(
vx_tensor tensor, vx_enum attribute,
void *ptr, vx_size size);
307 VX_API_ENTRY
vx_tensor_view VX_API_CALL
vxCreateTensorView(vx_context context, vx_uint32 *view_array_start, vx_uint32 * view_array_end, vx_uint8 numViewDimensions);
391 vx_uint8 accumulator_bits,
392 vx_enum overflow_policy,
393 vx_enum rounding_policy,
394 vx_enum down_scale_size_rounding,
434 vx_uint8 accumulator_bits,
435 vx_enum overflow_policy,
436 vx_enum rounding_policy,
437 vx_enum down_scale_size_rounding,
463 vx_uint32 pool_size_x,
464 vx_uint32 pool_size_y,
465 vx_uint32 pool_pad_x,
466 vx_uint32 pool_pad_y,
vx_node vxPoolingLayer(vx_graph graph, vx_tensor inputs, vx_enum pool_type, vx_uint32 pool_size_x, vx_uint32 pool_size_y, vx_uint32 pool_pad_x, vx_uint32 pool_pad_y, vx_enum rounding, vx_tensor outputs)
[Graph] Creates a Convolutional Network Pooling Layer Node.
vx_node vxFullyConnectedLayer(vx_graph graph, vx_tensor inputs, vx_tensor weights, vx_tensor biases, vx_uint32 pad, vx_uint8 accumulator_bits, vx_enum overflow_policy, vx_enum rounding_policy, vx_enum down_scale_size_rounding, vx_tensor outputs)
[Graph] Creates a Fully connected Convolutional Network Layer Node.
vx_node vxSoftmaxLayer(vx_graph graph, vx_tensor inputs, vx_tensor outputs)
[Graph] Creates a Convolutional Network Softmax Layer Node.
vx_tensor_view vxCreateTensorView(vx_context context, vx_uint32 *view_array_start, vx_uint32 *view_array_end, vx_uint8 numViewDimensions)
Create an opaque reference to a tensor view object.
vx_tensor_addressing vxCreateTensorAddressing(vx_context context, vx_uint32 *addressing_array_dimension, vx_uint32 *addressing_array_stride, vx_uint8 numViewDimensions)
Create an opaque reference to a tensor addressing object.
normalization is done on same IFM
vx_object_array vxCreateImageObjectArrayFromTensor(vx_tensor tensor, vx_rectangle_t rect, vx_uint32 array_size, vx_uint32 stride, vx_df_image image_format)
Creates an array of images into the multi-dimension data, this can be a adjacent 2D images or not dep...
vx_status vxReleaseTensorView(vx_tensor_view *tensor_view)
Releases a reference to a tensor data view object. The object may not be garbage collected until its ...
vx_convolutional_network_pooling_type_e
The Convolutional Network pooling type list.
vx_convolutional_network_activation_func_e
The Convolutional Network activation functions list.
vx_convolutional_network_norm_type_e
The Convolutional Network normalization type list.
vx_tensor_attribute_e
tensor Data attributes.
vx_status vxQueryTensor(vx_tensor tensor, vx_enum attribute, void *ptr, vx_size size)
Retrieves various attributes of a tensor data.
vx_convolutional_networks_rounding_type_e
The Convolutional Network down scaling size rounding type list.
fixed point position when the input element type is int16.
vx_node vxTensorAddNode(vx_graph graph, vx_tensor in1, vx_tensor in2, vx_enum policy, vx_tensor out)
[Graph] Performs arithmetic addition on element values in the input tensor data's.
vx_status vxReleaseTensor(vx_tensor *tensor)
Releases a reference to a tensor data object. The object may not be garbage collected until its total...
vx_tensor vxCreateTensorFromView(vx_tensor tensor, vx_tensor_view view)
Creates a tensor data from another tensor data given a view. This second reference refers to the data...
vx_tensor vxCreateTensor(vx_context context, vx_uint32 num_of_dims, vx_uint32 *sizes, vx_enum data_format, vx_uint8 fixed_point_pos)
Creates an opaque reference to a tensor data buffer.
struct _vx_tensor_addressing_t * vx_tensor_addressing
The addressing of a tensor view patch structure is used by the Host only to address elements in a ten...
vx_node vxTensorTableLookupNode(vx_graph graph, vx_tensor in1, vx_lut lut, vx_tensor out)
[Graph] Performs LUT on element values in the input tensor data's.
Normalization is done across different IFMs.
struct _vx_tensor_view_t * vx_tensor_view
The multi dimensional view data structure.
tensor Data max num of dimensions supported by HW.
vx_node vxTensorTransposeNode(vx_graph graph, vx_tensor in, vx_tensor out, vx_uint32 dim1, vx_uint32 dim2)
[Graph] Performs transpose on the input tensor. The node transpose the tensor according to a specifie...
vx_status vxCopyTensorPatch(vx_tensor tensor, vx_tensor_view view, vx_tensor_addressing user_addr, void *user_ptr, vx_enum usage, vx_enum user_mem_type)
Allows the application to copy a view patch from/into an tensor object .
vx_node vxTensorMultiplyNode(vx_graph graph, vx_tensor in1, vx_tensor in2, vx_scalar scale, vx_enum overflow_policy, vx_enum rounding_policy, vx_tensor out)
[Graph] Performs element wise multiplications on element values in the input tensor data's with a sca...
vx_node vxConvolutionLayer(vx_graph graph, vx_tensor inputs, vx_tensor weights, vx_tensor biases, vx_uint32 pad_x, vx_uint32 pad_y, vx_uint8 accumulator_bits, vx_enum overflow_policy, vx_enum rounding_policy, vx_enum down_scale_size_rounding, vx_tensor outputs)
[Graph] Creates a Convolutional Network Convolution Layer Node.
vx_node vxActivationLayer(vx_graph graph, vx_tensor inputs, vx_enum func, vx_int32 a, vx_int32 b, vx_tensor outputs)
[Graph] Creates a Convolutional Network Activation Layer Node.
vx_node vxTensorSubtractNode(vx_graph graph, vx_tensor in1, vx_tensor in2, vx_enum policy, vx_tensor out)
[Graph] Performs arithmetic subtraction on element values in the input tensor data's.
struct _vx_tensor_t * vx_tensor
The multidimensional data object (Tensor).
vx_node vxNormalizationLayer(vx_graph graph, vx_tensor inputs, vx_enum type, vx_uint32 norm_size, vx_float32 alpha, vx_float32 beta, vx_tensor outputs)
[Graph] Creates a Convolutional Network Normalization Layer Node.
vx_status vxReleaseTensorAddressing(vx_tensor_addressing *tensor_addr)
Releases a reference to a tensor data addressing object. The object may not be garbage collected unti...
vx_context_attribute_e
A list of context attributes.
tensor Data element data type. vx_type_e
vx_tensor vxCreateVirtualTensor(vx_graph graph, vx_uint32 num_of_dims, vx_uint32 *sizes, vx_enum data_format, vx_uint8 fixed_point_pos)
Creates an opaque reference to a tensor data buffer with no direct user access. This function allows ...