TI Deep Learning Library User Guide
itidl_ti.h
Go to the documentation of this file.
1 /*
2 *
3 * Copyright (c) {2015 - 2020} Texas Instruments Incorporated
4 *
5 * All rights reserved not granted herein.
6 *
7 * Limited License.
8 *
9 * Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive
10 * license under copyrights and patents it now or hereafter owns or controls to make,
11 * have made, use, import, offer to sell and sell ("Utilize") this software subject to the
12 * terms herein. With respect to the foregoing patent license, such license is granted
13 * solely to the extent that any such patent is necessary to Utilize the software alone.
14 * The patent license shall not apply to any combinations which include this software,
15 * other than combinations with devices manufactured by or for TI ("TI Devices").
16 * No hardware patent is licensed hereunder.
17 *
18 * Redistributions must preserve existing copyright notices and reproduce this license
19 * (including the above copyright notice and the disclaimer and (if applicable) source
20 * code license limitations below) in the documentation and/or other materials provided
21 * with the distribution
22 *
23 * Redistribution and use in binary form, without modification, are permitted provided
24 * that the following conditions are met:
25 *
26 * * No reverse engineering, decompilation, or disassembly of this software is
27 * permitted with respect to any software provided in binary form.
28 *
29 * * any redistribution and use are licensed by TI for use only with TI Devices.
30 *
31 * * Nothing shall obligate TI to provide you with source code for the software
32 * licensed and provided to you in object code.
33 *
34 * If software source code is provided to you, modification and redistribution of the
35 * source code are permitted provided that the following conditions are met:
36 *
37 * * any redistribution and use of the source code, including any resulting derivative
38 * works, are licensed by TI for use only with TI Devices.
39 *
40 * * any redistribution and use of any object code compiled from the source code
41 * and any resulting derivative works, are licensed by TI for use only with TI Devices.
42 *
43 * Neither the name of Texas Instruments Incorporated nor the names of its suppliers
44 *
45 * may be used to endorse or promote products derived from this software without
46 * specific prior written permission.
47 *
48 * DISCLAIMER.
49 *
50 * THIS SOFTWARE IS PROVIDED BY TI AND TI'S LICENSORS "AS IS" AND ANY EXPRESS
51 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
52 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
53 * IN NO EVENT SHALL TI AND TI'S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT,
54 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
55 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
56 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
57 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
58 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
59 * OF THE POSSIBILITY OF SUCH DAMAGE.
60 *
61 */
62 
63 
74 #ifndef ITIDL_H_
75 #define ITIDL_H_
76 
77 #define USE_IVISION (1)
78 
79 #include <stdint.h>
80 #include <stdarg.h>
81 #include <stdlib.h>
82 
83 #ifdef TIDL_IMPORT_TOOL
84 #define USE_IVISION (0)
85 #endif
86 
87 #if USE_IVISION
88 #include <ivision.h>
89 
90 
91 
95 extern const IVISION_Fxns TIDL_VISION_FXNS;
96 
97 #endif
98 #ifdef __cplusplus
99 extern "C" {
100 #endif
101 
102 #define TIDL_NUM_MAX_LAYERS ((int32_t) 1024)
103 #define TIDL_NUM_IN_BUFS ((int32_t) 16)
104 #define TIDL_NUM_OUT_BUFS ((int32_t) 16)
105 #define TIDL_STRING_SIZE ((int32_t) 512)
106 #define TIDL_MAX_DATA_BUFS ((int32_t) 1024)
107 #define TIDL_MAX_ALG_IN_BUFS ((int32_t) 32)
108 #define TIDL_MAX_ALG_OUT_BUFS ((int32_t) 32)
109 #define TIDL_MAX_NUM_GROUPS ((int32_t) 64)
110 
111 
112 /* Typedef for 32 bit float */
113 typedef float float32_tidl;
114 /* Typedef for 64 bit float */
115 typedef double float64_tidl;
116 
125 #define TIDL_DataLayer ((int32_t) 0)
126 #define TIDL_ConvolutionLayer ((int32_t) 1)
127 #define TIDL_PoolingLayer ((int32_t) 2)
128 #define TIDL_ReLULayer ((int32_t) 3)
129 #define TIDL_PReLULayer ((int32_t) 4)
130 #define TIDL_EltWiseLayer ((int32_t) 5)
131 #define TIDL_InnerProductLayer ((int32_t) 6)
132 #define TIDL_SoftMaxLayer ((int32_t) 7)
133 #define TIDL_BatchNormLayer ((int32_t) 8)
134 #define TIDL_BiasLayer ((int32_t) 9)
135 #define TIDL_ScaleLayer ((int32_t) 10)
136 #define TIDL_Deconv2DLayer ((int32_t) 11)
137 #define TIDL_ConcatLayer ((int32_t) 12)
138 #define TIDL_SplitLayer ((int32_t) 13)
139 #define TIDL_SliceLayer ((int32_t) 14)
140 #define TIDL_CropLayer ((int32_t) 15)
141 #define TIDL_FlattenLayer ((int32_t) 16)
142 #define TIDL_DropOutLayer ((int32_t) 17)
143 #define TIDL_ArgMaxLayer ((int32_t) 18)
144 #define TIDL_DetectionOutputLayer ((int32_t) 19)
145 #define TIDL_ShuffleChannelLayer ((int32_t) 20)
146 #define TIDL_ResizeLayer ((int32_t) 21)
147 #define TIDL_RoiPoolingLayer ((int32_t) 22)
148 #define TIDL_OdPostProcessingLayer ((int32_t) 23)
149 #define TIDL_DepthToSpaceLayer ((int32_t) 24)
150 #define TIDL_SigmoidLayer ((int32_t) 25)
151 #define TIDL_PadLayer ((int32_t) 26)
152 #define TIDL_ColorConversionLayer ((int32_t) 27)
153 #define TIDL_TfODOutputLayer ((int32_t) 28)
154 #define TIDL_CustomLayer ((int32_t) 29)
155 #define TIDL_UnsupportedLayer ((int32_t) 30)
156 /* @} */
157 
166 #define TIDL_UnsignedChar ((int32_t) 0)
167 #define TIDL_SignedChar ((int32_t) 1)
168 #define TIDL_UnsignedShort ((int32_t) 2)
169 #define TIDL_SignedShort ((int32_t) 3)
170 #define TIDL_UnsignedWord ((int32_t) 4)
171 #define TIDL_SignedWord ((int32_t) 5)
172 #define TIDL_SinglePrecFloat ((int32_t) 6)
173 /* @} */
174 
185 #define TIDL_QuantStyleFixed ((int32_t) 0)
186 
188 #define TIDL_QuantStyleDynamic ((int32_t) 1)
189 
191 #define TIDL_QuantStyleNP2Fixed ((int32_t) 2)
192 
194 #define TIDL_QuantStyleP2Dynamic ((int32_t) 3)
195 
196 #define TIDL_QuantStyleCustom ((int32_t) 10)
197 /* @} */
198 
211 #define TIDL_CalibOptionActivationRange ((int32_t) 1)
212 
216 #define TIDL_CalibOptionWeightRange ((int32_t) 2)
217 
218 #define TIDL_CalibOptionBiasCalibration ((int32_t) 4)
219 
222 #define TIDL_CalibOptionPerChannelWeightQuantization ((int32_t) 8)
223 
228 #define TIDL_CalibOptionMixedPrecisionDepthwise ((int32_t) 16)
229 
231 #define TIDL_CalibOptionMixedPrecisionInput ((int32_t) 32)
232 
233 
234 /* @} */
235 
247 #define TIDL_ActivationRangeMethodHistogram ((int32_t) 0)
248 
253 #define TIDL_ActivationRangeMethodGlobalHistogram ((int32_t) 1)
254 
255 
256 /* @} */
257 
268 #define TIDL_WeightRangeMethodHistogram ((int32_t) 0)
269 
271 #define TIDL_WeightRangeMethodMedian ((int32_t) 1)
272 /* @} */
273 
274 
286 #define TIDL_OptimiseExtMemL0 ((int32_t) 0)
287 
290 #define TIDL_OptimiseExtMemL1 ((int32_t) 1)
291 
294 #define TIDL_OptimiseExtMemL2 ((int32_t) 2)
295 /* @} */
296 
306 #define TIDL_Sparse ((int32_t) 0)
307 
308 #define TIDL_Dense ((int32_t) 1)
309 /* @} */
310 
320 #define TIDL_StrideOffsetTopLeft ((int32_t) 0)
321 #define TIDL_StrideOffsetCenter ((int32_t) 1)
322 #define TIDL_StrideOffsetMax ((int32_t) 2)
323 /* @} */
324 
333 #define TIDL_MaxPooling ((int32_t) 0)
334 #define TIDL_AveragePooling ((int32_t) 1)
335 /* @} */
336 
337 
346 #define TIDL_NoAct ((int32_t) 0)
347 #define TIDL_RelU ((int32_t) 1)
348 #define TIDL_PRelU ((int32_t) 2)
349 #define TIDL_RelU6 ((int32_t) 3)
350 #define TIDL_Clip ((int32_t) 4)
351 #define TIDL_Sigmoid ((int32_t) 5)
352 /* @} */
353 
362 #define TIDL_EltWiseProduct ((int32_t) 0)
363 #define TIDL_EltWiseSum ((int32_t) 1)
364 #define TIDL_EltWiseMax ((int32_t) 2)
365 /* @} */
366 
375 #define TIDL_DIM_BATCH ((int32_t) 0)
376 #define TIDL_DIM_NUMCH ((int32_t) 1)
377 #define TIDL_DIM_HEIGHT ((int32_t) 2)
378 #define TIDL_DIM_WIDTH ((int32_t) 3)
379 #define TIDL_DIM_MAX ((int32_t) 4)
380 /* @} */
381 
390 #define TIDL_ROI_PITCH ((uint32_t) 0)
391 #define TIDL_CHANNEL_PITCH ((uint32_t) 1)
392 #define TIDL_LINE_PITCH ((uint32_t) 2)
393 #define TIDL_PITCH_MAX ((uint32_t) (TIDL_DIM_MAX - 1))
394 /* @} */
395 
405 /* Convolution layer error types */
406 #define TIDL_E_CONVOLUTION ((int32_t) -1000)
407 #define TIDL_E_CONV_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 0))
408 #define TIDL_E_CONV_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 1))
409 #define TIDL_E_CONV_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 2))
410 #define TIDL_E_CONV_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 3))
411 #define TIDL_E_CONV_INVALID_NUM_IN_CHANNELS ((int32_t) (TIDL_E_CONVOLUTION - 4))
412 #define TIDL_E_CONV_INVALID_NUM_OUT_CHANNELS ((int32_t) (TIDL_E_CONVOLUTION - 5))
413 #define TIDL_E_CONV_INVALID_KER_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 6))
414 #define TIDL_E_CONV_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 7))
415 #define TIDL_E_CONV_INVALID_KER_TYPE ((int32_t) (TIDL_E_CONVOLUTION - 8))
416 #define TIDL_E_CONV_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 9))
417 #define TIDL_E_CONV_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 10))
418 #define TIDL_E_CONV_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_CONVOLUTION - 11))
419 /* Convolution pooling error types */
420 #define TIDL_E_CONV_POOL_INVALID_POOL_TYPE ((int32_t) (TIDL_E_CONVOLUTION - 12))
421 #define TIDL_E_CONV_POOL_INVALID_KER_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 13))
422 #define TIDL_E_CONV_POOL_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 14))
423 #define TIDL_E_CONV_POOL_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 15))
424 #define TIDL_E_CONV_POOL_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 16))
425 /* EltWise layer error types */
426 #define TIDL_E_ELTWISE ((int32_t) -1020)
427 #define TIDL_E_ELTWISE_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_ELTWISE - 0))
428 #define TIDL_E_ELTWISE_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_ELTWISE - 1))
429 #define TIDL_E_ELTWISE_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_ELTWISE - 2))
430 #define TIDL_E_ELTWISE_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_ELTWISE - 3))
431 #define TIDL_E_ELTWISE_INVALID_ELTWISE_TYPE ((int32_t) (TIDL_E_ELTWISE - 4))
432 #define TIDL_E_ELTWISE_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_ELTWISE - 5))
433 /* Pooling error types */
434 #define TIDL_E_POOLING ((int32_t) -1030)
435 #define TIDL_E_POOL_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_POOLING - 0))
436 #define TIDL_E_POOL_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_POOLING - 1))
437 #define TIDL_E_POOL_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_POOLING - 2))
438 #define TIDL_E_POOL_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_POOLING - 3))
439 #define TIDL_E_POOL_INVALID_POOL_TYPE ((int32_t) (TIDL_E_POOLING - 4))
440 #define TIDL_E_POOL_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_POOLING - 5))
441 #define TIDL_E_POOL_INVALID_KER_WIDTH ((int32_t) (TIDL_E_POOLING - 6))
442 #define TIDL_E_POOL_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_POOLING - 7))
443 #define TIDL_E_POOL_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_POOLING - 8))
444 #define TIDL_E_POOL_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_POOLING - 9))
445 /* Inner product error types */
446 #define TIDL_E_INNER_PRODUCT ((int32_t) -1040)
447 #define TIDL_E_IP_INVALID_NUM_IN_NODES ((int32_t) (TIDL_E_INNER_PRODUCT - 0))
448 #define TIDL_E_IP_INVALID_NUM_OUT_NODES ((int32_t) (TIDL_E_INNER_PRODUCT - 1))
449 #define TIDL_E_IP_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_INNER_PRODUCT - 2))
450 /* Argmax error types */
451 #define TIDL_E_ARGMAX ((int32_t) -1050)
452 #define TIDL_E_ARGMAX_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_ARGMAX - 0))
453 /* Bias error types */
454 #define TIDL_E_BN ((int32_t) -1060)
455 #define TIDL_E_BN_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_BN - 0))
456 #define TIDL_E_BN_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_BN - 1))
457 #define TIDL_E_BN_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_BN - 2))
458 #define TIDL_E_BN_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_BN - 3))
459 #define TIDL_E_BN_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_BN - 4))
460 #define TIDL_E_BN_INVALID_ENABLE_RELU ((int32_t) (TIDL_E_BN - 5))
461 #define TIDL_E_BN_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_BN - 6))
462 /* Crop layer error types */
463 #define TIDL_E_CROP ((int32_t) -1070)
464 #define TIDL_E_CROP_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_CROP - 0))
465 #define TIDL_E_CROP_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_CROP - 1))
466 #define TIDL_E_CROP_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_CROP - 2))
467 #define TIDL_E_CROP_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_CROP - 3))
468 #define TIDL_E_CROP_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_CROP - 4))
469 #define TIDL_E_CROP_INVALID_OFFSET_WIDTH ((int32_t) (TIDL_E_CROP - 5))
470 #define TIDL_E_CROP_INVALID_OFFSET_HEIGHT ((int32_t) (TIDL_E_CROP - 6))
471 /* Flatten layer error types */
472 #define TIDL_E_FLATTEN ((int32_t) -1080)
473 #define TIDL_E_FLATTEN_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_FLATTEN - 0))
474 #define TIDL_E_FLATTEN_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_FLATTEN - 1))
475 #define TIDL_E_FLATTEN_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_FLATTEN - 2))
476 #define TIDL_E_FLATTEN_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_FLATTEN - 3))
477 /* SoftMax error types */
478 #define TIDL_E_SOFTMAX ((int32_t) -1090)
479 #define TIDL_E_SOFTMAX_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_SOFTMAX - 0))
480 /* ShuffleChanel error types */
481 #define TIDL_E_SHUFFLECHANNEL ((int32_t) -1100)
482 #define TIDL_E_SHUFFLECHANNEL_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_SHUFFLECHANNEL - 0))
483 #define TIDL_E_SHUFFLECHANNEL_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_SHUFFLECHANNEL - 1))
484 #define TIDL_E_SHUFFLECHANNEL_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_SHUFFLECHANNEL - 2))
485 #define TIDL_E_SHUFFLECHANNEL_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_SHUFFLECHANNEL - 3))
486 #define TIDL_E_SHUFFLECHANNEL_INVALID_NUM_GROUPS ((int32_t) (TIDL_E_SHUFFLECHANNEL - 4))
487 /* Error types common to layers */
488 #define TIDL_E_COMMON ((int32_t) -1110)
489 #define TIDL_E_UNSUPPORTED_LAYER ((int32_t) (TIDL_E_COMMON - 0))
490 #define TIDL_E_DATAFLOW_INFO_NULL ((int32_t) (TIDL_E_COMMON - 1))
491 #define TIDL_E_INVALID_DEBUG_TRACE_PRM ((int32_t) (TIDL_E_COMMON - 2))
492 #define TIDL_E_INVALID_NET_VERSION ((int32_t) (TIDL_E_COMMON - 3))
493 #define TIDL_E_INVALID_IO_LINE_PITCH ((int32_t) (TIDL_E_COMMON - 4))
494 #define TIDL_E_QUANT_STATS_NOT_AVAILABALE ((int32_t) (TIDL_E_COMMON - 5))
495 /* @} */
496 
505 #define TIDL_SYSMEM_L1_SCRATCH ((uint32_t) 0)
506 #define TIDL_SYSMEM_L2_SCRATCH ((uint32_t) 1)
507 #define TIDL_SYSMEM_L3_SCRATCH ((uint32_t) 2)
508 #define TIDL_SYSMEM_DDR_SCRATCH ((uint32_t) 3)
509 #define TIDL_SYSMEM_MAX ((uint32_t) 4)
510 /* @} */
511 
522 #define TIDL_EXEC_MODE_STATS_COLLECTION ((int32_t) 0)
523 
526 #define TIDL_EXEC_MODE_UPDATE_TENSOR_SCALE ((int32_t) 1)
527 
528 #define TIDL_EXEC_MODE_INFER_PROCESS ((int32_t) 2)
529 #define TIDL_EXEC_MODE_INFER_PROCESS_REF ((int32_t) 3)
530 
531 
532 /* @} */
533 
543 typedef struct
544 {
545  void* ptr;
546  int32_t bufSize;
547  int32_t reserved[2];
548 }sBuffer_t;
549 
568 typedef struct
569 {
570  void *base;
571  int32_t size;
572  int32_t offset;
574 
580 typedef struct {
582  int32_t dataId;
584  int32_t elementType;
586  int32_t numDim;
588  int32_t dataQ;
590  int32_t minValue;
592  int32_t maxValue;
600  int32_t padW;
602  int32_t padH;
604  int32_t roundBits;
606  int32_t pitch[TIDL_DIM_MAX-1];
608  int32_t dimValues[TIDL_DIM_MAX];
610 
611 
612 
618 typedef struct {
620  int32_t numChannels;
622  int32_t dataQ;
624 
625 
631 typedef struct {
633  int32_t numGroups;
635  int32_t resvd;
637 
643 typedef struct {
645  int32_t blockSize;
647 
653 typedef struct {
655  int32_t padT;
657  int32_t padB;
659  int32_t padL;
661  int32_t padR;
663  int32_t padConstValue;
665  int32_t padType;
670 
676 typedef struct {
678  int32_t layerType;
680 
686 typedef enum
687 {
692 
698 typedef struct {
700  int32_t mode;
704 
710 typedef enum
711 {
715 
721 typedef enum
722 {
727 
733 typedef enum
734 {
740 
746 typedef struct {
748  int32_t poolingType;
750  int32_t imWidth;
752  int32_t imHeight;
754 
755 
761 typedef struct {
763  int32_t slicePoints[TIDL_NUM_OUT_BUFS+1];
765  int32_t axis;
767  int32_t stride;
769 
775 typedef struct {
777  int32_t slope;
782  //** maximum value for clip */
785  int32_t actType;
787 
793 typedef struct {
829 
830 
836 typedef struct {
838  int32_t numChannels;
840  int32_t inDataQ;
842  int32_t outDataQ;
844 
850 typedef struct {
852  int32_t numChannels;
854  int32_t poolingType;
856  int32_t kernelW;
858  int32_t kernelH;
860  int32_t strideW;
862  int32_t strideH;
864  int32_t padW;
866  int32_t padH;
868  int32_t inDataQ;
870  int32_t outDataQ;
872  int32_t useCeil;
874 
879 typedef struct {
884  int32_t padW;
887  int32_t padH;
893  int32_t memOverlapType;
929 
935 typedef struct {
937  int32_t weights;
939  int32_t bias;
946  int32_t numInChannels;
948  int32_t numOutChannels;
950  int32_t numGroups;
952  int32_t kernelW;
954  int32_t kernelH;
956  int32_t strideW;
958  int32_t strideH;
960  int32_t dilationW;
962  int32_t dilationH;
964  int32_t padW;
966  int32_t padH;
972  int32_t weightsQ;
976  int32_t biasB;
978  int32_t biasQ;
980  int32_t inDataQ;
982  int32_t outDataQ;
984  int32_t interDataQ;
986  int32_t enableBias;
988  int32_t enablePooling;
990  int32_t enableEltWise;
992  int32_t enableEWRelU;
994  int32_t kernelType;
999  int32_t upscaleFactor;
1003 
1008 typedef enum
1009 {
1018 
1023 typedef enum
1024 {
1029 
1034 typedef enum
1035 {
1040 
1047 typedef struct {
1051  int32_t priorBox;
1053  int32_t priorBoxSize;
1055  int32_t numClasses;
1059  int32_t codeType;
1069  int32_t topK;
1071  int32_t keepTopK;
1074  int32_t shareLocation;
1079  int32_t numKeypoints;
1080 
1082  int32_t numHeads;
1083 
1085  int32_t imWidth;
1086 
1088  int32_t imHeight;
1089 
1090  /*0 -> IDENTITY, 1 -> SIGMOID, 2 -> SOFTMAX*/
1092 
1094  int32_t metaArchType;
1095 
1096  /* 0 -> All the Data from given Anchor Box are together,
1097  1 -> Data from all Anchor Box are interleaved */
1098  int32_t dataLayout;
1099 
1101 
1102 
1103 #define TIDL_OD_MAX_KEYPOINTS (16)
1104 #define TIDL_OD_MAX_ANCHORS_PER_HEAD (16)
1105 
1112 typedef struct {
1113 
1115  int32_t numAnchors;
1117  int32_t numKeyPoints;
1119  int32_t headWidth;
1121  int32_t headHeight;
1131  float32_tidl boxScales[4];
1139 
1141 
1147 typedef struct {
1149  int32_t axis;
1151  int32_t outDataQ;
1153 
1154 
1161 typedef struct {
1163  int32_t weights;
1165  int32_t bias;
1167  int32_t numChannels;
1169  int32_t biasQ;
1171  int32_t inDataQ;
1173  int32_t outDataQ;
1175  int32_t weightsQ;
1183 
1189 typedef struct {
1191  int32_t bias;
1193  int32_t numChannels;
1195  int32_t biasQ;
1197  int32_t inDataQ;
1199  int32_t outDataQ;
1201 
1207 typedef struct {
1209  int32_t weights;
1211  int32_t bias;
1215  int32_t numInNodes;
1217  int32_t numOutNodes;
1219  int32_t weightsQ;
1227  int32_t biasQ;
1229  int32_t inDataQ;
1231  int32_t outDataQ;
1233  int32_t interDataQ;
1235  int32_t biasB;
1237 
1243 typedef struct {
1245  int32_t bias;
1247  int32_t numChannels;
1249  int32_t eltWiseType;
1251  int32_t numInData;
1253  int32_t biasQ;
1255  int32_t inDataQ[TIDL_NUM_IN_BUFS];
1257  int32_t outDataQ;
1259 
1265 typedef struct {
1267  int32_t numChannels;
1269  int32_t inDataQ;
1271  int32_t outDataQ;
1273 
1279 typedef struct {
1281  int32_t numChannels;
1283  int32_t inDataQ;
1285  int32_t outDataQ;
1287  int32_t offsetW;
1289  int32_t offsetH;
1291 
1297 /* CHECK_MISRA("-18.4") -> Disable rule 18.4 */
1298 typedef union {
1320 /*RESET_MISRA("18.4") -> Reset rule 18.4 */
1321 
1327 typedef struct {
1332  int32_t layerType;
1334  int32_t numInBufs;
1336  int32_t numOutBufs;
1342  int32_t coreID;
1345  int32_t layersGroupId;
1350 }sTIDL_Layer_t;
1351 
1352 /* Based on last Updated Date */
1353 #define TIDL_NET_VERSION (0x20210123)
1354 
1359 typedef struct {
1361  int32_t netVersion;
1363  int32_t deviceName;
1365  int32_t numLayers;
1390  int32_t dataFlowInfo;
1394  int32_t reserved;
1398 
1403 typedef enum
1404 {
1409 
1414 typedef enum
1415 {
1421 
1426 typedef enum
1427 {
1432 
1438 typedef struct
1439 {
1441  int32_t numInputBuf;
1443  int32_t numOutputBuf;
1445  int32_t inDataFormat[TIDL_MAX_ALG_IN_BUFS];
1447  int32_t inResizeType[TIDL_MAX_ALG_IN_BUFS];
1449  int32_t resizeWidth[TIDL_MAX_ALG_IN_BUFS];
1451  int32_t resizeHeight[TIDL_MAX_ALG_IN_BUFS];
1453  int32_t inWidth[TIDL_MAX_ALG_IN_BUFS];
1455  int32_t inHeight[TIDL_MAX_ALG_IN_BUFS];
1457  int32_t inNumChannels[TIDL_MAX_ALG_IN_BUFS];
1459  int32_t inChannelPitch[TIDL_MAX_ALG_IN_BUFS];
1461  int32_t inPadL[TIDL_MAX_ALG_IN_BUFS];
1463  int32_t inPadT[TIDL_MAX_ALG_IN_BUFS];
1465  int32_t inPadR[TIDL_MAX_ALG_IN_BUFS];
1467  int32_t inPadB[TIDL_MAX_ALG_IN_BUFS];
1469  int32_t inPadCh[TIDL_MAX_ALG_IN_BUFS];
1471  int32_t inElementType[TIDL_MAX_ALG_IN_BUFS];
1473  int32_t rawDataInElementType[TIDL_MAX_ALG_IN_BUFS];
1475  int32_t inDataId[TIDL_MAX_ALG_IN_BUFS];
1481  int32_t outWidth[TIDL_MAX_ALG_OUT_BUFS];
1483  int32_t outHeight[TIDL_MAX_ALG_OUT_BUFS];
1485  int32_t outNumChannels[TIDL_MAX_ALG_OUT_BUFS];
1487  int32_t outChannelPitch[TIDL_MAX_ALG_OUT_BUFS];
1489  int32_t outPadL[TIDL_MAX_ALG_OUT_BUFS];
1491  int32_t outPadT[TIDL_MAX_ALG_OUT_BUFS];
1493  int32_t outPadR[TIDL_MAX_ALG_OUT_BUFS];
1495  int32_t outPadB[TIDL_MAX_ALG_OUT_BUFS];
1497  int32_t outPadCh[TIDL_MAX_ALG_OUT_BUFS];
1499  int32_t outElementType[TIDL_MAX_ALG_OUT_BUFS];
1501  int32_t outDataId[TIDL_MAX_ALG_OUT_BUFS];
1505 
1506 #if USE_IVISION
1507 
1513 typedef struct
1514 {
1516  IVISION_Params visionParams;
1520  int32_t isInbufsPaded;
1525 
1529  int32_t traceLogLevel;
1533  int32_t reservedCtrl;
1535  int32_t flowCtrl;
1539  /* Note : All the addresses given to TIDL are assumed to be virtual addresses.
1540  If udma driver is initialized with virtual to physical function pointer initPrms.virtToPhyFxn
1541  then the same function will be used for this conversion in TIDL whereever it is needed.*/
1542  void * udmaDrvObj;
1546  int32_t(*TIDLVprintf)(const char * format, va_list arg);
1548  int32_t(*TIDLWriteBinToFile)(const char * fileName, void * addr, int32_t size);
1550  int32_t(*TIDLReadBinFromFile)(const char * fileName, void * addr, int32_t size);
1568  int32_t (*TIDL_CustomLayerProcess)(void * tidlHandle,
1569  sTIDL_Layer_t *tidlLayer,
1570  void *inPtrs[],
1571  void *outPtrs[],
1572  void *params,
1573  void *dmaUtilsContext,
1574  const sTIDL_sysMemHandle_t sysMems[TIDL_SYSMEM_MAX],
1575  int32_t execMode,
1576  float maxTensorScale);
1577 }
1579 
1586 typedef struct
1587 {
1589  IVISION_InArgs iVisionInArgs;
1591  int32_t numInBufs;
1596 } TIDL_InArgs;
1597 
1604 typedef struct
1605 {
1607  IVISION_OutArgs iVisionOutArgs;
1609  int32_t numOutBufs;
1612 
1613 } TIDL_outArgs;
1614 
1620 typedef struct
1621 {
1630 
1632 
1633 
1639 typedef struct
1640 {
1645 
1647 
1648 #define TIDL_OD_MAX_KEY_POINTS (8)
1649 
1650 
1656 typedef struct
1657 {
1673 
1675 
1676 static inline int TIDL_createParamsInit(TIDL_CreateParams * params)
1677 {
1678  params->net = NULL;
1679  params->udmaDrvObj = NULL;
1680  params->currLayersGroupId = 1;
1681  params->isInbufsPaded = 0;
1683  params->quantRangeExpansionFactor = 1.0;
1684  params->quantRangeUpdateFactor = -1.0;
1685  params->visionParams.algParams.size = sizeof(TIDL_CreateParams);
1686  params->visionParams.cacheWriteBack = NULL;
1687  params->TIDLWriteBinToFile = NULL;
1688  params->TIDLReadBinFromFile = NULL;
1689  params->TIDLVprintf = NULL;
1690  params->traceLogLevel = 0;
1691  params->traceWriteLevel = 0;
1692  params->traceBaseName = NULL;
1693  params->reservedCtrl = 0;
1694 #if defined(x86_64) || (HOST_EMULATION)
1695  params->flowCtrl = 1;
1696 #else
1697  params->flowCtrl = 0;
1698 #endif
1699 
1700  return IALG_EOK;
1701 }
1702 
1703 #endif
1704 
1705 #ifdef __cplusplus
1706 }
1707 #endif
1708 
1710 /* iTI_DL */
1711 
1712 #endif /*ITIDL_H_ */
1713 /*==========================================================================*/
1714 /* END of the FILE */
1715 /*==========================================================================*/
int32_t enableEltWise
Definition: itidl_ti.h:990
This structure define the parameters Soft max layer in TIDL.
Definition: itidl_ti.h:1265
float32_tidl maxTensorValue
Definition: itidl_ti.h:596
int32_t weights
Definition: itidl_ti.h:1209
Definition: itidl_ti.h:1419
float32_tidl xmin
Definition: itidl_ti.h:1665
int32_t biasQ
Definition: itidl_ti.h:1169
sTIDL_SliceLayerParams_t sliceParams
Definition: itidl_ti.h:1312
int32_t padType
Definition: itidl_ti.h:665
float32_tidl quantRangeUpdateFactor
Definition: itidl_ti.h:1527
int32_t strideW
Definition: itidl_ti.h:860
This structure define the parameters of Pad layer in TIDL.
Definition: itidl_ti.h:676
sTIDL_ShuffleLayerParams_t shuffleLayerParams
Definition: itidl_ti.h:1311
int32_t offset
Definition: itidl_ti.h:572
float32_tidl clipMin
Definition: itidl_ti.h:781
IVISION_InArgs iVisionInArgs
Definition: itidl_ti.h:1589
int32_t strideOffsetMethod
Definition: itidl_ti.h:1349
int32_t upscaleFactor
Definition: itidl_ti.h:999
float32_tidl biasScale
Definition: itidl_ti.h:1179
int32_t traceWriteLevel
Definition: itidl_ti.h:1531
int32_t numGroups
Definition: itidl_ti.h:950
float32_tidl y
Definition: itidl_ti.h:1644
Definition: itidl_ti.h:1417
int32_t perChannelPadConstTensorOffset
Definition: itidl_ti.h:668
int32_t(* TIDLWriteBinToFile)(const char *fileName, void *addr, int32_t size)
Definition: itidl_ti.h:1548
int32_t kernelType
Definition: itidl_ti.h:994
int32_t numInData
Definition: itidl_ti.h:1251
int32_t padR
Definition: itidl_ti.h:661
int32_t layersGroupId
Definition: itidl_ti.h:1345
float32_tidl clipMax
Definition: itidl_ti.h:783
This union define the layer specific parameters of all the supported layers in TIDL.
Definition: itidl_ti.h:1298
void * traceBaseName
Definition: itidl_ti.h:1537
int32_t padW
Definition: itidl_ti.h:964
Definition: itidl_ti.h:1038
int32_t isInbufsPaded
Definition: itidl_ti.h:1520
int32_t roundBits
Definition: itidl_ti.h:604
int32_t numInNodes
Definition: itidl_ti.h:1215
float32_tidl percentileActRangeShrink
Definition: itidl_ti.h:813
int32_t resvd
Definition: itidl_ti.h:635
int32_t quantizationStyle
Definition: itidl_ti.h:1377
int32_t(* TIDLReadBinFromFile)(const char *fileName, void *addr, int32_t size)
Definition: itidl_ti.h:1550
int32_t biasQ
Definition: itidl_ti.h:1195
int32_t poolingType
Definition: itidl_ti.h:854
int32_t kernelW
Definition: itidl_ti.h:856
#define TIDL_NUM_MAX_LAYERS
Definition: itidl_ti.h:102
void * udmaDrvObj
Definition: itidl_ti.h:1542
This structure contains all the parameters which TI DL library at create time.
Definition: itidl_ti.h:1513
Definition: itidl_ti.h:1407
int32_t processingType
Definition: itidl_ti.h:1049
float32_tidl ymin
Definition: itidl_ti.h:1667
int32_t inDataQ
Definition: itidl_ti.h:980
This structure defines the Input and output buffer descriptors required for a given Layer group...
Definition: itidl_ti.h:1438
int32_t inDataQ
Definition: itidl_ti.h:1171
sTIDL_BiasParams_t biasParams
Definition: itidl_ti.h:1309
This structure define the parameters of ROI Pooling layer in TIDL.
Definition: itidl_ti.h:746
Definition: itidl_ti.h:689
Definition: itidl_ti.h:1036
int32_t codeType
Definition: itidl_ti.h:1059
Definition: itidl_ti.h:1016
int32_t numKeyPoints
Definition: itidl_ti.h:1117
#define TIDL_SYSMEM_MAX
Definition: itidl_ti.h:509
int32_t blockSize
Definition: itidl_ti.h:645
sTIDL_ResizeLayerParams_t resizeParams
Definition: itidl_ti.h:1313
sTIDL_Network_t * net
Definition: itidl_ti.h:1544
int32_t numChannels
Definition: itidl_ti.h:838
sTIDL_RoiPoolingLayerParams_t roiPoolingParams
Definition: itidl_ti.h:1314
sTIDL_ActParams_t actParams
Definition: itidl_ti.h:1330
int32_t offsetH
Definition: itidl_ti.h:1289
float32_tidl strideH
Definition: itidl_ti.h:1125
int32_t enableLayerPerfTraces
Definition: itidl_ti.h:1595
int32_t kernelW
Definition: itidl_ti.h:952
int32_t numLayers
Definition: itidl_ti.h:1365
int32_t dataId
Definition: itidl_ti.h:582
int32_t zeroWeightValue
Definition: itidl_ti.h:1181
This structure defines the system memory handles in TIDL There are total four handles: 0: L1...
Definition: itidl_ti.h:568
Definition: itidl_ti.h:690
int32_t netVersion
Definition: itidl_ti.h:1361
int32_t outDataQ
Definition: itidl_ti.h:1285
sTIDL_CalibParams_t calibrationParams
Definition: itidl_ti.h:1388
float32_tidl biasCalibrationFactor
Definition: itidl_ti.h:823
void * base
Definition: itidl_ti.h:570
int32_t rsvdPassThrough
Definition: itidl_ti.h:927
int32_t biasB
Definition: itidl_ti.h:1235
static int TIDL_createParamsInit(TIDL_CreateParams *params)
Definition: itidl_ti.h:1676
Definition: itidl_ti.h:1011
This structure define the parameters of Pad layer in TIDL.
Definition: itidl_ti.h:653
Definition: itidl_ti.h:736
int32_t numInBufs
Definition: itidl_ti.h:1591
int32_t imHeight
Definition: itidl_ti.h:752
int32_t enablePooling
Definition: itidl_ti.h:988
Definition: itidl_ti.h:1012
int32_t coreID
Definition: itidl_ti.h:1342
sTIDL_SoftMaxParams_t softMaxParams
Definition: itidl_ti.h:1305
#define TIDL_MAX_ALG_IN_BUFS
Definition: itidl_ti.h:107
eTIDL_inResizeType
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1426
int32_t axis
Definition: itidl_ti.h:765
int32_t imWidth
Definition: itidl_ti.h:750
int32_t enableEWRelU
Definition: itidl_ti.h:992
sTIDL_CropParams_t cropParams
Definition: itidl_ti.h:1306
This structure define the parameters spatial Pooling layer in TIDL.
Definition: itidl_ti.h:850
int32_t outDataQ
Definition: itidl_ti.h:870
int32_t stride
Definition: itidl_ti.h:767
int32_t padT
Definition: itidl_ti.h:655
int32_t dilationW
Definition: itidl_ti.h:960
int32_t flowCtrl
Definition: itidl_ti.h:1535
int32_t elementType
Definition: itidl_ti.h:584
int32_t outDataQ
Definition: itidl_ti.h:1271
int32_t minValue
Definition: itidl_ti.h:590
#define TIDL_DIM_MAX
Definition: itidl_ti.h:379
int32_t dilationH
Definition: itidl_ti.h:962
Definition: itidl_ti.h:761
float float32_tidl
Definition: itidl_ti.h:113
int32_t biasQ
Definition: itidl_ti.h:1253
float32_tidl weightScale
Definition: itidl_ti.h:1221
Definition: itidl_ti.h:1430
int32_t numInChannels
Definition: itidl_ti.h:946
int32_t padH
Definition: itidl_ti.h:602
float32_tidl biasScale
Definition: itidl_ti.h:1223
This structure define the parameters Arg max layer in TIDL.
Definition: itidl_ti.h:836
int32_t poolingType
Definition: itidl_ti.h:748
sTIDL_PoolingParams_t poolParams
Definition: itidl_ti.h:1001
float32_tidl offsetH
Definition: itidl_ti.h:1129
Definition: itidl_ti.h:723
int32_t numChannels
Definition: itidl_ti.h:1281
This structure define the parameters of Bias layer in TIDL.
Definition: itidl_ti.h:1189
int32_t outDataQ
Definition: itidl_ti.h:982
This structure contains the each object&#39;s information detected by Objection detection layer...
Definition: itidl_ti.h:1656
float32_tidl x
Definition: itidl_ti.h:1642
Definition: itidl_ti.h:1428
int32_t doesLayerFillOutXPadding
Definition: itidl_ti.h:925
int32_t zeroWeightValue
Definition: itidl_ti.h:974
int32_t slope
Definition: itidl_ti.h:777
float32_tidl nmsThreshold
Definition: itidl_ti.h:1065
sTIDL_ConvParams_t convParams
Definition: itidl_ti.h:1299
int32_t outDataQ
Definition: itidl_ti.h:1199
This structure define the parameters of Detection Output Layer in TIDL.
Definition: itidl_ti.h:1047
float32_tidl objInfoSize
Definition: itidl_ti.h:1625
Definition: itidl_ti.h:1405
float32_tidl quantRangeExpansionFactor
Definition: itidl_ti.h:1524
eTIDL_PadLayerPadType
This enumerator defines the different types of padding supported by TIDL library. ...
Definition: itidl_ti.h:721
This structure define the parameters of ReLU activation layer in TIDL.
Definition: itidl_ti.h:793
This structure define the parameters of Data layer in TIDL.
Definition: itidl_ti.h:618
int32_t outDataQ
Definition: itidl_ti.h:842
#define TIDL_OD_MAX_KEY_POINTS
Definition: itidl_ti.h:1648
int32_t numOutNodes
Definition: itidl_ti.h:1217
int32_t numOutBufs
Definition: itidl_ti.h:1336
int32_t varianceEncoded
Definition: itidl_ti.h:1077
int32_t outDataQ
Definition: itidl_ti.h:1231
float32_tidl biasScale
Definition: itidl_ti.h:970
int32_t padB
Definition: itidl_ti.h:657
int32_t outDataQ
Definition: itidl_ti.h:1257
int32_t kernelH
Definition: itidl_ti.h:954
int32_t activationType
Definition: itidl_ti.h:1213
Definition: itidl_ti.h:1027
float32_tidl ObjId
Definition: itidl_ti.h:1659
int32_t weightsQ
Definition: itidl_ti.h:1175
Definition: itidl_ti.h:738
int32_t bias
Definition: itidl_ti.h:1245
#define TIDL_NUM_OUT_BUFS
Definition: itidl_ti.h:104
int32_t padW
Definition: itidl_ti.h:600
int32_t interDataQ
Definition: itidl_ti.h:984
float32_tidl weightScale
Definition: itidl_ti.h:1177
float32_tidl score
Definition: itidl_ti.h:1663
int32_t outDataQ
Definition: itidl_ti.h:1173
float32_tidl weightScale
Definition: itidl_ti.h:968
float32_tidl percentileWtRangeShrink
Definition: itidl_ti.h:820
int32_t numOutputBuf
Definition: itidl_ti.h:1443
float32_tidl tensorScale
Definition: itidl_ti.h:598
This structure define the parameters Convolution Layer in TIDL.
Definition: itidl_ti.h:935
int32_t offsetW
Definition: itidl_ti.h:1287
Definition: itidl_ti.h:1010
int32_t layerType
Definition: itidl_ti.h:678
void * ptr
Definition: itidl_ti.h:545
int32_t inDataQ
Definition: itidl_ti.h:840
This structure define the parameters of Batch Norm layer in TIDL.
Definition: itidl_ti.h:1161
int32_t keepTopK
Definition: itidl_ti.h:1071
This structure define the parameters of Shuffle layer in TIDL.
Definition: itidl_ti.h:631
Definition: itidl_ti.h:1026
int32_t actType
Definition: itidl_ti.h:785
sTIDL_PadLayerParams_t padLayerParams
Definition: itidl_ti.h:1316
int32_t enableBias
Definition: itidl_ti.h:986
int32_t dataElementSize
Definition: itidl_ti.h:1373
int32_t biasQ
Definition: itidl_ti.h:1227
This structure define the common layer parameters in TIDL.
Definition: itidl_ti.h:1327
int32_t scoreConverter
Definition: itidl_ti.h:1091
Definition: itidl_ti.h:737
int32_t inDataQ
Definition: itidl_ti.h:1229
eTIDL_metaArchType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1008
int32_t padH
Definition: itidl_ti.h:887
eTIDL_RoiPoolingType
This enumerator defines the different types of ROI pooling supported by TIDL library.
Definition: itidl_ti.h:710
int32_t convolutionType
Definition: itidl_ti.h:944
This structure define the parameters of data or kernel buffer used by TIDL layers (In...
Definition: itidl_ti.h:580
sTIDL_LayerParams_t layerParams
Definition: itidl_ti.h:1328
int32_t weights
Definition: itidl_ti.h:1163
int32_t biasB
Definition: itidl_ti.h:976
float32_tidl objInfoOffset
Definition: itidl_ti.h:1629
Definition: itidl_ti.h:688
int32_t traceLogLevel
Definition: itidl_ti.h:1529
This structure define the parameters of ReLU activation layer in TIDL.
Definition: itidl_ti.h:775
This structure define the parameters CNN/Deep learning net in TIDL.
Definition: itidl_ti.h:1359
int32_t biasCalibrationIterations
Definition: itidl_ti.h:827
int32_t strideH
Definition: itidl_ti.h:958
int32_t strideH
Definition: itidl_ti.h:862
int32_t headWidth
Definition: itidl_ti.h:1119
sTIDL_EltWiseParams_t eltWiseParams
Definition: itidl_ti.h:1300
float32_tidl numDetObjects
Definition: itidl_ti.h:1623
#define TIDL_MAX_ALG_OUT_BUFS
Definition: itidl_ti.h:108
int32_t eltWiseType
Definition: itidl_ti.h:1249
sTIDL_ConcatParams_t concatParams
Definition: itidl_ti.h:1307
int32_t bias
Definition: itidl_ti.h:1211
int32_t numAnchors
Definition: itidl_ti.h:1115
int32_t numKeypoints
Definition: itidl_ti.h:1079
int32_t priorBox
Definition: itidl_ti.h:1051
int32_t doesLayerChangePadding
Definition: itidl_ti.h:899
float32_tidl eta
Definition: itidl_ti.h:1067
int32_t useCeil
Definition: itidl_ti.h:872
int32_t padConstValue
Definition: itidl_ti.h:663
int32_t topK
Definition: itidl_ti.h:1069
int32_t numChannels
Definition: itidl_ti.h:1267
int32_t padH
Definition: itidl_ti.h:866
int32_t padH
Definition: itidl_ti.h:966
int32_t optimiseExtMem
Definition: itidl_ti.h:1522
int32_t inDataQ
Definition: itidl_ti.h:1283
const IVISION_Fxns TIDL_VISION_FXNS
The unique const function table for the TI deep learning algorithm.
double float64_tidl
Definition: itidl_ti.h:115
int32_t interElementSize
Definition: itidl_ti.h:1375
This structure contains the header information of Objection detection layer.
Definition: itidl_ti.h:1620
float32_tidl label
Definition: itidl_ti.h:1661
int32_t size
Definition: itidl_ti.h:571
int32_t slopeElementSize
Definition: itidl_ti.h:1369
sTIDL_BatchNormParams_t batchNormParams
Definition: itidl_ti.h:1310
int32_t dataFlowInfo
Definition: itidl_ti.h:1390
Definition: itidl_ti.h:735
Definition: itidl_ti.h:712
eTIDL_inYuvFormat
This enumerator defines the different YUV formats.
Definition: itidl_ti.h:1414
IVISION_Params visionParams
Definition: itidl_ti.h:1516
This structure define the parameters of Element wise layer in TIDL.
Definition: itidl_ti.h:1243
int32_t numChannels
Definition: itidl_ti.h:620
Definition: itidl_ti.h:724
sTIDL_InnerProductParams_t innerProductParams
Definition: itidl_ti.h:1302
This structure defines the parameters for custom layer in TIDL.
Definition: itidl_ti.h:879
int32_t biasElementSize
Definition: itidl_ti.h:1371
This structure define the parameters of AnchorBox used by Detection Output Layer in TIDL...
Definition: itidl_ti.h:1112
sTIDL_PoolingParams_t poolParams
Definition: itidl_ti.h:1301
Definition: itidl_ti.h:1025
#define TIDL_OptimiseExtMemL1
In this case, output buffer will re-use memory from previous layers when they have same width and hei...
Definition: itidl_ti.h:290
sTIDL_ArgMaxParams_t argMaxParams
Definition: itidl_ti.h:1304
int32_t numOutChannels
Definition: itidl_ti.h:948
Definition: itidl_ti.h:713
int32_t numGroups
Definition: itidl_ti.h:633
int32_t shareLocation
Definition: itidl_ti.h:1074
int32_t backgroundLabelId
Definition: itidl_ti.h:1057
This structure define the parameters of Inner Product (Fully connected) layer in TIDL.
Definition: itidl_ti.h:1207
eTIDL_inDataFormat
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1403
int32_t weightRangeMethod
Definition: itidl_ti.h:805
int32_t inDataQ
Definition: itidl_ti.h:868
int32_t outDataQ
Definition: itidl_ti.h:1151
int32_t imHeight
Definition: itidl_ti.h:1088
int32_t priorBoxSize
Definition: itidl_ti.h:1053
IVISION_OutArgs iVisionOutArgs
Definition: itidl_ti.h:1607
int32_t calibrationOption
Definition: itidl_ti.h:1384
int32_t inDataQ
Definition: itidl_ti.h:1269
int32_t dataQ
Definition: itidl_ti.h:588
int32_t reserved
Definition: itidl_ti.h:1394
int32_t strideW
Definition: itidl_ti.h:956
#define TIDL_STRING_SIZE
Definition: itidl_ti.h:105
int32_t numInputBuf
Definition: itidl_ti.h:1441
int32_t weightsElementSizeInBits
Definition: itidl_ti.h:1347
sTIDL_DepthToSpaceParams_t depthToSpaceParams
Definition: itidl_ti.h:1315
float32_tidl xmax
Definition: itidl_ti.h:1669
This structure contains the key points information of BBox detected by OD layer.
Definition: itidl_ti.h:1639
Definition: itidl_ti.h:1429
int32_t numChannels
Definition: itidl_ti.h:1167
sTIDL_DataLayerParams_t dataLayerParams
Definition: itidl_ti.h:1303
int32_t numClasses
Definition: itidl_ti.h:1055
float32_tidl slopeScale
Definition: itidl_ti.h:779
int32_t currLayersGroupId
Definition: itidl_ti.h:1518
This structure define the parameters of data or kernel buffer memory in TIDL.
Definition: itidl_ti.h:543
float32_tidl confThreshold
Definition: itidl_ti.h:1062
Definition: itidl_ti.h:1037
int32_t deviceName
Definition: itidl_ti.h:1363
int32_t inDataQ
Definition: itidl_ti.h:1197
int32_t numChannels
Definition: itidl_ti.h:1247
int32_t weightsQ
Definition: itidl_ti.h:1219
int32_t bias
Definition: itidl_ti.h:939
int32_t biasQ
Definition: itidl_ti.h:978
This structure contains all the parameters which controls the applet at create time.
Definition: itidl_ti.h:1586
int32_t activationRangeMethod
Definition: itidl_ti.h:798
int32_t bias
Definition: itidl_ti.h:1165
int32_t zeroWeightValue
Definition: itidl_ti.h:1225
int32_t enableDepthToSpace
Definition: itidl_ti.h:996
This structure contains all the parameters which controls the applet at create time.
Definition: itidl_ti.h:1604
int32_t interDataQ
Definition: itidl_ti.h:1233
int32_t padW
Definition: itidl_ti.h:864
Definition: itidl_ti.h:1015
Definition: itidl_ti.h:1014
int32_t(* TIDLVprintf)(const char *format, va_list arg)
Definition: itidl_ti.h:1546
sTIDL_TfODOutputLayerParams_t tfODOutputLayerParams
Definition: itidl_ti.h:1317
int32_t weightsQ
Definition: itidl_ti.h:972
This structure define the parameters of PriorBox layer in TIDL.
Definition: itidl_ti.h:1147
Definition: itidl_ti.h:725
int32_t dataLayout
Definition: itidl_ti.h:1098
int32_t weights
Definition: itidl_ti.h:937
eTIDL_processingType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1023
int32_t numInBufs
Definition: itidl_ti.h:1334
int32_t dataQ
Definition: itidl_ti.h:622
int32_t imWidth
Definition: itidl_ti.h:1085
int32_t kernelH
Definition: itidl_ti.h:858
int32_t bias
Definition: itidl_ti.h:1191
#define TIDL_OD_MAX_ANCHORS_PER_HEAD
Definition: itidl_ti.h:1104
int32_t isQuantStatsAvailable
Definition: itidl_ti.h:1392
int32_t numOutBufs
Definition: itidl_ti.h:1609
int32_t metaArchType
Definition: itidl_ti.h:1094
float32_tidl offsetW
Definition: itidl_ti.h:1127
int32_t numChannels
Definition: itidl_ti.h:1193
float32_tidl * anchorInputs
Definition: itidl_ti.h:1138
float32_tidl odNumKeyPoints
Definition: itidl_ti.h:1627
This structure define the parameters Crop layer in TIDL.
Definition: itidl_ti.h:1279
Definition: itidl_ti.h:1416
#define TIDL_NUM_IN_BUFS
Definition: itidl_ti.h:103
sTIDL_CustomParams_t customParams
Definition: itidl_ti.h:1318
int32_t reservedCtrl
Definition: itidl_ti.h:1533
int32_t weightsElementSize
Definition: itidl_ti.h:1367
int32_t bufSize
Definition: itidl_ti.h:546
Definition: itidl_ti.h:1013
int32_t padW
Definition: itidl_ti.h:884
int32_t perChannelWeightScaleOffset
Definition: itidl_ti.h:942
int32_t numChannels
Definition: itidl_ti.h:852
This structure define the parameters of Depth To Space layer in TIDL.
Definition: itidl_ti.h:643
This structure define the parameters of Resize layer in TIDL.
Definition: itidl_ti.h:698
int32_t memOverlapType
Definition: itidl_ti.h:893
#define TIDL_OD_MAX_KEYPOINTS
Definition: itidl_ti.h:1103
int32_t headHeight
Definition: itidl_ti.h:1121
int32_t layerType
Definition: itidl_ti.h:1332
int32_t axis
Definition: itidl_ti.h:1149
eTIDL_scoreConverterType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1034
float32_tidl minTensorValue
Definition: itidl_ti.h:594
int32_t padL
Definition: itidl_ti.h:659
int32_t maxValue
Definition: itidl_ti.h:592
int32_t mode
Definition: itidl_ti.h:700
int32_t numDim
Definition: itidl_ti.h:586
Definition: itidl_ti.h:1406
Definition: itidl_ti.h:1418
float32_tidl strideW
Definition: itidl_ti.h:1123
sTIDL_DetectOutputParams_t detectOutParams
Definition: itidl_ti.h:1308
eTIDL_TfODOutputType
This enumerator defines the different types of output types for the OD output layer.
Definition: itidl_ti.h:733
float32_tidl ymax
Definition: itidl_ti.h:1671
int32_t customLayerType
Definition: itidl_ti.h:881
int32_t numHeads
Definition: itidl_ti.h:1082
eTIDL_ResizeType
This enumerator defines the different types of element type used by TIDL library. ...
Definition: itidl_ti.h:686