Skip to content

Commit

Permalink
Update internal to 1.1.37_preview (#254)
Browse files Browse the repository at this point in the history
* update internal to V1.1.37

Signed-off-by: xiang.zhang <[email protected]>

* Update VSimulator V6.4.9 for linux x86_64

Signed-off-by: xiang.zhang <[email protected]>
  • Loading branch information
sunshinemyson authored Jan 9, 2022
1 parent 7c63ba6 commit ed47c5c
Show file tree
Hide file tree
Showing 290 changed files with 14,689 additions and 2,899 deletions.
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.8
REL/6.4.9
109 changes: 51 additions & 58 deletions prebuilt-sdk/x86_64_linux/include/CL/cl_viv_vx_ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,75 +349,74 @@ enum eVXC_ERROR
#define VXC_OP1(Op, Dest, Src0) _viv_asm(INTRINSIC, Dest, VXC_OP_##Op, Src0)

#define VXC_OP2(Op, Dest, Src0, Src1) \
do { \
{ \
int _t1; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(INTRINSIC, Dest, VXC_OP_##Op, _t1); \
} while(0)
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(INTRINSIC, Dest, VXC_OP_##Op, _t1); \
}

#define VXC_OP3(Op, Dest, Src0, Src1, Src2) \
do { \
{ \
int _t1, _t2; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(PARAM_CHAIN, _t2, _t1, Src2); \
_viv_asm(INTRINSIC, Dest, VXC_OP_##Op, _t2); \
} while(0)
}

#define VXC_OP3_NoDest(Op, Src0, Src1, Src2) \
do { \
{ \
int _t1, _t2, _t3; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(PARAM_CHAIN, _t2, _t1, Src2); \
_viv_asm(INTRINSIC_ST, _t3, VXC_OP_##Op, _t2); \
} while(0)

}

#define VXC_OP4(Op, Dest, Src0, Src1, Src2, Src3) \
do { \
{ \
int _t1, _t2, _t3; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(PARAM_CHAIN, _t2, _t1, Src2); \
_viv_asm(PARAM_CHAIN, _t3, _t2, Src3); \
_viv_asm(INTRINSIC, Dest, VXC_OP_##Op, _t3); \
} while(0)
}

#define VXC_OP4_NoDest(Op, Src0, Src1, Src2, Src3) \
do { \
{ \
int _t1, _t2, _t3, _t4; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(PARAM_CHAIN, _t2, _t1, Src2); \
_viv_asm(PARAM_CHAIN, _t3, _t2, Src3); \
_viv_asm(INTRINSIC_ST, _t4, VXC_OP_##Op, _t3); \
} while(0)
}

#define VXC_OP4_ST(Op, Dest, Src0, Src1, Src2, Src3) \
do { \
{ \
int _t1, _t2, _t3; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(PARAM_CHAIN, _t2, _t1, Src2); \
_viv_asm(PARAM_CHAIN, _t3, _t2, Src3); \
_viv_asm(INTRINSIC_ST, Dest, VXC_OP_##Op, _t3);\
} while(0)
}

#define VXC_OP5(Op, Dest, Src0, Src1, Src2, Src3, Src4) \
do { \
{ \
int _t1, _t2, _t3, _t4; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(PARAM_CHAIN, _t2, _t1, Src2); \
_viv_asm(PARAM_CHAIN, _t3, _t2, Src3); \
_viv_asm(PARAM_CHAIN, _t4, _t3, Src4); \
_viv_asm(INTRINSIC, Dest, VXC_OP_##Op, _t4); \
} while(0)
}

#define VXC_OP5_NoDest(Op, Src0, Src1, Src2, Src3, Src4) \
do { \
{ \
int _t1, _t2, _t3, _t4, _t5; \
_viv_asm(PARAM_CHAIN, _t1, Src0, Src1); \
_viv_asm(PARAM_CHAIN, _t2, _t1, Src2); \
_viv_asm(PARAM_CHAIN, _t3, _t2, Src3); \
_viv_asm(PARAM_CHAIN, _t4, _t3, Src4); \
_viv_asm(INTRINSIC_ST, _t5, VXC_OP_##Op, _t4); \
} while(0)
}

/* make sure the immediate value offsetX and offsetY are in range of [-16, 15] */
#define VXC_5BITOFFSET_XY(offsetX, offsetY) ((((offsetY) & 0x1F) << 5) | ((offsetX) & 0x1F))
Expand Down Expand Up @@ -515,41 +514,34 @@ enum eVXC_ERROR
* Offset should be composed by using VXC_5BITOFFSET_XY(x, y)
* Coord must be type of int4 or float4
*/
#define VXC_ReadImage2DArray(Dest, Image, Coord, Offset, Info) \
do { \
int8 desc; \
_viv_asm(COPY, desc, Image, sizeof(desc)); \
_viv_asm(CLAMP0MAX, (Coord).w, (Coord).z, desc.s5 - 1); \
int baseAddr = (int)(Coord).w *desc.s4 + desc.s0; \
_viv_asm(MOV, (Coord).w, baseAddr); \
VXC_OP4(img_load_3d, Dest, Image, (Coord).xyww, Offset, Info); \
} while (0)
#define VXC_WriteImage2DArray(Image, Coord, Color, Info) \
do { \
int8 desc; \
_viv_asm(COPY, desc, Image, sizeof(desc)); \
_viv_asm(CLAMP0MAX, (Coord).w, (Coord).z, desc.s5 - 1); \
int baseAddr = (int)(Coord).w *(desc).s4 + desc.s0; \
_viv_asm(MOV, (Coord).w, baseAddr); \
VXC_OP4_NoDest(img_store_3d, Image, (Coord).xyww, Color, Info); \
} while (0)

/* image load/store for image3d_t,
* offset should be composed by using VXC_5BITOFFSET_XY(x, y)
* Coord must be type of int4 or float4
*/
#define VXC_ReadImage3D(Dest, Image, Coord, Offset, Info) VXC_OP4(img_read_3d, Dest, Image, Coord, Offset, Info)
#define VXC_WriteImage3D(Image, Coord, Color, Info) VXC_OP4_NoDest(img_write_3d, Image, Coord, Color, Info)

#define VXC_Vload2(Dest, Pointer, Offset) do { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload2, Dest, Pointer, byteOffset); } while(0)
#define VXC_Vload4(Dest, Pointer, Offset) do { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload4, Dest, Pointer, byteOffset); } while(0)
#define VXC_Vload8(Dest, Pointer, Offset) do { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload8, Dest, Pointer, byteOffset); } while(0)
#define VXC_Vload16(Dest, Pointer, Offset) do { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload16, Dest, Pointer, byteOffset); } while(0)

#define VXC_Vstore2(Pointer, Offset, Data) do { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore2, Pointer, byteOffset, Data); } while(0)
#define VXC_Vstore4(Pointer, Offset, Data) do { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore4, Pointer, byteOffset, Data); } while(0)
#define VXC_Vstore8(Pointer, Offset, Data) do { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore8, Pointer, byteOffset, Data); } while(0)
#define VXC_Vstore16(Pointer, Offset, Data) do { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore16, Pointer, byteOffset, Data); } while(0)
#define VXC_ReadImage2DArray(Dest, Image, OrigCoord, Offset, Info) \
{ \
int8 desc; \
int4 tempCoord = (int4)(OrigCoord.xyzz); \
_viv_asm(COPY, desc, Image, sizeof(desc)); \
_viv_asm(CLAMP0MAX, tempCoord.z, tempCoord.z, desc.s5 - 1); \
tempCoord.z = tempCoord.z *desc.s4 + desc.s0; \
VXC_OP4(img_load_3d, Dest, Image, tempCoord, Offset, Info); \
}
#define VXC_WriteImage2DArray(Image, OrigCoord, Color, Info) \
{ \
int8 desc; \
int4 tempCoord = (int4)(OrigCoord.xyzz); \
_viv_asm(COPY, desc, Image, sizeof(desc)); \
_viv_asm(CLAMP0MAX, tempCoord.z, tempCoord.z, desc.s5 - 1); \
tempCoord.z = tempCoord.z *desc.s4 + desc.s0; \
VXC_OP4_NoDest(img_store_3d, Image, tempCoord, Color, Info); \
}

#define VXC_Vload2(Dest, Pointer, Offset) { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload2, Dest, Pointer, byteOffset); }
#define VXC_Vload4(Dest, Pointer, Offset) { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload4, Dest, Pointer, byteOffset); }
#define VXC_Vload8(Dest, Pointer, Offset) { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload8, Dest, Pointer, byteOffset); }
#define VXC_Vload16(Dest, Pointer, Offset) { int byteOffset = ((int)sizeof((Dest)))*(Offset); VXC_OP2(vload16, Dest, Pointer, byteOffset); }

#define VXC_Vstore2(Pointer, Offset, Data) { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore2, Pointer, byteOffset, Data); }
#define VXC_Vstore4(Pointer, Offset, Data) { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore4, Pointer, byteOffset, Data); }
#define VXC_Vstore8(Pointer, Offset, Data) { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore8, Pointer, byteOffset, Data); }
#define VXC_Vstore16(Pointer, Offset, Data) { int byteOffset = ((int)sizeof((Data)))*(Offset); VXC_OP3_NoDest(vstore16, Pointer, byteOffset, Data); }

/* VX2 only instructions*/
#define VXC_IndexAdd(Dest, Src0, Src1, Src2, Info) VXC_OP4(index_add, Dest, Src0, Src1, Src2, Info)
Expand All @@ -562,7 +554,7 @@ enum eVXC_ERROR

#if (VX_VERSION == 2)
#define VXC_BiLinear(Dest, Src0, Src1, Src2, Info) \
do { \
{ \
int endBin = ((Info) & VXC_END_BIN_BITMASK) >> 8; \
int roundMode = ((Info) & VXC_ROUNDING_MODE_BITMASK) >> 2; \
int clamp = ((Info) & VXC_CLAMP_BITMASK) >> 22; \
Expand All @@ -576,7 +568,7 @@ enum eVXC_ERROR
_viv_asm(PARAM_CHAIN, bi4, bi3, 8); \
_viv_asm(INTRINSIC, bi2, OP_bit_extract, bi4); \
VXC_Lerp(Dest, bi2!<f:UCHAR>, bi2.y!<f:UCHAR>, (Src2).x, Info); \
} while (0)
}

#define VXC_BitReplace(Dest, Src0, Src1, Src2, Info) /* BitReplace definition here */
#define VXC_IAdd(Dest, Src0, Src1, Src2, Info) /* IAdd definition here */
Expand All @@ -592,7 +584,8 @@ enum eVXC_ERROR
#define VXC_Filter_Max(Dest, Src0, Src1, Src2, Info) /* Max filter definition here */
#define VXC_Filter_Min(Dest, Src0, Src1, Src2, Info) /* Min filter definition here */
#define VXC_Filter_Median(Dest, Src0, Src1, Src2, Info) /* Median filter definition here */
#define VXC_Filter(Dest, Src0, Src1, Src2, Info) do { \
#define VXC_Filter(Dest, Src0, Src1, Src2, Info) \
{ \
int filter = (((Info) >> 16)&0x0F); \
if (filter == VXC_FM_BOX) { VXC_Filter_Box(Dest, Src0, Src1, Src2, Info); } \
if (filter == VXC_FM_Guassian) { VXC_Filter_Guassian(Dest, Src0, Src1, Src2, Info); } \
Expand All @@ -603,7 +596,7 @@ enum eVXC_ERROR
if (filter == VXC_FM_Max) { VXC_Filter_Max(Dest, Src0, Src1, Src2, Info); } \
if (filter == VXC_FM_Min) { VXC_Filter_Min(Dest, Src0, Src1, Src2, Info); } \
if (filter == VXC_FM_Median) { VXC_Filter_Median(Dest, Src0, Src1, Src2, Info); } \
} while (0)
}

#else /* VX1 */

Expand Down
7 changes: 6 additions & 1 deletion prebuilt-sdk/x86_64_linux/include/VX/viv_nn_compatibility.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ vxCreateTensor_11(
vx_enum data_format,
vx_int8 fixed_point_pos
);
#if !VX_VA40_EXT_SUPPORT
#define vxCreateTensor vxCreateTensor_11
#endif

/* keep the backward compatibility with spec 1.1 for vxCreateVirtualTensor */
VX_API_ENTRY vx_tensor VX_API_CALL
Expand All @@ -108,8 +110,11 @@ vxCreateVirtualTensor_11(
vx_uint32 *sizes,
vx_enum data_format,
vx_int8 fixed_point_pos
);
);

#if !VX_VA40_EXT_SUPPORT
#define vxCreateVirtualTensor vxCreateVirtualTensor_11
#endif

/* keep the backward compatibility with spec 1.1 for vxCreateTensorFromView */
VX_API_ENTRY vx_tensor VX_API_CALL
Expand Down
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 @@ -496,6 +496,8 @@ enum vx_kernel_e {

VX_KERNEL_NN_BATCH_GEMM = VX_KERNEL_BASE(VX_ID_VIVANTE, VX_LIBRARY_KHR_BASE) + 0x2F,

VX_KERNEL_NN_CONV_3D_LAYER = VX_KERNEL_BASE(VX_ID_VIVANTE, VX_LIBRARY_KHR_BASE) + 0x30,

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

Expand Down
46 changes: 46 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 @@ -33,91 +33,137 @@
0: weight_layout is whnc
1: weight_layout is whcn
*/
#ifndef VX_DECONVOLUTION_WEIGHT_LAYOUT_COMPATIBLE_KHRONOS
#define VX_DECONVOLUTION_WEIGHT_LAYOUT_COMPATIBLE_KHRONOS 1
#endif
/*
VX_CONVERT_POLICY_WRAP_ENABLE is used to differentiate two overflow_policys(VX_CONVERT_POLICY_WRAP and VX_CONVERT_POLICY_SAT)
[value]
0: both overflow_policys considered as VX_CONVERT_POLICY_SAT
1: overflow_policy is determined by arguments.
*/
#ifndef VX_CONVERT_POLICY_WRAP_ENABLE
#define VX_CONVERT_POLICY_WRAP_ENABLE 1
#endif

#ifndef VX_13_NN_COMPATIBLITY
#define VX_13_NN_COMPATIBLITY 1
#endif
/*
VX_L2NORM_AXIS_PARAMETER_SUPPORT is used to declare that L2NORMALIZE can support axis parameter
[value]
0: not support
1: support
*/
#ifndef VX_L2NORM_AXIS_PARAMETER_SUPPORT
#define VX_L2NORM_AXIS_PARAMETER_SUPPORT 1
#endif
/*
VX_SOFTMAX_AXIS_PARAMETER_SUPPORT is used to declare that SOFTAMX can support axis parameter
[value]
0: not support
1: support
*/
#ifndef VX_SOFTMAX_AXIS_PARAMETER_SUPPORT
#define VX_SOFTMAX_AXIS_PARAMETER_SUPPORT 1
#endif
/*
VX_NORMALIZATION_AXIS_PARAMETER_SUPPORT is used to declare that NORMALIZATION can support axis parameter
[value]
0: not support
1: support
*/
#ifndef VX_NORMALIZATION_AXIS_PARAMETER_SUPPORT
#define VX_NORMALIZATION_AXIS_PARAMETER_SUPPORT 1
#endif
/*
VX_ACTIVATION_EXT_SUPPORT is used to declare that ACTIVATION can support swish and hswish
[value]
0: not support
1: support
*/
#ifndef VX_ACTIVATION_EXT_SUPPORT
#define VX_ACTIVATION_EXT_SUPPORT 1
#endif

/*
VX_HARDWARE_CAPS_PARAMS_EXT_SUPPORT is used to query more hardware parameter such as shader sub-group size.
[value]
0: not support
1: support
*/
#ifndef VX_HARDWARE_CAPS_PARAMS_EXT_SUPPORT
#define VX_HARDWARE_CAPS_PARAMS_EXT_SUPPORT 1
#endif

/*
VX_VA40_EXT_SUPPORT is used to declare that openvx can support VA40.
[value]
0: not support
1: support
*/
#ifndef VX_VA40_EXT_SUPPORT
#define VX_VA40_EXT_SUPPORT 0
#endif

/*
VX_USER_LOOKUP_TABLE_SUPPORT is used to declare that openvx can support user lookuptable.
[value]
0: not support
1: support
*/
#ifndef VX_USER_LOOKUP_TABLE_SUPPORT
#define VX_USER_LOOKUP_TABLE_SUPPORT 1
#endif

/*
VX_PRELOAD_CONST_TENSOR_SUPPORT is used to declare that openvx can support preload weight/bias and const tensor
[value]
0: not support
1: support(NN conv and TP FC weightbias, and SH const tensor)
*/
#ifndef VX_PRELOAD_CONST_TENSOR_SUPPORT
#define VX_PRELOAD_CONST_TENSOR_SUPPORT 1
#endif

/*
VX_CREATE_TENSOR_SUPPORT_PHYSICAL is used to declare that openvx can support physical address for vxCreateTensorFromHandle
[value]
0: not support
1: support
*/
#ifndef VX_CREATE_TENSOR_SUPPORT_PHYSICAL
#define VX_CREATE_TENSOR_SUPPORT_PHYSICAL 1
#endif

/*
VX_GRAPH_PREEMPTION_SUPPORT is used to declare that openvx can support different graph preemption function.
[value]
0: not support
1: support
*/
#ifndef VX_GRAPH_PREEMPTION_SUPPORT
#define VX_GRAPH_PREEMPTION_SUPPORT 1
#endif

/*
VX_BATCH_GEMM_API_SUPPORT is used to declare that vsi openvx driver can support vxBatchGemmNode API to transform gemm to convolution
[value]
0: not support
1: support
*/
#ifndef VX_BATCH_GEMM_API_SUPPORT
#define VX_BATCH_GEMM_API_SUPPORT 1
#endif

/*
VX_CONV_3D_API_SUPPORT is used to declare that vsi openvx driver can support conv3d by vxConv3dLayer API.
[value]
0: not support
1: support
*/
#ifndef VX_CONV_3D_API_SUPPORT
#define VX_CONV_3D_API_SUPPORT 1
#endif

#endif /* __VX_KHR_COMPATIBLE_H__ */
Loading

0 comments on commit ed47c5c

Please sign in to comment.