Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update internal & prebuilt-sdk for 22Q3 release #500

Merged
merged 2 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified prebuilt-sdk/x86_64_linux/lib/libArchModelSw.so
Binary file not shown.
Binary file modified prebuilt-sdk/x86_64_linux/lib/libCLC.so
Binary file not shown.
Binary file modified prebuilt-sdk/x86_64_linux/lib/libEmulator.so
Binary file not shown.
Binary file modified prebuilt-sdk/x86_64_linux/lib/libGAL.so
Binary file not shown.
Binary file modified prebuilt-sdk/x86_64_linux/lib/libNNArchPerf.so
Binary file not shown.
Binary file removed prebuilt-sdk/x86_64_linux/lib/libOpenVX.so
Binary file not shown.
1 change: 1 addition & 0 deletions prebuilt-sdk/x86_64_linux/lib/libOpenVX.so
Binary file removed prebuilt-sdk/x86_64_linux/lib/libOpenVX.so.1
Binary file not shown.
1 change: 1 addition & 0 deletions prebuilt-sdk/x86_64_linux/lib/libOpenVX.so.1
Binary file modified prebuilt-sdk/x86_64_linux/lib/libOpenVX.so.1.3.0
Binary file not shown.
Binary file modified prebuilt-sdk/x86_64_linux/lib/libOpenVXC.so
Binary file not shown.
Binary file modified prebuilt-sdk/x86_64_linux/lib/libOpenVXU.so
Binary file not shown.
Binary file modified prebuilt-sdk/x86_64_linux/lib/libVSC.so
Binary file not shown.
4 changes: 4 additions & 0 deletions src/tim/vx/internal/include/interface/ops.def
Original file line number Diff line number Diff line change
Expand Up @@ -179,3 +179,7 @@ DEF_OP(SOFTSIGN)
DEF_OP(CUMSUM)
DEF_OP(MAXPOOLWITHARGMAX)
DEF_OP(MOD)
DEF_OP(LPPOOL)
DEF_OP(SCATTER_ELEMENTS)
DEF_OP(PRE_PROCESS_YUV422)
DEF_OP(BUCKETIZE)
11 changes: 11 additions & 0 deletions src/tim/vx/internal/include/kernel/vsi_nn_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,9 +326,20 @@ const void * vsi_nn_kernel_param_get_const_buffer
} \
static vsi_status NAME##_impl

#define DEF_SP_KERNEL_BASE_CALLBACK( NAME ) \
static vsi_status NAME##_impl( vsi_nn_kernel_node_t node); \
static vx_status VX_CALLBACK NAME( \
vx_node node) {\
return (vx_status)NAME##_impl( \
(vsi_nn_kernel_node_t)node); \
} \
static vsi_status NAME##_impl


#define DEF_KERNEL_INITIALIZER( NAME ) DEF_KERNEL_BASE_CALLBACK( NAME )
#define DEF_KERNEL_EXECUTOR( NAME ) DEF_KERNEL_BASE_CALLBACK( NAME )
#define DEF_KERNEL_DEINITIALIZER( NAME ) DEF_KERNEL_BASE_CALLBACK( NAME )
#define DEF_SP_KERNEL_QUERY( NAME ) DEF_SP_KERNEL_BASE_CALLBACK( NAME )

void vsi_nn_kernel_backend_register
(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,10 @@ vsi_bool vsi_nn_kernel_optimize_group_norm_shape
int32_t is_sp_kernel, vsi_size_t* out_shape
);

vsi_bool vsi_nn_kernel_optimize_scatter_elements_shape
(
const vsi_size_t* shape_x, const vsi_size_t rank_x, const int32_t axis,
vsi_size_t* out_shape_x, uint32_t* out_rank_x, int32_t* out_axis, vsi_size_t max_size
);

#endif
4 changes: 4 additions & 0 deletions src/tim/vx/internal/include/kernel/vsi_nn_kernel_lut.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ typedef int32_t vsi_nn_kernel_lut_act_e; enum
VSI_NN_KERNEL_LUT_CELU = 14,
VSI_NN_KERNEL_LUT_RCP = 15,
VSI_NN_KERNEL_LUT_SOFTSIGN = 16,
VSI_NN_KERNEL_LUT_LINEAR_EXP = 17,
VSI_NN_KERNEL_LUT_LINEAR_RSQRT = 18,
VSI_NN_KERNEL_LUT_LINEAR_SIGMOID = 19,

};

#define VSI_NN_KERNEL_LUT_MAX_SIZE (1024)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,26 @@ enum

