TI Deep Learning Product 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 #include <float.h>
83 
84 #ifdef TIDL_IMPORT_TOOL
85 #define USE_IVISION (0)
86 #endif
87 
88 #if USE_IVISION
89 #include <ivision.h>
90 
91 
92 
96 extern const IVISION_Fxns TIDL_VISION_FXNS;
97 
98 
99 #endif
100 #ifdef __cplusplus
101 extern "C" {
102 #endif
103 
104 #define TIDL_NUM_MAX_LAYERS ((int32_t) 1024)
105 #define TIDL_NUM_IN_BUFS ((int32_t) 16)
106 #define TIDL_NUM_OUT_BUFS ((int32_t) 16)
107 #define TIDL_STRING_SIZE ((int32_t) 512)
108 #define TIDL_MAX_DATA_BUFS ((int32_t) 1024)
109 #define TIDL_MAX_ALG_IN_BUFS ((int32_t) 32)
110 #define TIDL_MAX_ALG_OUT_BUFS ((int32_t) 32)
111 #define TIDL_MAX_NUM_GROUPS ((int32_t) 64)
112 
113 
114 /* Typedef for 32 bit float */
115 typedef float float32_tidl;
116 /* Typedef for 64 bit float */
117 typedef double float64_tidl;
118 
124 typedef int32_t (*TIDL_Lock_t) (void) ;
132 typedef void (*TIDL_Unlock_t) (int32_t);
133 
142 #define TIDL_DataLayer ((int32_t) 0)
143 #define TIDL_ConvolutionLayer ((int32_t) 1)
144 #define TIDL_PoolingLayer ((int32_t) 2)
145 #define TIDL_ReLULayer ((int32_t) 3)
146 #define TIDL_PReLULayer ((int32_t) 4)
147 #define TIDL_EltWiseLayer ((int32_t) 5)
148 #define TIDL_InnerProductLayer ((int32_t) 6)
149 #define TIDL_SoftMaxLayer ((int32_t) 7)
150 #define TIDL_BatchNormLayer ((int32_t) 8)
151 #define TIDL_BiasLayer ((int32_t) 9)
152 #define TIDL_ScaleLayer ((int32_t) 10)
153 #define TIDL_Deconv2DLayer ((int32_t) 11)
154 #define TIDL_ConcatLayer ((int32_t) 12)
155 #define TIDL_SplitLayer ((int32_t) 13)
156 #define TIDL_SliceLayer ((int32_t) 14)
157 #define TIDL_CropLayer ((int32_t) 15)
158 #define TIDL_FlattenLayer ((int32_t) 16)
159 #define TIDL_DropOutLayer ((int32_t) 17)
160 #define TIDL_ArgMaxLayer ((int32_t) 18)
161 #define TIDL_DetectionOutputLayer ((int32_t) 19)
162 #define TIDL_ShuffleChannelLayer ((int32_t) 20)
163 #define TIDL_ResizeLayer ((int32_t) 21)
164 #define TIDL_RoiPoolingLayer ((int32_t) 22)
165 #define TIDL_OdPostProcessingLayer ((int32_t) 23)
166 #define TIDL_DepthToSpaceLayer ((int32_t) 24)
167 #define TIDL_SigmoidLayer ((int32_t) 25)
168 #define TIDL_PadLayer ((int32_t) 26)
169 #define TIDL_ColorConversionLayer ((int32_t) 27)
170 #define TIDL_OdOutputReformatLayer ((int32_t) 28)
171 #define TIDL_DataConvertLayer ((int32_t) 29)
172 #define TIDL_CustomLayer ((int32_t) 30)
173 #define TIDL_BatchReshapeLayer ((int32_t) 31)
174 #define TIDL_ReduceLayer ((int32_t) 32)
175 #define TIDL_ScatterElementsLayer ((int32_t) 33)
176 #define TIDL_SqueezeLayer ((int32_t) 34)
177 #define TIDL_UnsupportedLayer ((int32_t) 35)
178 /* @} */
179 
188 #define TIDL_UnsignedChar ((int32_t) 0)
189 #define TIDL_SignedChar ((int32_t) 1)
190 #define TIDL_UnsignedShort ((int32_t) 2)
191 #define TIDL_SignedShort ((int32_t) 3)
192 #define TIDL_UnsignedWord ((int32_t) 4)
193 #define TIDL_SignedWord ((int32_t) 5)
194 #define TIDL_SinglePrecFloat ((int32_t) 6)
195 #define TIDL_UnsignedDoubleWord ((int32_t) 7)
196 #define TIDL_SignedDoubleWord ((int32_t) 8)
197 /* @} */
198 
207 #define TIDL_LT_NCHW ((uint32_t) 0)
208 #define TIDL_LT_NHWC ((uint32_t) 1)
209 #define TIDL_LT_MAX (TIDLRT_LT_NHWC+1)
210 /* @} */
211 
212 
221 #define TIDL_DC_TYPE_INPUT ((uint32_t) 0)
222 #define TIDL_DC_TYPE_OUTPUT ((uint32_t) 1)
223 #define TIDL_DC_TYPE_MAX (TIDL_DC_TYPE_OUTPUT+1)
224 /* @} */
225 
226 
237 #define TIDL_QuantStyleFixed ((int32_t) 0)
238 
240 #define TIDL_QuantStyleDynamic ((int32_t) 1)
241 
243 #define TIDL_QuantStyleNP2Fixed ((int32_t) 2)
244 
246 #define TIDL_QuantStyleP2Dynamic ((int32_t) 3)
247 
248 #define TIDL_QuantStyleCustom ((int32_t) 10)
249 /* @} */
250 
263 #define TIDL_CalibOptionActivationRange ((int32_t) 1)
264 
268 #define TIDL_CalibOptionWeightRange ((int32_t) 2)
269 
270 #define TIDL_CalibOptionBiasCalibration ((int32_t) 4)
271 
274 #define TIDL_CalibOptionPerChannelWeightQuantization ((int32_t) 8)
275 
280 #define TIDL_CalibOptionMixedPrecisionDepthwise ((int32_t) 16)
281 
283 #define TIDL_CalibOptionMixedPrecisionInput ((int32_t) 32)
284 
286 #define TIDL_CalibOptionBiasRange ((int32_t) 64)
287 
288 /* @} */
289 
301 #define TIDL_ActivationRangeMethodHistogram ((int32_t) 0)
302 
307 #define TIDL_ActivationRangeMethodGlobalHistogram ((int32_t) 1)
308 
309 
310 /* @} */
311 
322 #define TIDL_WeightRangeMethodHistogram ((int32_t) 0)
323 
325 #define TIDL_WeightRangeMethodMedian ((int32_t) 1)
326 /* @} */
327 
328 
340 #define TIDL_OptimiseExtMemL0 ((int32_t) 0)
341 
344 #define TIDL_OptimiseExtMemL1 ((int32_t) 1)
345 
348 #define TIDL_OptimiseExtMemL2 ((int32_t) 2)
349 /* @} */
350 
360 #define TIDL_Sparse ((int32_t) 0)
361 
362 #define TIDL_Dense ((int32_t) 1)
363 /* @} */
364 
374 #define TIDL_StrideOffsetTopLeft ((int32_t) 0)
375 #define TIDL_StrideOffsetCenter ((int32_t) 1)
376 #define TIDL_StrideOffsetMax ((int32_t) 2)
377 /* @} */
378 
387 #define TIDL_MaxPooling ((int32_t) 0)
388 #define TIDL_AveragePooling ((int32_t) 1)
389 /* @} */
390 
391 
400 #define TIDL_NoAct ((int32_t) 0)
401 #define TIDL_RelU ((int32_t) 1)
402 #define TIDL_PRelU ((int32_t) 2)
403 #define TIDL_RelU6 ((int32_t) 3)
404 #define TIDL_Clip ((int32_t) 4)
405 #define TIDL_Sigmoid ((int32_t) 5)
406 /* @} */
407 
416 #define TIDL_EltWiseProduct ((int32_t) 0)
417 #define TIDL_EltWiseSum ((int32_t) 1)
418 #define TIDL_EltWiseMax ((int32_t) 2)
419 /* @} */
420 
429 #define TIDL_DIM_BATCH ((int32_t) 0)
430 #define TIDL_DIM_NUMCH ((int32_t) 1)
431 #define TIDL_DIM_HEIGHT ((int32_t) 2)
432 #define TIDL_DIM_WIDTH ((int32_t) 3)
433 #define TIDL_DIM_MAX ((int32_t) 4)
434 /* @} */
435 
444 #define TIDL_ROI_PITCH ((uint32_t) 0)
445 #define TIDL_CHANNEL_PITCH ((uint32_t) 1)
446 #define TIDL_LINE_PITCH ((uint32_t) 2)
447 #define TIDL_PITCH_MAX ((uint32_t) (TIDL_DIM_MAX - 1))
448 /* @} */
449 
459 /* Convolution layer error types */
460 #define TIDL_E_CONVOLUTION ((int32_t) -1000)
461 #define TIDL_E_CONV_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 0))
462 #define TIDL_E_CONV_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 1))
463 #define TIDL_E_CONV_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 2))
464 #define TIDL_E_CONV_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 3))
465 #define TIDL_E_CONV_INVALID_NUM_IN_CHANNELS ((int32_t) (TIDL_E_CONVOLUTION - 4))
466 #define TIDL_E_CONV_INVALID_NUM_OUT_CHANNELS ((int32_t) (TIDL_E_CONVOLUTION - 5))
467 #define TIDL_E_CONV_INVALID_KER_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 6))
468 #define TIDL_E_CONV_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 7))
469 #define TIDL_E_CONV_INVALID_KER_TYPE ((int32_t) (TIDL_E_CONVOLUTION - 8))
470 #define TIDL_E_CONV_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 9))
471 #define TIDL_E_CONV_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 10))
472 #define TIDL_E_CONV_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_CONVOLUTION - 11))
473 /* Convolution pooling error types */
474 #define TIDL_E_CONV_POOL_INVALID_POOL_TYPE ((int32_t) (TIDL_E_CONVOLUTION - 12))
475 #define TIDL_E_CONV_POOL_INVALID_KER_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 13))
476 #define TIDL_E_CONV_POOL_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 14))
477 #define TIDL_E_CONV_POOL_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 15))
478 #define TIDL_E_CONV_POOL_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 16))
479 /* EltWise layer error types */
480 #define TIDL_E_ELTWISE ((int32_t) -1020)
481 #define TIDL_E_ELTWISE_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_ELTWISE - 0))
482 #define TIDL_E_ELTWISE_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_ELTWISE - 1))
483 #define TIDL_E_ELTWISE_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_ELTWISE - 2))
484 #define TIDL_E_ELTWISE_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_ELTWISE - 3))
485 #define TIDL_E_ELTWISE_INVALID_ELTWISE_TYPE ((int32_t) (TIDL_E_ELTWISE - 4))
486 #define TIDL_E_ELTWISE_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_ELTWISE - 5))
487 /* Pooling error types */
488 #define TIDL_E_POOLING ((int32_t) -1030)
489 #define TIDL_E_POOL_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_POOLING - 0))
490 #define TIDL_E_POOL_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_POOLING - 1))
491 #define TIDL_E_POOL_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_POOLING - 2))
492 #define TIDL_E_POOL_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_POOLING - 3))
493 #define TIDL_E_POOL_INVALID_POOL_TYPE ((int32_t) (TIDL_E_POOLING - 4))
494 #define TIDL_E_POOL_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_POOLING - 5))
495 #define TIDL_E_POOL_INVALID_KER_WIDTH ((int32_t) (TIDL_E_POOLING - 6))
496 #define TIDL_E_POOL_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_POOLING - 7))
497 #define TIDL_E_POOL_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_POOLING - 8))
498 #define TIDL_E_POOL_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_POOLING - 9))
499 /* Inner product error types */
500 #define TIDL_E_INNER_PRODUCT ((int32_t) -1040)
501 #define TIDL_E_IP_INVALID_NUM_IN_NODES ((int32_t) (TIDL_E_INNER_PRODUCT - 0))
502 #define TIDL_E_IP_INVALID_NUM_OUT_NODES ((int32_t) (TIDL_E_INNER_PRODUCT - 1))
503 #define TIDL_E_IP_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_INNER_PRODUCT - 2))
504 /* Argmax error types */
505 #define TIDL_E_ARGMAX ((int32_t) -1050)
506 #define TIDL_E_ARGMAX_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_ARGMAX - 0))
507 /* Bias error types */
508 #define TIDL_E_BN ((int32_t) -1060)
509 #define TIDL_E_BN_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_BN - 0))
510 #define TIDL_E_BN_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_BN - 1))
511 #define TIDL_E_BN_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_BN - 2))
512 #define TIDL_E_BN_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_BN - 3))
513 #define TIDL_E_BN_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_BN - 4))
514 #define TIDL_E_BN_INVALID_ENABLE_RELU ((int32_t) (TIDL_E_BN - 5))
515 #define TIDL_E_BN_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_BN - 6))
516 /* Crop layer error types */
517 #define TIDL_E_CROP ((int32_t) -1070)
518 #define TIDL_E_CROP_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_CROP - 0))
519 #define TIDL_E_CROP_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_CROP - 1))
520 #define TIDL_E_CROP_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_CROP - 2))
521 #define TIDL_E_CROP_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_CROP - 3))
522 #define TIDL_E_CROP_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_CROP - 4))
523 #define TIDL_E_CROP_INVALID_OFFSET_WIDTH ((int32_t) (TIDL_E_CROP - 5))
524 #define TIDL_E_CROP_INVALID_OFFSET_HEIGHT ((int32_t) (TIDL_E_CROP - 6))
525 /* Flatten layer error types */
526 #define TIDL_E_FLATTEN ((int32_t) -1080)
527 #define TIDL_E_FLATTEN_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_FLATTEN - 0))
528 #define TIDL_E_FLATTEN_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_FLATTEN - 1))
529 #define TIDL_E_FLATTEN_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_FLATTEN - 2))
530 #define TIDL_E_FLATTEN_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_FLATTEN - 3))
531 /* SoftMax error types */
532 #define TIDL_E_SOFTMAX ((int32_t) -1090)
533 #define TIDL_E_SOFTMAX_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_SOFTMAX - 0))
534 /* ShuffleChanel error types */
535 #define TIDL_E_SHUFFLECHANNEL ((int32_t) -1100)
536 #define TIDL_E_SHUFFLECHANNEL_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_SHUFFLECHANNEL - 0))
537 #define TIDL_E_SHUFFLECHANNEL_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_SHUFFLECHANNEL - 1))
538 #define TIDL_E_SHUFFLECHANNEL_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_SHUFFLECHANNEL - 2))
539 #define TIDL_E_SHUFFLECHANNEL_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_SHUFFLECHANNEL - 3))
540 #define TIDL_E_SHUFFLECHANNEL_INVALID_NUM_GROUPS ((int32_t) (TIDL_E_SHUFFLECHANNEL - 4))
541 /* Error types common to layers */
542 #define TIDL_E_COMMON ((int32_t) -1110)
543 #define TIDL_E_UNSUPPORTED_LAYER ((int32_t) (TIDL_E_COMMON - 0))
544 #define TIDL_E_DATAFLOW_INFO_NULL ((int32_t) (TIDL_E_COMMON - 1))
545 #define TIDL_E_INVALID_DEBUG_TRACE_PRM ((int32_t) (TIDL_E_COMMON - 2))
546 #define TIDL_E_INVALID_NET_VERSION ((int32_t) (TIDL_E_COMMON - 3))
547 #define TIDL_E_INVALID_IO_LINE_PITCH ((int32_t) (TIDL_E_COMMON - 4))
548 #define TIDL_E_QUANT_STATS_NOT_AVAILABALE ((int32_t) (TIDL_E_COMMON - 5))
549 /* @} */
550 
559 #define TIDL_SYSMEM_L1_SCRATCH ((uint32_t) 0)
560 #define TIDL_SYSMEM_L2_SCRATCH ((uint32_t) 1)
561 #define TIDL_SYSMEM_L3_SCRATCH ((uint32_t) 2)
562 #define TIDL_SYSMEM_DDR_SCRATCH ((uint32_t) 3)
563 #define TIDL_SYSMEM_MAX ((uint32_t) 4)
564 /* @} */
565 
576 #define TIDL_EXEC_MODE_STATS_COLLECTION ((int32_t) 0)
577 
578 #define TIDL_EXEC_MODE_INFER_PROCESS ((int32_t) 2)
579 #define TIDL_EXEC_MODE_INFER_PROCESS_REF ((int32_t) 3)
580 
581 
582 /* @} */
583 
593 typedef struct
594 {
595  void* ptr;
596  int32_t bufSize;
597  int32_t reserved[2];
598 }sBuffer_t;
599 
618 typedef struct
619 {
620  void *base;
621  int32_t size;
622  int32_t offset;
624 
630 typedef struct {
632  int32_t dataId;
634  int32_t elementType;
636  int32_t numDim;
638  int32_t dataQ;
640  int32_t minValue;
642  int32_t maxValue;
644  float32_tidl minTensorValue;
646  float32_tidl maxTensorValue;
648  float32_tidl tensorScale;
650  int32_t padW;
652  int32_t padH;
654  int32_t batchPadW;
656  int32_t batchPadH;
658  int32_t numBatchW;
660  int32_t numBatchH;
662  int32_t roundBits;
664  int32_t pitch[TIDL_DIM_MAX-1];
666  int32_t dimValues[TIDL_DIM_MAX];
668 
669 
670 
676 typedef struct {
678  int32_t numChannels;
680  int32_t dataQ;
682 
683 
689 typedef struct {
691  int32_t numGroups;
693  int32_t resvd;
695 
701 typedef struct {
703  int32_t blockSize;
705 
711 typedef struct {
713  int32_t padT;
715  int32_t padB;
717  int32_t padL;
719  int32_t padR;
721  int32_t padConstValue;
723  int32_t padType;
728 
734 typedef struct {
736  int32_t layerType;
740 
746 typedef enum
747 {
752 
758 typedef struct {
760  int32_t mode;
762  float32_tidl resizeRatio[TIDL_DIM_MAX];
764 
770 typedef enum
771 {
775 
781 typedef enum
782 {
787 
793 typedef enum
794 {
808 
814 typedef struct {
816  int32_t poolingType;
818  int32_t imWidth;
820  int32_t imHeight;
822 
823 
829 typedef struct {
831  int32_t slicePoints[TIDL_NUM_OUT_BUFS+1];
833  int32_t axis;
835  int32_t stride;
837 
843 typedef struct {
845  int32_t slope;
847  float32_tidl slopeScale;
849  float32_tidl clipMin;
850  //** maximum value for clip */
851  float32_tidl clipMax;
853  int32_t actType;
855 
861 typedef struct {
891  float32_tidl biasCalibrationFactor;
897 
898 
904 typedef struct {
906  int32_t numChannels;
908  int32_t inDataQ;
910  int32_t outDataQ;
912 
918 typedef struct {
920  int32_t numChannels;
922  int32_t poolingType;
924  int32_t kernelW;
926  int32_t kernelH;
928  int32_t strideW;
930  int32_t strideH;
932  int32_t padW;
934  int32_t padH;
936  int32_t inDataQ;
938  int32_t outDataQ;
940  int32_t useCeil;
942 
947 typedef struct {
952  int32_t padW;
955  int32_t padH;
961  int32_t memOverlapType;
997 
1003 typedef struct {
1005  int32_t weights;
1007  int32_t bias;
1014  int32_t numInChannels;
1018  int32_t numGroups;
1020  int32_t kernelW;
1022  int32_t kernelH;
1024  int32_t strideW;
1026  int32_t strideH;
1028  int32_t dilationW;
1030  int32_t dilationH;
1032  int32_t padW;
1034  int32_t padH;
1036  float32_tidl weightScale;
1038  float32_tidl biasScale;
1040  int32_t weightsQ;
1044  int32_t biasB;
1046  int32_t biasQ;
1048  int32_t inDataQ;
1050  int32_t outDataQ;
1052  int32_t interDataQ;
1054  int32_t enableBias;
1056  int32_t enablePooling;
1058  int32_t enableEltWise;
1060  int32_t enableEWRelU;
1062  int32_t kernelType;
1067  int32_t upscaleFactor;
1071 
1076 typedef enum
1077 {
1088 
1093 typedef enum
1094 {
1099 
1104 typedef enum
1105 {
1110 
1117 typedef struct {
1121  int32_t priorBox;
1123  int32_t priorBoxSize;
1125  int32_t numClasses;
1129  int32_t codeType;
1132  float32_tidl confThreshold;
1135  float32_tidl nmsThreshold;
1137  float32_tidl eta;
1139  int32_t topK;
1141  int32_t keepTopK;
1144  int32_t shareLocation;
1149  int32_t numKeypoints;
1152 
1154  int32_t numHeads;
1155 
1157  int32_t imWidth;
1158 
1160  int32_t imHeight;
1161 
1163  float32_tidl point3dRange[3][2];
1164 
1166  float32_tidl voxelSize[2];
1167 
1170 
1171  /*0 -> IDENTITY, 1 -> SIGMOID, 2 -> SOFTMAX*/
1173 
1175  int32_t metaArchType;
1176 
1177  /* 0 -> All the Data from given Anchor Box are together,
1178  1 -> Data from all Anchor Box are interleaved */
1179  int32_t dataLayout;
1180 
1182 
1183 
1184 #define TIDL_OD_MAX_KEYPOINTS (16)
1185 #define TIDL_OD_MAX_ANCHORS_PER_HEAD (16)
1186 
1193 typedef struct {
1194 
1196  int32_t numAnchors;
1198  int32_t numKeyPoints;
1200  int32_t headWidth;
1202  int32_t headHeight;
1204  float32_tidl strideW;
1206  float32_tidl strideH;
1208  float32_tidl offsetW;
1210  float32_tidl offsetH;
1212  float32_tidl offsetL;
1214  float32_tidl boxScales[4];
1216  float32_tidl kpScales[TIDL_OD_MAX_KEYPOINTS];
1218  float32_tidl boxLength[TIDL_OD_MAX_ANCHORS_PER_HEAD];
1220  float32_tidl boxWidth[TIDL_OD_MAX_ANCHORS_PER_HEAD];
1222  float32_tidl boxHeight[TIDL_OD_MAX_ANCHORS_PER_HEAD];
1223  float32_tidl * anchorInputs;
1224 
1226 
1232 typedef struct {
1234  int32_t axis;
1236  int32_t outDataQ;
1238 
1239 
1246 typedef struct {
1248  int32_t weights;
1250  int32_t bias;
1252  int32_t numChannels;
1254  int32_t biasQ;
1256  int32_t inDataQ;
1258  int32_t outDataQ;
1260  int32_t weightsQ;
1262  float32_tidl weightScale;
1264  float32_tidl biasScale;
1268 
1274 typedef struct {
1276  int32_t bias;
1278  int32_t numChannels;
1280  int32_t biasQ;
1282  int32_t inDataQ;
1284  int32_t outDataQ;
1286 
1292 typedef struct {
1294  int32_t weights;
1296  int32_t bias;
1300  int32_t numInNodes;
1302  int32_t numOutNodes;
1304  int32_t weightsQ;
1306  float32_tidl weightScale;
1308  float32_tidl biasScale;
1312  int32_t biasQ;
1314  int32_t inDataQ;
1316  int32_t outDataQ;
1318  int32_t interDataQ;
1320  int32_t biasB;
1322 
1328 typedef struct {
1330  int32_t bias;
1332  int32_t numChannels;
1334  int32_t eltWiseType;
1336  int32_t numInData;
1338  int32_t biasQ;
1340  int32_t inDataQ[TIDL_NUM_IN_BUFS];
1342  int32_t outDataQ;
1344 
1350 typedef struct {
1352  int32_t numChannels;
1354  int32_t inDataQ;
1356  int32_t outDataQ;
1358 
1364 typedef struct {
1366  int32_t numChannels;
1368  int32_t inDataQ;
1370  int32_t outDataQ;
1372  int32_t offsetW;
1374  int32_t offsetH;
1376 
1377 
1383 typedef struct {
1385  int32_t type;
1386  int32_t layout;
1387  int32_t zeroPoint;
1389 
1395 typedef struct {
1397  int32_t axis;
1398  /*keep the dimension or squeeze the dimension*/
1399  int32_t keepDims;
1400  /*which operation to happen as per @ref eTIDL_inReduceOp*/
1401  int32_t ops;
1403 
1409 typedef struct {
1411  int32_t axis;
1413  int8_t dataTensorName[TIDL_STRING_SIZE];
1415  int8_t indicesTensorName[TIDL_STRING_SIZE];
1417  int8_t updateTensorName[TIDL_STRING_SIZE];
1419 
1425 /* CHECK_MISRA("-18.4") -> Disable rule 18.4 */
1426 typedef union {
1450 
1452 /*RESET_MISRA("18.4") -> Reset rule 18.4 */
1453 
1459 typedef struct {
1464  int32_t layerType;
1466  int32_t numInBufs;
1468  int32_t numOutBufs;
1474  int32_t coreID;
1477  int32_t layersGroupId;
1482 }sTIDL_Layer_t;
1483 
1484 /* Based on last Updated Date */
1485 #define TIDL_NET_VERSION (0x20211201)
1486 
1491 typedef struct {
1493  int32_t netVersion;
1495  int32_t deviceName;
1497  int32_t numLayers;
1522  int32_t dataFlowInfo;
1528  int32_t reserved;
1532 
1537 typedef enum
1538 {
1543 
1548 typedef enum
1549 {
1555 
1560 typedef enum
1561 {
1566 
1571 typedef enum
1572 {
1576 
1582 typedef struct
1583 {
1585  int32_t numInputBuf;
1587  int32_t numOutputBuf;
1589  int32_t inDataFormat[TIDL_MAX_ALG_IN_BUFS];
1591  int32_t inResizeType[TIDL_MAX_ALG_IN_BUFS];
1593  int32_t resizeWidth[TIDL_MAX_ALG_IN_BUFS];
1595  int32_t resizeHeight[TIDL_MAX_ALG_IN_BUFS];
1597  int32_t inWidth[TIDL_MAX_ALG_IN_BUFS];
1599  int32_t inHeight[TIDL_MAX_ALG_IN_BUFS];
1601  int32_t inNumChannels[TIDL_MAX_ALG_IN_BUFS];
1603  int32_t inChannelPitch[TIDL_MAX_ALG_IN_BUFS];
1605  int32_t inNumBatches[TIDL_MAX_ALG_IN_BUFS];
1607  int32_t inPadL[TIDL_MAX_ALG_IN_BUFS];
1609  int32_t inPadT[TIDL_MAX_ALG_IN_BUFS];
1611  int32_t inPadR[TIDL_MAX_ALG_IN_BUFS];
1613  int32_t inPadB[TIDL_MAX_ALG_IN_BUFS];
1615  int32_t inPadCh[TIDL_MAX_ALG_IN_BUFS];
1617  int32_t rawDataInElementType[TIDL_MAX_ALG_IN_BUFS];
1619  int32_t inElementType[TIDL_MAX_ALG_IN_BUFS];
1621  int32_t inZeroPoint[TIDL_MAX_ALG_IN_BUFS];
1623  int32_t inLayout[TIDL_MAX_ALG_IN_BUFS];
1625  int32_t inDataId[TIDL_MAX_ALG_IN_BUFS];
1627  float32_tidl inTensorScale[TIDL_MAX_ALG_IN_BUFS];
1631  int32_t outWidth[TIDL_MAX_ALG_OUT_BUFS];
1633  int32_t outHeight[TIDL_MAX_ALG_OUT_BUFS];
1635  int32_t outNumChannels[TIDL_MAX_ALG_OUT_BUFS];
1637  int32_t outChannelPitch[TIDL_MAX_ALG_OUT_BUFS];
1639  int32_t outNumBatches[TIDL_MAX_ALG_OUT_BUFS];
1641  int32_t outPadL[TIDL_MAX_ALG_OUT_BUFS];
1643  int32_t outPadT[TIDL_MAX_ALG_OUT_BUFS];
1645  int32_t outPadR[TIDL_MAX_ALG_OUT_BUFS];
1647  int32_t outPadB[TIDL_MAX_ALG_OUT_BUFS];
1649  int32_t outPadCh[TIDL_MAX_ALG_OUT_BUFS];
1651  int32_t outElementType[TIDL_MAX_ALG_OUT_BUFS];
1653  int32_t outDataId[TIDL_MAX_ALG_OUT_BUFS];
1657  float32_tidl outTensorScale[TIDL_MAX_ALG_OUT_BUFS];
1659  int32_t outZeroPoint[TIDL_MAX_ALG_OUT_BUFS];
1661  int32_t outLayout[TIDL_MAX_ALG_OUT_BUFS];
1662 
1664 
1665 #if USE_IVISION
1666 
1672 typedef struct
1673 {
1675  IVISION_Params visionParams;
1679  int32_t isInbufsPaded;
1684 
1688  int32_t traceLogLevel;
1692  int32_t reservedCtrl;
1694  int32_t flowCtrl;
1703  float32_tidl maxPreEmptDelay;
1710  void * udmaDrvObj;
1718  int32_t(*TIDLVprintf)(const char * format, va_list arg);
1720  void *tracePtr;
1722  int32_t(*TIDLWriteBinToFile)(const char * fileName, void * addr, int32_t size, void *tracePtr);
1724  int32_t(*TIDLReadBinFromFile)(const char * fileName, void * addr, int32_t size);
1741  int32_t (*TIDL_CustomLayerProcess)(void * tidlHandle,
1742  sTIDL_Layer_t *tidlLayer,
1743  void *inPtrs[],
1744  void *outPtrs[],
1745  void *params,
1746  void *dmaUtilsContext,
1747  const sTIDL_sysMemHandle_t sysMems[TIDL_SYSMEM_MAX],
1748  int32_t execMode);
1749 }
1751 
1758 typedef struct
1759 {
1761  IVISION_InArgs iVisionInArgs;
1763  int32_t numInBufs;
1765  float32_tidl scale[TIDL_NUM_IN_BUFS];
1768 } TIDL_InArgs;
1769 
1776 typedef struct
1777 {
1779  IVISION_OutArgs iVisionOutArgs;
1781  int32_t numOutBufs;
1783  float32_tidl scale[TIDL_NUM_OUT_BUFS];
1784 
1785 } TIDL_outArgs;
1786 
1792 typedef struct
1793 {
1795  float32_tidl numDetObjects;
1797  float32_tidl objInfoSize;
1799  float32_tidl odNumKeyPoints;
1801  float32_tidl objInfoOffset;
1802 
1804 
1805 
1811 typedef struct
1812 {
1814  float32_tidl x;
1816  float32_tidl y;
1818  float32_tidl kpt_confidence;
1819 
1821 
1822 #define TIDL_OD_MAX_KEY_POINTS (32)
1823 
1824 
1830 typedef struct
1831 {
1833  float32_tidl ObjId;
1835  float32_tidl label;
1837  float32_tidl score;
1839  float32_tidl xmin;
1841  float32_tidl ymin;
1843  float32_tidl xmax;
1845  float32_tidl ymax;
1847 
1849 
1850 static inline float32_tidl TIDL_getWorstcaseDelayForPreemption(sTIDL_Network_t * net)
1851 {
1852  return net->preEmptWorstCaseDelay;
1853 }
1859 typedef struct
1860 {
1862  float32_tidl ObjId;
1864  float32_tidl label;
1866  float32_tidl score;
1868  float32_tidl x;
1870  float32_tidl y;
1872  float32_tidl z;
1874  float32_tidl w;
1876  float32_tidl l;
1878  float32_tidl h;
1880  float32_tidl yaw;
1882 
1883 static inline int TIDL_createParamsInit(TIDL_CreateParams * params)
1884 {
1885  params->net = NULL;
1886  params->udmaDrvObj = NULL;
1887  params->currLayersGroupId = 1;
1888  params->isInbufsPaded = 0;
1890  params->quantRangeExpansionFactor = 1.0;
1891  params->quantRangeUpdateFactor = -1.0;
1892  params->maxPreEmptDelay = FLT_MAX;
1893  params->visionParams.algParams.size = sizeof(TIDL_CreateParams);
1894  params->visionParams.cacheWriteBack = NULL;
1895  params->TIDLWriteBinToFile = NULL;
1896  params->TIDLReadBinFromFile = NULL;
1897  params->TIDLVprintf = NULL;
1898  params->pFxnLock = NULL;
1899  params->pFxnUnLock = NULL;
1900  params->traceLogLevel = 0;
1901  params->traceWriteLevel = 0;
1902  params->traceBaseName = NULL;
1903  params->tracePtr = NULL;
1904  params->reservedCtrl = 0;
1905 #if defined(x86_64) || defined(HOST_EMULATION)
1906  params->flowCtrl = 1;
1907 #else
1908  params->flowCtrl = 0;
1909 #endif
1910 
1911  return IALG_EOK;
1912 }
1913 
1914 #endif
1915 
1916 #ifdef __cplusplus
1917 }
1918 #endif
1919 
1921 /* iTI_DL */
1922 
1923 #endif /*ITIDL_H_ */
1924 /*==========================================================================*/
1925 /* END of the FILE */
1926 /*==========================================================================*/
int32_t enableEltWise
Definition: itidl_ti.h:1058
This structure define the parameters Soft max layer in TIDL.
Definition: itidl_ti.h:1350
float32_tidl maxTensorValue
Definition: itidl_ti.h:646
int32_t weights
Definition: itidl_ti.h:1294
Definition: itidl_ti.h:1553
sTIDL_odOutputReformatLayerParams_t odOutputReformatLayerParams
Definition: itidl_ti.h:1445
float32_tidl xmin
Definition: itidl_ti.h:1839
int32_t biasQ
Definition: itidl_ti.h:1254
Definition: itidl_ti.h:802
sTIDL_SliceLayerParams_t sliceParams
Definition: itidl_ti.h:1440
int32_t padType
Definition: itidl_ti.h:723
float32_tidl quantRangeUpdateFactor
Definition: itidl_ti.h:1686
int32_t strideW
Definition: itidl_ti.h:928
sTIDL_ShuffleLayerParams_t shuffleLayerParams
Definition: itidl_ti.h:1439
This structure define the parameters ScatterElements layer in TIDL.
Definition: itidl_ti.h:1409
int32_t offset
Definition: itidl_ti.h:622
float32_tidl clipMin
Definition: itidl_ti.h:849
IVISION_InArgs iVisionInArgs
Definition: itidl_ti.h:1761
int32_t strideOffsetMethod
Definition: itidl_ti.h:1481
int32_t upscaleFactor
Definition: itidl_ti.h:1067
Definition: itidl_ti.h:1084
float32_tidl ObjId
Definition: itidl_ti.h:1862
float32_tidl biasScale
Definition: itidl_ti.h:1264
int32_t traceWriteLevel
Definition: itidl_ti.h:1690
int32_t numGroups
Definition: itidl_ti.h:1018
float32_tidl y
Definition: itidl_ti.h:1816
int32_t inHeightOdNetwork
Definition: itidl_ti.h:738
Definition: itidl_ti.h:1551
int32_t perChannelPadConstTensorOffset
Definition: itidl_ti.h:726
sTIDL_ReduceParams_t reduceParams
Definition: itidl_ti.h:1448
int32_t kernelType
Definition: itidl_ti.h:1062
int32_t numInData
Definition: itidl_ti.h:1336
int32_t padR
Definition: itidl_ti.h:719
int32_t layersGroupId
Definition: itidl_ti.h:1477
float32_tidl kpt_confidence
Definition: itidl_ti.h:1818
eTIDL_inReduceOp
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1571
float32_tidl clipMax
Definition: itidl_ti.h:851
This union define the layer specific parameters of all the supported layers in TIDL.
Definition: itidl_ti.h:1426
void * traceBaseName
Definition: itidl_ti.h:1705
int32_t padW
Definition: itidl_ti.h:1032
Definition: itidl_ti.h:1108
int32_t isInbufsPaded
Definition: itidl_ti.h:1679
int32_t roundBits
Definition: itidl_ti.h:662
int32_t numInNodes
Definition: itidl_ti.h:1300
float32_tidl percentileActRangeShrink
Definition: itidl_ti.h:881
int32_t resvd
Definition: itidl_ti.h:693
int32_t quantizationStyle
Definition: itidl_ti.h:1509
This structure define the parameters Dat Convert layer in TIDL.
Definition: itidl_ti.h:1383
int32_t(* TIDLReadBinFromFile)(const char *fileName, void *addr, int32_t size)
Definition: itidl_ti.h:1724
int32_t biasQ
Definition: itidl_ti.h:1280
int32_t poolingType
Definition: itidl_ti.h:922
int32_t kernelW
Definition: itidl_ti.h:924
#define TIDL_NUM_MAX_LAYERS
Definition: itidl_ti.h:104
Definition: itidl_ti.h:799
sTIDL_ScatterElementsParams_t scatterElementsParams
Definition: itidl_ti.h:1449
void * udmaDrvObj
Definition: itidl_ti.h:1710
This structure contains all the parameters which TI DL library at create time.
Definition: itidl_ti.h:1672
Definition: itidl_ti.h:1541
int32_t processingType
Definition: itidl_ti.h:1119
float32_tidl ymin
Definition: itidl_ti.h:1841
int32_t inDataQ
Definition: itidl_ti.h:1048
This structure defines the Input and output buffer descriptors required for a given Layer group...
Definition: itidl_ti.h:1582
int32_t inDataQ
Definition: itidl_ti.h:1256
sTIDL_BiasParams_t biasParams
Definition: itidl_ti.h:1437
This structure define the parameters of ROI Pooling layer in TIDL.
Definition: itidl_ti.h:814
static float32_tidl TIDL_getWorstcaseDelayForPreemption(sTIDL_Network_t *net)
Definition: itidl_ti.h:1850
Definition: itidl_ti.h:749
Definition: itidl_ti.h:1106
int32_t codeType
Definition: itidl_ti.h:1129
Definition: itidl_ti.h:1086
int32_t numKeyPoints
Definition: itidl_ti.h:1198
#define TIDL_SYSMEM_MAX
Definition: itidl_ti.h:563
int32_t blockSize
Definition: itidl_ti.h:703
sTIDL_ResizeLayerParams_t resizeParams
Definition: itidl_ti.h:1441
sTIDL_Network_t * net
Definition: itidl_ti.h:1712
Definition: itidl_ti.h:1085
int32_t numChannels
Definition: itidl_ti.h:906
sTIDL_RoiPoolingLayerParams_t roiPoolingParams
Definition: itidl_ti.h:1442
int32_t layerType
Definition: itidl_ti.h:736
sTIDL_ActParams_t actParams
Definition: itidl_ti.h:1462
int32_t offsetH
Definition: itidl_ti.h:1374
float32_tidl strideH
Definition: itidl_ti.h:1206
int32_t enableLayerPerfTraces
Definition: itidl_ti.h:1767
int32_t inWidthOdNetwork
Definition: itidl_ti.h:737
float32_tidl yaw
Definition: itidl_ti.h:1880
int32_t kernelW
Definition: itidl_ti.h:1020
int32_t numLayers
Definition: itidl_ti.h:1497
int32_t dataId
Definition: itidl_ti.h:632
int32_t zeroWeightValue
Definition: itidl_ti.h:1266
This structure defines the system memory handles in TIDL There are total four handles: 0: L1...
Definition: itidl_ti.h:618
Definition: itidl_ti.h:750
int32_t netVersion
Definition: itidl_ti.h:1493
int32_t outDataQ
Definition: itidl_ti.h:1370
Definition: itidl_ti.h:798
sTIDL_CalibParams_t calibrationParams
Definition: itidl_ti.h:1520
float32_tidl biasCalibrationFactor
Definition: itidl_ti.h:891
float32_tidl score
Definition: itidl_ti.h:1866
void * base
Definition: itidl_ti.h:620
int32_t rsvdPassThrough
Definition: itidl_ti.h:995
int32_t biasB
Definition: itidl_ti.h:1320
static int TIDL_createParamsInit(TIDL_CreateParams *params)
Definition: itidl_ti.h:1883
Definition: itidl_ti.h:1079
This structure define the parameters of Pad layer in TIDL.
Definition: itidl_ti.h:711
int32_t numInBufs
Definition: itidl_ti.h:1763
int32_t imHeight
Definition: itidl_ti.h:820
int32_t enablePooling
Definition: itidl_ti.h:1056
Definition: itidl_ti.h:1080
int32_t coreID
Definition: itidl_ti.h:1474
sTIDL_SoftMaxParams_t softMaxParams
Definition: itidl_ti.h:1433
#define TIDL_MAX_ALG_IN_BUFS
Definition: itidl_ti.h:109
eTIDL_inResizeType
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1560
int32_t axis
Definition: itidl_ti.h:833
int32_t imWidth
Definition: itidl_ti.h:818
int32_t enableEWRelU
Definition: itidl_ti.h:1060
sTIDL_CropParams_t cropParams
Definition: itidl_ti.h:1434
This structure define the parameters spatial Pooling layer in TIDL.
Definition: itidl_ti.h:918
int32_t outDataQ
Definition: itidl_ti.h:938
void * tracePtr
Definition: itidl_ti.h:1720
int32_t stride
Definition: itidl_ti.h:835
int32_t padT
Definition: itidl_ti.h:713
int32_t dilationW
Definition: itidl_ti.h:1028
int32_t zeroPoint
Definition: itidl_ti.h:1387
int32_t flowCtrl
Definition: itidl_ti.h:1694
int32_t elementType
Definition: itidl_ti.h:634
int32_t outDataQ
Definition: itidl_ti.h:1356
int32_t minValue
Definition: itidl_ti.h:640
int32_t keepDims
Definition: itidl_ti.h:1399
#define TIDL_DIM_MAX
Definition: itidl_ti.h:433
int32_t dilationH
Definition: itidl_ti.h:1030
Definition: itidl_ti.h:829
float float32_tidl
Definition: itidl_ti.h:115
int32_t biasQ
Definition: itidl_ti.h:1338
float32_tidl weightScale
Definition: itidl_ti.h:1306
Definition: itidl_ti.h:1564
int32_t numInChannels
Definition: itidl_ti.h:1014
int32_t padH
Definition: itidl_ti.h:652
float32_tidl biasScale
Definition: itidl_ti.h:1308
This structure define the parameters Arg max layer in TIDL.
Definition: itidl_ti.h:904
int32_t poolingType
Definition: itidl_ti.h:816
sTIDL_PoolingParams_t poolParams
Definition: itidl_ti.h:1069
float32_tidl offsetH
Definition: itidl_ti.h:1210
Definition: itidl_ti.h:783
int32_t numChannels
Definition: itidl_ti.h:1366
This structure define the parameters of Bias layer in TIDL.
Definition: itidl_ti.h:1274
int32_t outDataQ
Definition: itidl_ti.h:1050
This structure contains the each object&#39;s information detected by Objection detection layer...
Definition: itidl_ti.h:1830
float32_tidl x
Definition: itidl_ti.h:1814
Definition: itidl_ti.h:1562
int32_t doesLayerFillOutXPadding
Definition: itidl_ti.h:993
float32_tidl z
Definition: itidl_ti.h:1872
int32_t zeroWeightValue
Definition: itidl_ti.h:1042
int32_t slope
Definition: itidl_ti.h:845
float32_tidl nmsThreshold
Definition: itidl_ti.h:1135
sTIDL_ConvParams_t convParams
Definition: itidl_ti.h:1427
int32_t outDataQ
Definition: itidl_ti.h:1284
This structure define the parameters of Detection Output Layer in TIDL.
Definition: itidl_ti.h:1117
float32_tidl objInfoSize
Definition: itidl_ti.h:1797
Definition: itidl_ti.h:1539
float32_tidl quantRangeExpansionFactor
Definition: itidl_ti.h:1683
eTIDL_PadLayerPadType
This enumerator defines the different types of padding supported by TIDL library. ...
Definition: itidl_ti.h:781
This structure define the parameters of ReLU activation layer in TIDL.
Definition: itidl_ti.h:861
This structure define the parameters of Data layer in TIDL.
Definition: itidl_ti.h:676
int32_t outDataQ
Definition: itidl_ti.h:910
#define TIDL_OD_MAX_KEY_POINTS
Definition: itidl_ti.h:1822
int32_t numOutNodes
Definition: itidl_ti.h:1302
int32_t numOutBufs
Definition: itidl_ti.h:1468
int32_t varianceEncoded
Definition: itidl_ti.h:1147
int32_t outDataQ
Definition: itidl_ti.h:1316
float32_tidl biasScale
Definition: itidl_ti.h:1038
int32_t padB
Definition: itidl_ti.h:715
int32_t outDataQ
Definition: itidl_ti.h:1342
int32_t kernelH
Definition: itidl_ti.h:1022
int32_t activationType
Definition: itidl_ti.h:1298
Definition: itidl_ti.h:1097
float32_tidl ObjId
Definition: itidl_ti.h:1833
int32_t weightsQ
Definition: itidl_ti.h:1260
float32_tidl offsetL
Definition: itidl_ti.h:1212
int32_t bias
Definition: itidl_ti.h:1330
#define TIDL_NUM_OUT_BUFS
Definition: itidl_ti.h:106
This structure define common parameters ReduceMax/ReduceMin layer in TIDL.
Definition: itidl_ti.h:1395
int32_t(* TIDL_Lock_t)(void)
Call back function pointer to lock interrupts.
Definition: itidl_ti.h:124
TIDL_Lock_t pFxnLock
Definition: itidl_ti.h:1714
int32_t padW
Definition: itidl_ti.h:650
int32_t interDataQ
Definition: itidl_ti.h:1052
float32_tidl weightScale
Definition: itidl_ti.h:1262
float32_tidl score
Definition: itidl_ti.h:1837
int32_t outDataQ
Definition: itidl_ti.h:1258
float32_tidl weightScale
Definition: itidl_ti.h:1036
float32_tidl percentileWtRangeShrink
Definition: itidl_ti.h:888
int32_t numOutputBuf
Definition: itidl_ti.h:1587
float32_tidl tensorScale
Definition: itidl_ti.h:648
This structure define the parameters Convolution Layer in TIDL.
Definition: itidl_ti.h:1003
int32_t offsetW
Definition: itidl_ti.h:1372
Definition: itidl_ti.h:1078
int32_t numBatchW
Definition: itidl_ti.h:658
int32_t maxPointsPerVoxel
Definition: itidl_ti.h:1169
void * ptr
Definition: itidl_ti.h:595
Definition: itidl_ti.h:795
int32_t inDataQ
Definition: itidl_ti.h:908
float32_tidl l
Definition: itidl_ti.h:1876
This structure define the parameters of Batch Norm layer in TIDL.
Definition: itidl_ti.h:1246
This structure define the parameters of the OD output reformatting layer in TIDL. ...
Definition: itidl_ti.h:734
int32_t keepTopK
Definition: itidl_ti.h:1141
This structure define the parameters of Shuffle layer in TIDL.
Definition: itidl_ti.h:689
Definition: itidl_ti.h:1096
int32_t actType
Definition: itidl_ti.h:853
sTIDL_PadLayerParams_t padLayerParams
Definition: itidl_ti.h:1444
eTIDL_odOutputReformatType
This enumerator defines the different types of output types for the OD output reformatting layer...
Definition: itidl_ti.h:793
int32_t enableBias
Definition: itidl_ti.h:1054
int32_t dataElementSize
Definition: itidl_ti.h:1505
int32_t biasQ
Definition: itidl_ti.h:1312
This structure define the common layer parameters in TIDL.
Definition: itidl_ti.h:1459
int32_t scoreConverter
Definition: itidl_ti.h:1172
int32_t inDataQ
Definition: itidl_ti.h:1314
eTIDL_metaArchType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1076
int32_t padH
Definition: itidl_ti.h:955
Definition: itidl_ti.h:804
eTIDL_RoiPoolingType
This enumerator defines the different types of ROI pooling supported by TIDL library.
Definition: itidl_ti.h:770
int32_t convolutionType
Definition: itidl_ti.h:1012
int32_t batchPadW
Definition: itidl_ti.h:654
This structure define the parameters of data or kernel buffer used by TIDL layers (In...
Definition: itidl_ti.h:630
sTIDL_LayerParams_t layerParams
Definition: itidl_ti.h:1460
int32_t weights
Definition: itidl_ti.h:1248
int32_t biasB
Definition: itidl_ti.h:1044
float32_tidl objInfoOffset
Definition: itidl_ti.h:1801
Definition: itidl_ti.h:748
int32_t traceLogLevel
Definition: itidl_ti.h:1688
int32_t axis
Definition: itidl_ti.h:1397
This structure define the parameters of ReLU activation layer in TIDL.
Definition: itidl_ti.h:843
This structure define the parameters CNN/Deep learning net in TIDL.
Definition: itidl_ti.h:1491
int32_t biasCalibrationIterations
Definition: itidl_ti.h:895
int32_t strideH
Definition: itidl_ti.h:1026
int32_t strideH
Definition: itidl_ti.h:930
int32_t headWidth
Definition: itidl_ti.h:1200
float32_tidl preEmptWorstCaseDelay
Definition: itidl_ti.h:1526
sTIDL_EltWiseParams_t eltWiseParams
Definition: itidl_ti.h:1428
float32_tidl numDetObjects
Definition: itidl_ti.h:1795
#define TIDL_MAX_ALG_OUT_BUFS
Definition: itidl_ti.h:110
int32_t eltWiseType
Definition: itidl_ti.h:1334
sTIDL_ConcatParams_t concatParams
Definition: itidl_ti.h:1435
int32_t bias
Definition: itidl_ti.h:1296
int32_t numAnchors
Definition: itidl_ti.h:1196
int32_t numKeypoints
Definition: itidl_ti.h:1149
int32_t priorBox
Definition: itidl_ti.h:1121
float32_tidl h
Definition: itidl_ti.h:1878
int32_t doesLayerChangePadding
Definition: itidl_ti.h:967
float32_tidl eta
Definition: itidl_ti.h:1137
int32_t useCeil
Definition: itidl_ti.h:940
int32_t padConstValue
Definition: itidl_ti.h:721
int32_t topK
Definition: itidl_ti.h:1139
int32_t numChannels
Definition: itidl_ti.h:1352
int32_t padH
Definition: itidl_ti.h:934
float32_tidl y
Definition: itidl_ti.h:1870
int32_t padH
Definition: itidl_ti.h:1034
int32_t optimiseExtMem
Definition: itidl_ti.h:1681
Definition: itidl_ti.h:1574
int32_t inDataQ
Definition: itidl_ti.h:1368
const IVISION_Fxns TIDL_VISION_FXNS
The unique const function table for the TI deep learning algorithm.
double float64_tidl
Definition: itidl_ti.h:117
int32_t interElementSize
Definition: itidl_ti.h:1507
This structure contains the header information of Objection detection layer.
Definition: itidl_ti.h:1792
float32_tidl label
Definition: itidl_ti.h:1835
int32_t size
Definition: itidl_ti.h:621
Definition: itidl_ti.h:801
int32_t slopeElementSize
Definition: itidl_ti.h:1501
sTIDL_BatchNormParams_t batchNormParams
Definition: itidl_ti.h:1438
int32_t dataFlowInfo
Definition: itidl_ti.h:1522
Definition: itidl_ti.h:806
Definition: itidl_ti.h:772
eTIDL_inYuvFormat
This enumerator defines the different YUV formats.
Definition: itidl_ti.h:1548
sTIDL_dataConvertParams_t dataConvertParams
Definition: itidl_ti.h:1446
IVISION_Params visionParams
Definition: itidl_ti.h:1675
Definition: itidl_ti.h:796
int32_t keypointConfidence
Definition: itidl_ti.h:1151
This structure define the parameters of Element wise layer in TIDL.
Definition: itidl_ti.h:1328
int32_t numChannels
Definition: itidl_ti.h:678
Definition: itidl_ti.h:784
sTIDL_InnerProductParams_t innerProductParams
Definition: itidl_ti.h:1430
This structure defines the parameters for custom layer in TIDL.
Definition: itidl_ti.h:947
int32_t biasElementSize
Definition: itidl_ti.h:1503
This structure define the parameters of AnchorBox used by Detection Output Layer in TIDL...
Definition: itidl_ti.h:1193
sTIDL_PoolingParams_t poolParams
Definition: itidl_ti.h:1429
Definition: itidl_ti.h:1095
#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:344
sTIDL_ArgMaxParams_t argMaxParams
Definition: itidl_ti.h:1432
int32_t numOutChannels
Definition: itidl_ti.h:1016
Definition: itidl_ti.h:773
int32_t numGroups
Definition: itidl_ti.h:691
int32_t shareLocation
Definition: itidl_ti.h:1144
int32_t backgroundLabelId
Definition: itidl_ti.h:1127
This structure define the parameters of Inner Product (Fully connected) layer in TIDL.
Definition: itidl_ti.h:1292
Definition: itidl_ti.h:1573
eTIDL_inDataFormat
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1537
int32_t weightRangeMethod
Definition: itidl_ti.h:873
int32_t inDataQ
Definition: itidl_ti.h:936
int32_t outDataQ
Definition: itidl_ti.h:1236
int32_t imHeight
Definition: itidl_ti.h:1160
float32_tidl label
Definition: itidl_ti.h:1864
int32_t priorBoxSize
Definition: itidl_ti.h:1123
TIDL_Unlock_t pFxnUnLock
Definition: itidl_ti.h:1716
Definition: itidl_ti.h:800
IVISION_OutArgs iVisionOutArgs
Definition: itidl_ti.h:1779
int32_t calibrationOption
Definition: itidl_ti.h:1516
int32_t inDataQ
Definition: itidl_ti.h:1354
int32_t numBatchH
Definition: itidl_ti.h:660
int32_t dataQ
Definition: itidl_ti.h:638
int32_t reserved
Definition: itidl_ti.h:1528
int32_t strideW
Definition: itidl_ti.h:1024
int32_t type
Definition: itidl_ti.h:1385
#define TIDL_STRING_SIZE
Definition: itidl_ti.h:107
int32_t numInputBuf
Definition: itidl_ti.h:1585
int32_t weightsElementSizeInBits
Definition: itidl_ti.h:1479
sTIDL_DepthToSpaceParams_t depthToSpaceParams
Definition: itidl_ti.h:1443
float32_tidl xmax
Definition: itidl_ti.h:1843
This structure contains the key points information of BBox detected by OD layer.
Definition: itidl_ti.h:1811
Definition: itidl_ti.h:1563
float32_tidl x
Definition: itidl_ti.h:1868
int32_t numChannels
Definition: itidl_ti.h:1252
sTIDL_DataLayerParams_t dataLayerParams
Definition: itidl_ti.h:1431
int32_t numClasses
Definition: itidl_ti.h:1125
float32_tidl slopeScale
Definition: itidl_ti.h:847
int32_t currLayersGroupId
Definition: itidl_ti.h:1677
Definition: itidl_ti.h:803
This structure define the parameters of data or kernel buffer memory in TIDL.
Definition: itidl_ti.h:593
int32_t(* TIDLWriteBinToFile)(const char *fileName, void *addr, int32_t size, void *tracePtr)
Definition: itidl_ti.h:1722
float32_tidl confThreshold
Definition: itidl_ti.h:1132
Definition: itidl_ti.h:1107
int32_t deviceName
Definition: itidl_ti.h:1495
int32_t inDataQ
Definition: itidl_ti.h:1282
int32_t numChannels
Definition: itidl_ti.h:1332
int32_t weightsQ
Definition: itidl_ti.h:1304
int32_t bias
Definition: itidl_ti.h:1007
int32_t biasQ
Definition: itidl_ti.h:1046
This structure contains all the parameters which controls the applet at create time.
Definition: itidl_ti.h:1758
int32_t activationRangeMethod
Definition: itidl_ti.h:866
int32_t bias
Definition: itidl_ti.h:1250
float32_tidl maxPreEmptDelay
Definition: itidl_ti.h:1703
int32_t zeroWeightValue
Definition: itidl_ti.h:1310
This structure contains the each object&#39;s information detected by 3D Objection detection layer...
Definition: itidl_ti.h:1859
int32_t enableDepthToSpace
Definition: itidl_ti.h:1064
This structure contains all the parameters which controls the applet at create time.
Definition: itidl_ti.h:1776
int32_t interDataQ
Definition: itidl_ti.h:1318
void(* TIDL_Unlock_t)(int32_t)
Call back function pointer to unlock interrupts.
Definition: itidl_ti.h:132
int32_t padW
Definition: itidl_ti.h:932
Definition: itidl_ti.h:1083
Definition: itidl_ti.h:1082
int32_t axis
Definition: itidl_ti.h:1411
int32_t(* TIDLVprintf)(const char *format, va_list arg)
Definition: itidl_ti.h:1718
int32_t weightsQ
Definition: itidl_ti.h:1040
This structure define the parameters of PriorBox layer in TIDL.
Definition: itidl_ti.h:1232
Definition: itidl_ti.h:785
int32_t layout
Definition: itidl_ti.h:1386
int32_t dataLayout
Definition: itidl_ti.h:1179
int32_t weights
Definition: itidl_ti.h:1005
eTIDL_processingType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1093
int32_t batchPadH
Definition: itidl_ti.h:656
int32_t numInBufs
Definition: itidl_ti.h:1466
int32_t ops
Definition: itidl_ti.h:1401
int32_t dataQ
Definition: itidl_ti.h:680
int32_t imWidth
Definition: itidl_ti.h:1157
int32_t kernelH
Definition: itidl_ti.h:926
int32_t bias
Definition: itidl_ti.h:1276
#define TIDL_OD_MAX_ANCHORS_PER_HEAD
Definition: itidl_ti.h:1185
int32_t isQuantStatsAvailable
Definition: itidl_ti.h:1524
int32_t numOutBufs
Definition: itidl_ti.h:1781
int32_t metaArchType
Definition: itidl_ti.h:1175
float32_tidl offsetW
Definition: itidl_ti.h:1208
int32_t numChannels
Definition: itidl_ti.h:1278
float32_tidl * anchorInputs
Definition: itidl_ti.h:1223
float32_tidl odNumKeyPoints
Definition: itidl_ti.h:1799
This structure define the parameters Crop layer in TIDL.
Definition: itidl_ti.h:1364
Definition: itidl_ti.h:1550
#define TIDL_NUM_IN_BUFS
Definition: itidl_ti.h:105
sTIDL_CustomParams_t customParams
Definition: itidl_ti.h:1447
int32_t reservedCtrl
Definition: itidl_ti.h:1692
int32_t weightsElementSize
Definition: itidl_ti.h:1499
int32_t bufSize
Definition: itidl_ti.h:596
Definition: itidl_ti.h:1081
int32_t padW
Definition: itidl_ti.h:952
int32_t perChannelWeightScaleOffset
Definition: itidl_ti.h:1010
int32_t numChannels
Definition: itidl_ti.h:920
This structure define the parameters of Depth To Space layer in TIDL.
Definition: itidl_ti.h:701
This structure define the parameters of Resize layer in TIDL.
Definition: itidl_ti.h:758
int32_t memOverlapType
Definition: itidl_ti.h:961
Definition: itidl_ti.h:797
#define TIDL_OD_MAX_KEYPOINTS
Definition: itidl_ti.h:1184
int32_t headHeight
Definition: itidl_ti.h:1202
int32_t layerType
Definition: itidl_ti.h:1464
int32_t axis
Definition: itidl_ti.h:1234
eTIDL_scoreConverterType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1104
float32_tidl minTensorValue
Definition: itidl_ti.h:644
int32_t padL
Definition: itidl_ti.h:717
float32_tidl w
Definition: itidl_ti.h:1874
int32_t maxValue
Definition: itidl_ti.h:642
int32_t mode
Definition: itidl_ti.h:760
int32_t numDim
Definition: itidl_ti.h:636
Definition: itidl_ti.h:1540
Definition: itidl_ti.h:1552
float32_tidl strideW
Definition: itidl_ti.h:1204
sTIDL_DetectOutputParams_t detectOutParams
Definition: itidl_ti.h:1436
float32_tidl ymax
Definition: itidl_ti.h:1845
int32_t customLayerType
Definition: itidl_ti.h:949
int32_t numHeads
Definition: itidl_ti.h:1154
eTIDL_ResizeType
This enumerator defines the different types of element type used by TIDL library. ...
Definition: itidl_ti.h:746