BI_RNN_FW_INPUT_WEIGHT_I = 1,
BI_RNN_FW_INPUT_WEIGHT_H = 2,
BI_RNN_FW_INPUT_BIAS = 3,
BI_RNN_FW_INPUT_H_STATE = 4,
BI_RNN_FW_INPUT_BIAS_I = 3,
BI_RNN_FW_INPUT_BIAS_H = 4,
BI_RNN_FW_INPUT_H_STATE = 5,

BI_RNN_BW_INPUT_WEIGHT_I = 5,
BI_RNN_BW_INPUT_WEIGHT_H = 6,
BI_RNN_BW_INPUT_BIAS = 7,
BI_RNN_BW_INPUT_H_STATE = 8,
BI_RNN_BW_INPUT_WEIGHT_I = 6,
BI_RNN_BW_INPUT_WEIGHT_H = 7,
BI_RNN_BW_INPUT_BIAS_I = 8,
BI_RNN_BW_INPUT_BIAS_H = 9,
BI_RNN_BW_INPUT_H_STATE = 10,

BI_RNN_AUX_INPUT = 9,
BI_RNN_FW_AUX_INPUT_WEIGHT = 10,
BI_RNN_BW_AUX_INPUT_WEIGHT = 11,
BI_RNN_AUX_INPUT = 11,
BI_RNN_FW_AUX_INPUT_WEIGHT = 12,
BI_RNN_BW_AUX_INPUT_WEIGHT = 13,

BI_RNN_INPUT_CNT,

BI_RNN_FW_OUTPUT_OUTPUT = 0,
BI_RNN_BW_OUTPUT_OUTPUT = 1,
BI_RNN_FW_OUTPUT_H_STATE = 0,
BI_RNN_BW_OUTPUT_H_STATE = 1,
BI_RNN_FW_OUTPUT_OUTPUT = 2,
BI_RNN_BW_OUTPUT_OUTPUT = 3,
BI_RNN_OUTPUT_CNT
};

Expand Down
48 changes: 48 additions & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_bucketize.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/****************************************************************************
*
* Copyright (c) 2020 Vivante Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/

#ifndef _VSI_NN_OP_BUCKETIZE_H
#define _VSI_NN_OP_BUCKETIZE_H

#include "vsi_nn_types.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _vsi_nn_bucketize_param
{
struct _bucketize_local_data_t* local;
// Add parameters here
vsi_bool right;
} vsi_nn_bucketize_param;
_compiler_assert(offsetof(vsi_nn_bucketize_param, local) == 0, \
vsi_nn_bucketize_h );

#ifdef __cplusplus
}
#endif

#endif

1 change: 1 addition & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_conv1d.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ typedef struct _vsi_nn_conv1d_param
uint32_t group;
uint32_t dilation;
int32_t multiplier;
vsi_nn_pad_mode_e pad_mode;
} vsi_nn_conv1d_param;
_compiler_assert(offsetof(vsi_nn_conv1d_param, local) == 0, \
vsi_nn_vsi_nn_conv1d_h );
Expand Down
15 changes: 15 additions & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_conv2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,20 @@
extern "C" {
#endif

typedef struct _vsi_nn_conv2d_param_deprecate
{
uint32_t ksize[2];
uint32_t stride[2];
/* Pad left, right, top, bottom */
uint32_t pad[4];
/* Pad type default value shall be AUTO */
vsi_nn_pad_e pad_type;
uint32_t weights;
uint32_t group;
uint32_t dilation[2];
int32_t multiplier;
} vsi_nn_conv2d_param_deprecate;

typedef struct _vsi_nn_conv2d_param
{
uint32_t ksize[2];
Expand All @@ -42,6 +56,7 @@ typedef struct _vsi_nn_conv2d_param
uint32_t group;
uint32_t dilation[2];
int32_t multiplier;
vsi_nn_pad_mode_e pad_mode;
} vsi_nn_conv2d_param;

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_conv3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ typedef struct _vsi_nn_conv3d_param
int32_t weights;

int32_t multiplier;
vsi_nn_pad_mode_e pad_mode;
} vsi_nn_conv3d_param;
_compiler_assert(offsetof(vsi_nn_conv3d_param, local) == 0, \
vsi_nn_conv3d_h );
Expand Down
1 change: 1 addition & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_deconv3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ typedef struct _vsi_nn_deconv3d_param
uint32_t weights;
uint32_t group;
uint32_t output_padding[3];
vsi_nn_pad_mode_e pad_mode;
} vsi_nn_deconv3d_param;
_compiler_assert(offsetof(vsi_nn_deconv3d_param, local) == 0, \
vsi_nn_deconv3d_h );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ typedef struct _vsi_nn_depthwise_conv1d_param
uint32_t pad[2];
uint32_t dilation;
int32_t multiplier;
vsi_nn_pad_mode_e pad_mode;
} vsi_nn_depthwise_conv1d_param;

__END_DECLS
Expand Down
1 change: 1 addition & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_grouped_conv1d.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ typedef struct _vsi_nn_grouped_conv1d_param
uint32_t group;
uint32_t dilation;
int32_t multiplier;
vsi_nn_pad_mode_e pad_mode;
} vsi_nn_grouped_conv1d_param;

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_grouped_conv2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ typedef struct _vsi_nn_grouped_conv2d_param
uint32_t dilation[2];
int32_t multiplier;
void* local;
vsi_nn_pad_mode_e pad_mode;
} vsi_nn_grouped_conv2d_param;

#ifdef __cplusplus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ typedef struct _vsi_nn_l2normalizescale_lcl_data
{
vx_tensor local_tensor[_VSI_NN_L2NORMALIZESCALE_LOCAL_TENSOR_NUM];
uint32_t hash_idx;
vsi_bool execute_on_sw;
vsi_bool use_internal_node;
} vsi_nn_l2normalizescale_lcl_data;

typedef struct _vsi_nn_l2normalizescale_param
Expand Down
10 changes: 8 additions & 2 deletions src/tim/vx/internal/include/ops/vsi_nn_op_layernormalize.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,20 @@ extern "C" {

typedef struct _vsi_nn_layernorm_lcl_data
{
vx_tensor local_tensor[_VSI_NN_LAYERNORM_LOCAL_TENSOR_NUM];
vsi_bool use_internal_node;
} vsi_nn_layernorm_lcl_data;

typedef struct _vsi_nn_layernormalize_param
{
/* local data must be the first. */
vsi_nn_layernorm_lcl_data local;
union
{
vx_tensor local_tensor[_VSI_NN_LAYERNORM_LOCAL_TENSOR_NUM];
vsi_nn_layernorm_lcl_data *local;
};

float eps;
int32_t axis;
} vsi_nn_layernormalize_param;

#ifdef __cplusplus
Expand Down
46 changes: 46 additions & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_lppool.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/****************************************************************************
*
* Copyright (c) 2020 Vivante Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/

#ifndef _VSI_NN_OP_LPPOOL_H
#define _VSI_NN_OP_LPPOOL_H

#include "vsi_nn_types.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _vsi_nn_lppool_param {
vsi_nn_pad_e pad_type;
uint32_t ksize[2];
int32_t p;
uint32_t pad[4];
uint32_t stride[2];
} vsi_nn_lppool_param;

#ifdef __cplusplus
}
#endif

#endif
7 changes: 0 additions & 7 deletions src/tim/vx/internal/include/ops/vsi_nn_op_pad.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
extern "C" {
#endif

typedef enum {
VSI_NN_PAD_MODE_CONSTANT,
VSI_NN_PAD_MODE_REPLICATE,
VSI_NN_PAD_MODE_SYMMETRIC,
VSI_NN_PAD_MODE_REFLECT,
}vsi_nn_pad_mode_e;

typedef struct _vsi_nn_pad_param
{
const uint32_t * front_size;
Expand Down
81 changes: 81 additions & 0 deletions src/tim/vx/internal/include/ops/vsi_nn_op_pre_process_yuv422.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/****************************************************************************
*
* Copyright (c) 2020 Vivante Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
*****************************************************************************/

#ifndef _VSI_NN_OP_PRE_PROCESS_YUV422_H
#define _VSI_NN_OP_PRE_PROCESS_YUV422_H

#include "vsi_nn_types.h"

#ifdef __cplusplus
extern "C" {
#endif

#define _VSI_NN_PRE_PROCESS_YUV422_LOCAL_TENSOR_NUM 2

typedef struct _vsi_nn_pre_process_yuv422_lcl_data
{
int32_t scale_x;
int32_t scale_y;
vsi_bool enable_copy;
vsi_bool enable_perm;
vx_tensor local_tensor[_VSI_NN_PRE_PROCESS_YUV422_LOCAL_TENSOR_NUM];
} vsi_nn_pre_process_yuv422_lcl_data;

typedef struct _vsi_nn_pre_process_yuv422_param
{
vsi_nn_pre_process_yuv422_lcl_data* local;

vsi_nn_yuv_type yuv422_type;

struct
{
uint32_t left;
uint32_t top;
uint32_t width;
uint32_t height;
} rect;

struct
{
vsi_size_t *size;
uint32_t dim_num;
} output_attr;

uint32_t * perm;
uint32_t dim_num;

float r_mean;
float g_mean;
float b_mean;
float rgb_scale;

vsi_bool reverse_channel;
} vsi_nn_pre_process_yuv422_param;

#ifdef __cplusplus
}
#endif

#endif

Loading