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 
76 #ifndef ITIDL_H_
77 #define ITIDL_H_
78 
79 #define USE_IVISION (1)
80 
81 #include <stdint.h>
82 #include <stdarg.h>
83 #include <stdlib.h>
84 #include <float.h>
85 
86 #ifdef TIDL_IMPORT_TOOL
87 #define USE_IVISION (0)
88 #endif
89 
90 #if USE_IVISION
91 #include <ivision.h>
92 
93 
94 
98 extern const IVISION_Fxns TIDL_VISION_FXNS;
99 
100 
101 #endif
102 #ifdef __cplusplus
103 extern "C" {
104 #endif
105 
106 #define TIDL_NUM_MAX_LAYERS ((int32_t) 1536)
107 #define TIDL_NUM_IN_BUFS ((int32_t) 24)
108 #define TIDL_NUM_OUT_BUFS ((int32_t) 16)
109 #define TIDL_STRING_SIZE ((int32_t) 512)
110 #define TIDL_MAX_DATA_BUFS ((int32_t) 1536)
111 #define TIDL_MAX_ALG_IN_BUFS ((int32_t) 32)
112 #define TIDL_MAX_ALG_OUT_BUFS ((int32_t) 128)
113 #define TIDL_MAX_NUM_GROUPS ((int32_t) 64)
114 #define TIDL_MAX_PRIORITY_LEVEL ((int32_t) 8)
115 #define TIDL_MAX_OBJECTS_PER_LEVEL ((int32_t) 16)
116 
117 #if defined (SOC_J784S4)
118  #define TIDL_MAX_NUM_CORES (4)
119 #endif
120 
121 #if defined (SOC_J722S)
122  #define TIDL_MAX_NUM_CORES (2)
123 #endif
124 
125 #if defined (SOC_AM62A) || defined (SOC_J721E) || defined (SOC_J721S2)
126  #define TIDL_MAX_NUM_CORES (1)
127 #endif
128 
129 /* Typedef for 32 bit float */
130 typedef float float32_tidl;
131 /* Typedef for 64 bit float */
132 typedef double float64_tidl;
133 
139 typedef int32_t (*TIDL_Lock_t) (void) ;
147 typedef void (*TIDL_Unlock_t) (int32_t);
148 
157 #define TIDL_DataLayer ((int32_t) 0)
158 #define TIDL_ConvolutionLayer ((int32_t) 1)
159 #define TIDL_PoolingLayer ((int32_t) 2)
160 #define TIDL_ReLULayer ((int32_t) 3)
161 #define TIDL_PReLULayer ((int32_t) 4)
162 #define TIDL_EltWiseLayer ((int32_t) 5)
163 #define TIDL_InnerProductLayer ((int32_t) 6)
164 #define TIDL_SoftMaxLayer ((int32_t) 7)
165 #define TIDL_BatchNormLayer ((int32_t) 8)
166 #define TIDL_BiasLayer ((int32_t) 9)
167 #define TIDL_ScaleLayer ((int32_t) 10)
168 #define TIDL_Deconv2DLayer ((int32_t) 11)
169 #define TIDL_ConcatLayer ((int32_t) 12)
170 #define TIDL_SplitLayer ((int32_t) 13)
171 #define TIDL_SliceLayer ((int32_t) 14)
172 #define TIDL_CropLayer ((int32_t) 15)
173 #define TIDL_FlattenLayer ((int32_t) 16)
174 #define TIDL_DropOutLayer ((int32_t) 17)
175 #define TIDL_ArgMaxLayer ((int32_t) 18)
176 #define TIDL_DetectionOutputLayer ((int32_t) 19)
177 #define TIDL_ShuffleChannelLayer ((int32_t) 20)
178 #define TIDL_ResizeLayer ((int32_t) 21)
179 #define TIDL_RoiPoolingLayer ((int32_t) 22)
180 #define TIDL_OdPostProcessingLayer ((int32_t) 23)
181 #define TIDL_DepthToSpaceLayer ((int32_t) 24)
182 #define TIDL_SigmoidLayer ((int32_t) 25)
183 #define TIDL_PadLayer ((int32_t) 26)
184 #define TIDL_ColorConversionLayer ((int32_t) 27)
185 #define TIDL_OdOutputReformatLayer ((int32_t) 28)
186 #define TIDL_DataConvertLayer ((int32_t) 29)
187 #define TIDL_CustomLayer ((int32_t) 30)
188 #define TIDL_BatchReshapeLayer ((int32_t) 31)
189 #define TIDL_ReduceLayer ((int32_t) 32)
190 #define TIDL_ScatterElementsLayer ((int32_t) 33)
191 #define TIDL_SqueezeLayer ((int32_t) 34)
192 #define TIDL_TanhLayer ((int32_t) 35)
193 #define TIDL_HardSigmoidLayer ((int32_t) 36)
194 #define TIDL_ELULayer ((int32_t) 37)
195 #define TIDL_ReshapeLayer ((int32_t) 38)
196 #define TIDL_ConstDataLayer ((int32_t) 39)
197 #define TIDL_GatherLayer ((int32_t) 40)
198 #define TIDL_TransposeLayer ((int32_t) 41)
199 #define TIDL_LayerNormLayer ((int32_t) 42)
200 #define TIDL_UnsupportedLayer ((int32_t) 43)
201 /* @} */
202 
211 #define TIDL_HighPrecisionKernel ((int32_t) 0)
212 #define TIDL_HighThroughputKernel ((int32_t) 1)
213 /* @} */
214 
223 #define TIDL_UnsignedChar ((int32_t) 0)
224 #define TIDL_SignedChar ((int32_t) 1)
225 #define TIDL_UnsignedShort ((int32_t) 2)
226 #define TIDL_SignedShort ((int32_t) 3)
227 #define TIDL_UnsignedWord ((int32_t) 4)
228 #define TIDL_SignedWord ((int32_t) 5)
229 #define TIDL_SinglePrecFloat ((int32_t) 6)
230 #define TIDL_UnsignedDoubleWord ((int32_t) 7)
231 #define TIDL_SignedDoubleWord ((int32_t) 8)
232 /* @} */
233 
244 #define TIDL_LT_NCHW ((uint32_t) 0)
245 #define TIDL_LT_NHWC ((uint32_t) 1)
246 #define TIDL_LT_MAX (TIDLRT_LT_NHWC+1)
247 /* @} */
248 
249 
258 #define TIDL_DC_TYPE_INPUT ((uint32_t) 0)
259 #define TIDL_DC_TYPE_OUTPUT ((uint32_t) 1)
260 #define TIDL_DC_TYPE_INTERMEDIATE ((uint32_t) 2)
261 #define TIDL_DC_TYPE_MAX (TIDL_DC_TYPE_INTERMEDIATE+1)
262 /* @} */
263 
264 
275 #define TIDL_QuantStyleFixed ((int32_t) 0)
276 
278 #define TIDL_QuantStyleDynamic ((int32_t) 1)
279 
281 #define TIDL_QuantStyleNP2Fixed ((int32_t) 2)
282 
284 #define TIDL_QuantStyleP2Dynamic ((int32_t) 3)
285 
287 #define TIDL_QuantStyleNonP2
288 
290 #define TIDL_QuantStyleAsymNP2_TFL ((int32_t) 5)
291 
294 #define TIDL_QuantStyleAsymNP2 ((int32_t) 6)
295 
297 #define TIDL_QuantStyleCustom ((int32_t) 10)
298 /* @} */
299 
312 #define TIDL_CalibOptionActivationRange ((int32_t) 1)
313 
317 #define TIDL_CalibOptionWeightRange ((int32_t) 2)
318 
319 #define TIDL_CalibOptionBiasCalibration ((int32_t) 4)
320 
323 #define TIDL_CalibOptionPerChannelWeightQuantization ((int32_t) 8)
324 
329 #define TIDL_CalibOptionMixedPrecisionDepthwise ((int32_t) 16)
330 
332 #define TIDL_CalibOptionMixedPrecisionInput ((int32_t) 32)
333 
335 #define TIDL_CalibOptionBiasRange ((int32_t) 64)
336 
337 /* @} */
338 
350 #define TIDL_ActivationRangeMethodHistogram ((int32_t) 0)
351 
356 #define TIDL_ActivationRangeMethodGlobalHistogram ((int32_t) 1)
357 
358 
359 /* @} */
360 
371 #define TIDL_WeightRangeMethodHistogram ((int32_t) 0)
372 
374 #define TIDL_WeightRangeMethodMedian ((int32_t) 1)
375 /* @} */
376 
377 
389 #define TIDL_OptimiseExtMemL0 ((int32_t) 0)
390 
393 #define TIDL_OptimiseExtMemL1 ((int32_t) 1)
394 
397 #define TIDL_OptimiseExtMemL2 ((int32_t) 2)
398 /* @} */
399 
409 #define TIDL_Sparse ((int32_t) 0)
410 
411 #define TIDL_Dense ((int32_t) 1)
412 /* @} */
413 
423 #define TIDL_StrideOffsetTopLeft ((int32_t) 0)
424 #define TIDL_StrideOffsetCenter ((int32_t) 1)
425 #define TIDL_StrideOffsetMax ((int32_t) 2)
426 /* @} */
427 
436 #define TIDL_MaxPooling ((int32_t) 0)
437 #define TIDL_AveragePooling ((int32_t) 1)
438 /* @} */
439 
440 
449 #define TIDL_NoAct ((int32_t) 0)
450 #define TIDL_RelU ((int32_t) 1)
451 #define TIDL_PRelU ((int32_t) 2)
452 #define TIDL_RelU6 ((int32_t) 3)
453 #define TIDL_Clip ((int32_t) 4)
454 #define TIDL_Sigmoid ((int32_t) 5)
455 #define TIDL_Tanh ((int32_t) 6)
456 #define TIDL_HardSigmoid ((int32_t) 7)
457 #define TIDL_ELU ((int32_t) 8)
458 #define TIDL_GELU ((int32_t) 9)
459 /* @} */
460 
469 #define TIDL_EltWiseProduct ((int32_t) 0)
470 #define TIDL_EltWiseSum ((int32_t) 1)
471 #define TIDL_EltWiseMax ((int32_t) 2)
472 /* @} */
473 
482 #define TIDL_DIM_BATCH ((int32_t) 0)
483 #define TIDL_DIM_DIM1 ((int32_t) 1)
484 #define TIDL_DIM_DIM2 ((int32_t) 2)
485 #define TIDL_DIM_NUMCH ((int32_t) 3)
486 #define TIDL_DIM_HEIGHT ((int32_t) 4)
487 #define TIDL_DIM_WIDTH ((int32_t) 5)
488 #define TIDL_DIM_MAX ((int32_t) 6)
489 /* @} */
490 
491 
500 #define TIDL_SYMMETRIC_TENSOR (0U)
501 #define TIDL_ASYMMETRIC_TENSOR (1U)
502 /* @} */
503 
512 #define TIDL_ROI_PITCH ((uint32_t) 0)
513 #define TIDL_DIM1_PITCH ((uint32_t) 1)
514 #define TIDL_DIM2_PITCH ((uint32_t) 2)
515 #define TIDL_CHANNEL_PITCH ((uint32_t) 3)
516 #define TIDL_LINE_PITCH ((uint32_t) 4)
517 #define TIDL_PITCH_MAX ((uint32_t) (TIDL_DIM_MAX - 1))
518 /* @} */
519 
529 /* Convolution layer error types */
530 #define TIDL_E_CONVOLUTION ((int32_t) -1000)
531 #define TIDL_E_CONV_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 0))
532 #define TIDL_E_CONV_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 1))
533 #define TIDL_E_CONV_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 2))
534 #define TIDL_E_CONV_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 3))
535 #define TIDL_E_CONV_INVALID_NUM_IN_CHANNELS ((int32_t) (TIDL_E_CONVOLUTION - 4))
536 #define TIDL_E_CONV_INVALID_NUM_OUT_CHANNELS ((int32_t) (TIDL_E_CONVOLUTION - 5))
537 #define TIDL_E_CONV_INVALID_KER_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 6))
538 #define TIDL_E_CONV_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 7))
539 #define TIDL_E_CONV_INVALID_KER_TYPE ((int32_t) (TIDL_E_CONVOLUTION - 8))
540 #define TIDL_E_CONV_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 9))
541 #define TIDL_E_CONV_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 10))
542 #define TIDL_E_CONV_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_CONVOLUTION - 11))
543 /* Convolution pooling error types */
544 #define TIDL_E_CONV_POOL_INVALID_POOL_TYPE ((int32_t) (TIDL_E_CONVOLUTION - 12))
545 #define TIDL_E_CONV_POOL_INVALID_KER_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 13))
546 #define TIDL_E_CONV_POOL_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 14))
547 #define TIDL_E_CONV_POOL_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_CONVOLUTION - 15))
548 #define TIDL_E_CONV_POOL_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_CONVOLUTION - 16))
549 /* EltWise layer error types */
550 #define TIDL_E_ELTWISE ((int32_t) -1020)
551 #define TIDL_E_ELTWISE_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_ELTWISE - 0))
552 #define TIDL_E_ELTWISE_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_ELTWISE - 1))
553 #define TIDL_E_ELTWISE_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_ELTWISE - 2))
554 #define TIDL_E_ELTWISE_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_ELTWISE - 3))
555 #define TIDL_E_ELTWISE_INVALID_ELTWISE_TYPE ((int32_t) (TIDL_E_ELTWISE - 4))
556 #define TIDL_E_ELTWISE_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_ELTWISE - 5))
557 /* Pooling error types */
558 #define TIDL_E_POOLING ((int32_t) -1030)
559 #define TIDL_E_POOL_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_POOLING - 0))
560 #define TIDL_E_POOL_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_POOLING - 1))
561 #define TIDL_E_POOL_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_POOLING - 2))
562 #define TIDL_E_POOL_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_POOLING - 3))
563 #define TIDL_E_POOL_INVALID_POOL_TYPE ((int32_t) (TIDL_E_POOLING - 4))
564 #define TIDL_E_POOL_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_POOLING - 5))
565 #define TIDL_E_POOL_INVALID_KER_WIDTH ((int32_t) (TIDL_E_POOLING - 6))
566 #define TIDL_E_POOL_INVALID_KER_HEIGHT ((int32_t) (TIDL_E_POOLING - 7))
567 #define TIDL_E_POOL_INVALID_STRIDE_WIDTH ((int32_t) (TIDL_E_POOLING - 8))
568 #define TIDL_E_POOL_INVALID_STRIDE_HEIGHT ((int32_t) (TIDL_E_POOLING - 9))
569 /* Inner product error types */
570 #define TIDL_E_INNER_PRODUCT ((int32_t) -1040)
571 #define TIDL_E_IP_INVALID_NUM_IN_NODES ((int32_t) (TIDL_E_INNER_PRODUCT - 0))
572 #define TIDL_E_IP_INVALID_NUM_OUT_NODES ((int32_t) (TIDL_E_INNER_PRODUCT - 1))
573 #define TIDL_E_IP_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_INNER_PRODUCT - 2))
574 /* Argmax error types */
575 #define TIDL_E_ARGMAX ((int32_t) -1050)
576 #define TIDL_E_ARGMAX_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_ARGMAX - 0))
577 /* Bias error types */
578 #define TIDL_E_BN ((int32_t) -1060)
579 #define TIDL_E_BN_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_BN - 0))
580 #define TIDL_E_BN_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_BN - 1))
581 #define TIDL_E_BN_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_BN - 2))
582 #define TIDL_E_BN_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_BN - 3))
583 #define TIDL_E_BN_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_BN - 4))
584 #define TIDL_E_BN_INVALID_ENABLE_RELU ((int32_t) (TIDL_E_BN - 5))
585 #define TIDL_E_BN_NEGATIVE_OUTPUT_SHIFT ((int32_t) (TIDL_E_BN - 6))
586 /* Crop layer error types */
587 #define TIDL_E_CROP ((int32_t) -1070)
588 #define TIDL_E_CROP_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_CROP - 0))
589 #define TIDL_E_CROP_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_CROP - 1))
590 #define TIDL_E_CROP_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_CROP - 2))
591 #define TIDL_E_CROP_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_CROP - 3))
592 #define TIDL_E_CROP_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_CROP - 4))
593 #define TIDL_E_CROP_INVALID_OFFSET_WIDTH ((int32_t) (TIDL_E_CROP - 5))
594 #define TIDL_E_CROP_INVALID_OFFSET_HEIGHT ((int32_t) (TIDL_E_CROP - 6))
595 /* Flatten layer error types */
596 #define TIDL_E_FLATTEN ((int32_t) -1080)
597 #define TIDL_E_FLATTEN_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_FLATTEN - 0))
598 #define TIDL_E_FLATTEN_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_FLATTEN - 1))
599 #define TIDL_E_FLATTEN_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_FLATTEN - 2))
600 #define TIDL_E_FLATTEN_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_FLATTEN - 3))
601 /* SoftMax error types */
602 #define TIDL_E_SOFTMAX ((int32_t) -1090)
603 #define TIDL_E_SOFTMAX_INVALID_NUM_CHANNELS ((int32_t) (TIDL_E_SOFTMAX - 0))
604 /* ShuffleChanel error types */
605 #define TIDL_E_SHUFFLECHANNEL ((int32_t) -1100)
606 #define TIDL_E_SHUFFLECHANNEL_INVALID_INPUT_WIDTH ((int32_t) (TIDL_E_SHUFFLECHANNEL - 0))
607 #define TIDL_E_SHUFFLECHANNEL_INVALID_INPUT_HEIGHT ((int32_t) (TIDL_E_SHUFFLECHANNEL - 1))
608 #define TIDL_E_SHUFFLECHANNEL_INVALID_OUTPUT_WIDTH ((int32_t) (TIDL_E_SHUFFLECHANNEL - 2))
609 #define TIDL_E_SHUFFLECHANNEL_INVALID_OUTPUT_HEIGHT ((int32_t) (TIDL_E_SHUFFLECHANNEL - 3))
610 #define TIDL_E_SHUFFLECHANNEL_INVALID_NUM_GROUPS ((int32_t) (TIDL_E_SHUFFLECHANNEL - 4))
611 /*Multi Core Modes */
612 #define TIDL_NOT_MULTI_CORE ((int32_t) 0)
613 #define TIDL_MULTI_CORE ((int32_t) (TIDL_NOT_MULTI_CORE + 1))
614 #define TIDL_MULTI_CORE_CROP_JOIN ((int32_t) (TIDL_NOT_MULTI_CORE + 2))
615 #define TIDL_MULTI_CORE_CROP_SPLIT ((int32_t) (TIDL_NOT_MULTI_CORE + 3))
616 /* Layernorm error types */
617 #define TIDL_E_LAYERNORM ((int32_t) -1110)
618 #define TIDL_E_LAYERNORM_INSUFFICIENT_REF_SCRATCH ((int32_t) (TIDL_E_LAYERNORM - 0))
619 #define TIDL_E_LAYERNORM_UNSUPPORTED_AXIS ((int32_t) (TIDL_E_LAYERNORM - 1))
620 
621 /* Error types common to layers */
622 #define TIDL_E_COMMON ((int32_t) -1120)
623 #define TIDL_E_UNSUPPORTED_LAYER ((int32_t) (TIDL_E_COMMON - 0))
624 #define TIDL_E_DATAFLOW_INFO_NULL ((int32_t) (TIDL_E_COMMON - 1))
625 #define TIDL_E_INVALID_DEBUG_TRACE_PRM ((int32_t) (TIDL_E_COMMON - 2))
626 #define TIDL_E_INVALID_NET_VERSION ((int32_t) (TIDL_E_COMMON - 3))
627 #define TIDL_E_INVALID_IO_LINE_PITCH ((int32_t) (TIDL_E_COMMON - 4))
628 #define TIDL_E_QUANT_STATS_NOT_AVAILABALE ((int32_t) (TIDL_E_COMMON - 5))
629 #define TIDL_E_INVALID_DDR_INFO_FROM_GC ((int32_t) (TIDL_E_COMMON - 6))
630 #define TIDL_E_EXCEED_PREEMPTION_LEVEL ((int32_t) (TIDL_E_COMMON - 7))
631 #define TIDL_E_EXCEED_OBJECTS_PER_LEVEL ((int32_t) (TIDL_E_COMMON - 8))
632 
633 /*Device specific error codes*/
634 #define TIDL_E_DEV_ERROR ((int32_t) -1130)
635 #define TIDL_E_OTF_ERROR ((int32_t) (TIDL_E_DEV_ERROR - 0))
636 #define TIDL_E_ASYM_ERROR ((int32_t) (TIDL_E_DEV_ERROR - 1))
637 /* @} */
638 
647 #define TIDL_SYSMEM_L1_SCRATCH ((uint32_t) 0)
648 #define TIDL_SYSMEM_L2_SCRATCH ((uint32_t) 1)
649 #define TIDL_SYSMEM_L3_SCRATCH ((uint32_t) 2)
650 #define TIDL_SYSMEM_DDR_SCRATCH ((uint32_t) 3)
651 #define TIDL_SYSMEM_MAX ((uint32_t) 4)
652 /* @} */
653 
664 #define TIDL_EXEC_MODE_STATS_COLLECTION ((int32_t) 0)
665 
666 #define TIDL_EXEC_MODE_INFER_PROCESS ((int32_t) 2)
667 #define TIDL_EXEC_MODE_INFER_PROCESS_REF ((int32_t) 3)
668 
669 
678 #define TIDL_PROFILE_LAYER ((int32_t) 0)
679 #define TIDL_PROFILE_KERNEL_ONLY ((int32_t) 1)
680 #define TIDL_PROFILE_CORE_LOOP ((int32_t) 2)
681 #define TIDL_PROFILE_LAYER_SETUP ((int32_t) 3)
682 #define TIDL_PROFILE_PREFETCH ((int32_t) 4)
683 #define TIDL_PROFILE_DMA_PIPEUP ((int32_t) 5)
684 #define TIDL_PROFILE_LAYER_WITHOUT_PADDING ((int32_t) 6)
685 #define TIDL_PROFILE_LAYER_PADDING_TRIGGER ((int32_t) 7)
686 #define TIDL_PROFILE_LAYER_PADDING_WAIT ((int32_t) 8)
687 #define TIDL_PROFILE_KERNEL_COPY ((int32_t) 9)
688 #define TIDL_PROFILE_LAYER_SETUP_HANDLE_COPY ((int32_t) 10)
689 #define TIDL_PROFILE_LAYER_DEINIT ((int32_t) 11)
690 #define TIDL_PROFILE_LAST_BLOCK_CYCLES ((int32_t) 12)
691 #define TIDL_PROFILE_DMA_PIPEDOWN ((int32_t) 13)
692 #define TIDL_PROFILE_BACKUP ((int32_t) 14)
693 #define TIDL_PROFILE_RESTORE ((int32_t) 15)
694 #define TIDL_PROFILE_CONTEXT_CROSSCORE_COPY ((int32_t) 16)
695 #define TIDL_PROFILE_MAX ((int32_t) 17)
696 
697 /* @} */
698 
710 typedef struct
711 {
712  void* ptr;
713  int32_t bufSize;
714  int32_t offset;
715  int32_t reserved[1];
716 }sBuffer_t;
717 
736 typedef struct
737 {
738  void *base;
739  int32_t size;
740  int32_t offset;
742 
744 
750 typedef struct {
752  int32_t dataId;
754  int32_t elementType;
756  int32_t numDim;
758  int32_t dataQ;
760  int32_t minValue;
762  int32_t maxValue;
772  int32_t tensorType;
774  int32_t padW;
776  int32_t padH;
778  int32_t batchPadW;
780  int32_t batchPadH;
782  int32_t numBatchW;
784  int32_t numBatchH;
786  int32_t roundBits;
788  int32_t pitch[TIDL_DIM_MAX-1];
790  int32_t dimValues[TIDL_DIM_MAX];
792 
793 
794 
800 typedef struct {
802  int32_t numChannels;
804  int32_t dataQ;
806 
807 typedef struct {
809  int32_t axis;
813 
819 typedef struct {
821  int32_t axis;
823 
824 
830 typedef struct {
832  int32_t numGroups;
834  int32_t resvd;
836 
842 typedef struct {
844  int32_t blockSize;
846 
852 typedef struct {
854  int32_t padT;
856  int32_t padB;
858  int32_t padL;
860  int32_t padR;
862  int32_t padConstValue;
864  int32_t padType;
871 
877 typedef struct {
879  int32_t layerType;
883 
889 typedef enum
890 {
895 
901 typedef struct {
903  int32_t mode;
907 
913 typedef enum
914 {
918 
924 typedef enum
925 {
930 
936 typedef enum
937 {
951 
957 typedef struct {
959  int32_t poolingType;
961  int32_t imWidth;
963  int32_t imHeight;
965 
966 
972 typedef struct {
974  int32_t slicePoints[TIDL_NUM_OUT_BUFS+1];
976  int32_t axis;
978  int32_t stride;
980 
986 typedef struct {
988  int32_t slope;
993  //** maximum value for clip */
996  int32_t actType;
998 
1004 typedef struct {
1040 
1041 
1047 typedef struct {
1049  int32_t numChannels;
1051  int32_t inDataQ;
1053  int32_t outDataQ;
1055 
1061 typedef struct {
1063  int32_t numChannels;
1065  int32_t poolingType;
1067  int32_t kernelW;
1069  int32_t kernelH;
1071  int32_t strideW;
1073  int32_t strideH;
1075  int32_t padW;
1077  int32_t padH;
1079  int32_t padT;
1081  int32_t padB;
1083  int32_t padL;
1085  int32_t padR;
1087  int32_t inDataQ;
1089  int32_t outDataQ;
1091  int32_t useCeil;
1093  int32_t avgDims;
1095 
1100 typedef struct {
1105  int32_t padW;
1108  int32_t padH;
1120  int32_t forceInPlace ;
1158 
1164 typedef struct {
1166  int32_t weights;
1168  int32_t bias;
1170  int32_t weightScales;
1174  int32_t biasScales;
1178  int32_t derivedBias;
1180  int32_t derivedScales;
1182  int32_t derivedShifts;
1189  int32_t numInChannels;
1193  int32_t numGroups;
1195  int32_t kernelW;
1197  int32_t kernelH;
1199  int32_t strideW;
1201  int32_t strideH;
1203  int32_t dilationW;
1205  int32_t dilationH;
1207  int32_t padW;
1209  int32_t padH;
1211  int32_t padL;
1213  int32_t padR;
1215  int32_t padT;
1217  int32_t padB;
1223  int32_t weightsQ;
1227  int32_t biasB;
1229  int32_t biasQ;
1231  int32_t inDataQ;
1233  int32_t outDataQ;
1235  int32_t interDataQ;
1237  int32_t enableBias;
1239  int32_t enablePooling;
1241  int32_t enableEltWise;
1243  int32_t enableEWRelU;
1245  int32_t kernelType;
1250  int32_t upscaleFactor;
1254  int32_t minPSAT;
1256  int32_t maxPSAT;
1260 
1265 typedef enum
1266 {
1279 
1284 typedef enum
1285 {
1290 
1295 typedef enum
1296 {
1301 
1307 typedef struct
1308 {
1317 
1319 
1325 /* CHECK_MISRA("-18.4") -> Disable rule 18.4 */
1326 
1327 typedef union {
1330 
1331 
1338 typedef struct {
1342  int32_t priorBox;
1344  int32_t priorBoxSize;
1346  int32_t numClasses;
1350  int32_t codeType;
1360  int32_t topK;
1364  int32_t keepTopK;
1367  int32_t shareLocation;
1372  int32_t numKeypoints;
1376  int32_t subCodeType;
1379 
1381  int32_t numHeads;
1382 
1386  int32_t numSubHeads;
1387 
1389  int32_t imWidth;
1390 
1392  int32_t imHeight;
1393 
1395  float32_tidl point3dRange[3][2];
1396 
1398  float32_tidl voxelSize[3];
1399 
1402 
1403  /*0 -> IDENTITY, 1 -> SIGMOID, 2 -> SOFTMAX*/
1405 
1407  int32_t metaArchType;
1408 
1409  /* 0 -> All the Data from given Anchor Box are together,
1410  1 -> Data from all Anchor Box are interleaved */
1411  int32_t dataLayout;
1412 
1413 }sTIDL_DetectOutputParams_t; //Layer Params
1414 
1415 
1421 typedef enum
1422 {
1423  TIDL_Invalid = 0, //sTIDL_DetectOutputParams_t.subCodeParams are not populated and used.
1424  TIDL_ObjectPose = 1, //sTIDL_DetectOutputParams_t.subCodeParams are used for objectPose processing.
1426 
1427 
1428 #define TIDL_OD_MAX_KEYPOINTS (16)
1429 #define TIDL_OD_MAX_ANCHORS_PER_HEAD (16)
1430 
1437 typedef struct {
1438 
1440  int32_t numAnchors;
1442  int32_t numKeyPoints;
1444  int32_t headWidth;
1446  int32_t headHeight;
1462  float32_tidl boxScales[4];
1473 
1475 
1477 
1483 typedef struct {
1485  int32_t axis;
1487  int32_t outDataQ;
1489 
1490 
1497 typedef struct {
1499  int32_t weights;
1501  int32_t bias;
1503  int32_t numChannels;
1505  int32_t biasQ;
1507  int32_t inDataQ;
1509  int32_t outDataQ;
1511  int32_t weightsQ;
1519 
1525 typedef struct {
1527  int32_t bias;
1529  int32_t numChannels;
1531  int32_t biasQ;
1533  int32_t inDataQ;
1535  int32_t outDataQ;
1537 
1543 typedef struct {
1545  int32_t weights;
1547  int32_t bias;
1549  int32_t weightScales;
1553  int32_t biasScales;
1557  int32_t derivedBias;
1559  int32_t derivedScales;
1561  int32_t derivedShifts;
1565  int32_t numBatches;
1567  int32_t numInRows;
1569  int32_t numInCols;
1571  int32_t numOutCols;
1573  int32_t weightsQ;
1581  int32_t biasQ;
1583  int32_t inDataQ;
1585  int32_t outDataQ;
1587  int32_t interDataQ;
1589  int32_t biasB;
1591  int32_t isBias;
1596  int32_t constIdx;
1598 
1604 typedef struct {
1606  int32_t bias;
1608  int32_t numChannels;
1610  int32_t eltWiseType;
1612  int32_t numInData;
1614  int32_t biasQ;
1616  int32_t inDataQ[TIDL_NUM_IN_BUFS];
1618  int32_t outDataQ;
1619  /*Asymmetric Parameters*/
1620  uint8_t mmaScale;
1621  uint8_t mmaShift;
1622  int32_t biasTerm;
1623  /*Is one tensor broadcasted*/
1624  int32_t isBroadcast;
1626 
1632 typedef struct {
1634  int32_t numChannels;
1636  int32_t inDataQ;
1638  int32_t outDataQ;
1640  int32_t axis;
1642  int32_t outTranspose;
1644 
1650 typedef struct {
1652  int32_t numChannels;
1654  int32_t inDataQ;
1656  int32_t outDataQ;
1658  int32_t offsetW;
1660  int32_t offsetH;
1661  /*crop for multic7x or normal crop*/
1662  int32_t multiCoreMode;
1664 
1665 
1671 typedef struct {
1673  int32_t type;
1674  int32_t layout;
1675  int32_t outLayout;
1676  int32_t inZeroPoint;
1677  int32_t outZeroPoint;
1679 
1685 typedef struct {
1687  int32_t axis;
1688  /*keep the dimension or squeeze the dimension*/
1689  int32_t keepDims;
1690  /*which operation to happen as per @ref eTIDL_inReduceOp*/
1691  int32_t ops;
1693 
1694 typedef enum
1695 {
1701 
1707 typedef struct {
1709  int32_t axis;
1711  int8_t dataTensorName[TIDL_STRING_SIZE];
1713  int8_t indicesTensorName[TIDL_STRING_SIZE];
1715  int8_t updateTensorName[TIDL_STRING_SIZE];
1716  /* ADD/MAX are presently supported. ADD output would be clipped to 8bit */
1717  int32_t reduction;
1719 
1725 typedef struct {
1726  /*Offset for data parameter*/
1727  int32_t offset;
1731  int32_t isBroadcast;
1733 
1739 typedef struct {
1743  int32_t perm[TIDL_DIM_MAX];
1745 
1751 /* CHECK_MISRA("-18.4") -> Disable rule 18.4 */
1752 typedef union {
1781 /*RESET_MISRA("18.4") -> Reset rule 18.4 */
1782 
1788 typedef struct {
1793  int32_t layerType;
1797  int32_t numInBufs;
1799  int32_t numOutBufs;
1801  int32_t inData[TIDL_NUM_IN_BUFS];
1807  int32_t coreID;
1810  int32_t layersGroupId;
1815  /* Indicates whether layer is split across multiple cores */
1816  int32_t multiCoreMode;
1817  /*To indicate wether the layer requires scratch Memory region*/
1819 }sTIDL_Layer_t;
1820 
1836 #define TIDL_NET_STRUCTURE_BUF ((uint32_t) 0)
1837 #define TIDL_NET_PARAMS_BUF ((uint32_t) 1)
1838 #define TIDL_NET_COMPILER_BUF ((uint32_t) 2)
1839 #define TIDL_NET_GC_BUF ((uint32_t) 3)
1840 #define TIDL_NET_TOTAL_BUF ((uint32_t) 4)
1841 /* @} */
1842 
1843 /* Based on last Updated Date */
1844 #define TIDL_NET_VERSION (0x20240401)
1845 
1850 typedef struct {
1852  int32_t netVersion;
1854  int32_t deviceName;
1856  int32_t numLayers;
1881  int32_t dataFlowInfo;
1889  int32_t reserved;
1891  int32_t modelGroupId;
1893  int32_t inferenceMode;
1895  int32_t numCores;
1900 
1904 
1909 typedef enum
1910 {
1915 
1920 typedef enum
1921 {
1922  TIDL_inferenceModeDefault = 0, /* Inference using single c7x/MMA core */
1923  TIDL_inferenceModeHighThroughput = 1, /* Batch processing mode - Multiple frames parallely infer on multiple cores */
1924  TIDL_inferenceModeLowLatency = 2 /* Single batch inference using network split on multiple cores */
1926 
1931 typedef enum
1932 {
1938 
1943 typedef enum
1944 {
1949 
1954 typedef enum
1955 {
1960 
1966 typedef struct
1967 {
1969  int32_t numInputBuf;
1971  int32_t numOutputBuf;
1973  int32_t numCores;
1979  int32_t inferenceMode;
1981  int32_t inDataFormat[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1983  int32_t inResizeType[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1985  int32_t resizeWidth[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1987  int32_t resizeHeight[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1989  int32_t inWidth[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1991  int32_t inHeight[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1993  int32_t inNumChannels[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1994 
1995  int32_t inDIM2[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1996 
1997  int32_t inDIM1[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
1999  int32_t inChannelPitch[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2001  int32_t inNumBatches[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2003  int32_t inPadL[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2005  int32_t inPadT[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2007  int32_t inPadR[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2009  int32_t inPadB[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2011  int32_t inPadCh[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2013  int32_t rawDataInElementType[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2015  int32_t inElementType[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2017  int32_t inZeroPoint[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2019  int32_t inLayout[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2021  int32_t inDataId[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2023  float32_tidl inTensorScale[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS];
2025  int8_t inDataName[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_IN_BUFS][TIDL_STRING_SIZE];
2027  int32_t outWidth[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2029  int32_t outHeight[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2031  int32_t outDIM2[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2033  int32_t outDIM1[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2035  int32_t outNumChannels[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2037  int32_t outChannelPitch[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2039  int32_t outNumBatches[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2041  int32_t outPadL[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2043  int32_t outPadT[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2045  int32_t outPadR[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2047  int32_t outPadB[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2049  int32_t outPadCh[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2051  int32_t outElementType[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2053  int32_t outDataId[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2055  int8_t outDataName[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS][TIDL_STRING_SIZE];
2057  float32_tidl outTensorScale[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2059  int32_t outZeroPoint[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2061  int32_t outLayout[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2063  int32_t numValidTensorDims[TIDL_MAX_NUM_CORES * TIDL_MAX_ALG_OUT_BUFS];
2064 
2066 
2067 
2073 typedef enum
2074 {
2075  TIDL_Detect2DBox = 0, //Bit position in TIDL_ODLayerHeaderInfo.odObjectType for 2Dbox
2076  TIDL_Detect3DBox = 1, //Bit position in TIDL_ODLayerHeaderInfo.odObjectType for 3Dbox
2077  TIDL_DetectKeyPoints = 2, //Bit position in TIDL_ODLayerHeaderInfo.odObjectType for keypoints
2078  TIDL_DetectObjectPose = 3, //Bit position in TIDL_ODLayerHeaderInfo.odObjectType for objectPose
2080 
2081 static inline int32_t TIDL_SetObjDetectionFormat( int32_t* odObjectType,
2082  int32_t odObjectFormat){
2083  *odObjectType = *odObjectType | ( 1 << odObjectFormat) ;
2084  return *odObjectType;
2085  }
2086 static inline int32_t TIDL_GetObjDetectionFormatState(int32_t odObjectType,
2087  int32_t odObjectFormat){
2088  int32_t odObjectFormatState;
2089  odObjectFormatState = odObjectType & ( 1 << odObjectFormat) ;
2090  return odObjectFormatState;
2091  }
2092 
2132 typedef struct
2133 {
2144  int32_t odObjectType;
2145 
2147 
2148 typedef struct
2149 {
2156 
2158 
2159 #define TIDL_OD_MAX_KEY_POINTS (32)
2160 
2161 
2167 typedef struct
2168 {
2187 
2189 
2195 typedef struct
2196 {
2212 
2214 
2220 typedef struct
2221 {
2243 
2244 typedef enum
2245 {
2246  TIDL_L1 = 0,
2247  TIDL_L2 = 1,
2252 } eTIDL_MemSpaces;
2253 
2254 typedef enum
2255 {
2259 } eTIDL_MemTypes;
2260 
2261 #if USE_IVISION
2262 typedef struct
2263 {
2264  void * ncScratchPtr[MAX_MEMORY_TYPES][MAX_MEMSPACE_TYPES];
2265  void * syncBufferPtr[MAX_MEMORY_TYPES];
2267 
2273 typedef struct
2274 {
2277 
2285 typedef struct
2286 {
2287  TIDL_sharedBufferProperties ctrlSetArgs[TIDL_MAX_NUM_CORES];
2289 
2290 
2296 typedef struct
2297 {
2299  IVISION_Params visionParams;
2303  int32_t isInbufsPaded;
2308 
2312  int32_t traceLogLevel;
2316  int32_t reservedCtrl;
2318  int32_t flowCtrl;
2329  char traceBaseName[TIDL_STRING_SIZE];
2334  void * udmaDrvObj;
2337 
2339  uint32_t coreId;
2341  int32_t coreStartIdx;
2344  uint32_t targetPriority ;
2345 
2351  int32_t(*TIDLVprintf)(const char * format, va_list arg);
2353  void *tracePtr;
2355  int32_t(*TIDLWriteBinToFile)(const char * fileName, void * addr, int32_t size, int32_t count);
2357  int32_t(*TIDLReadBinFromFile)(const char * fileName, void * addr, int32_t size, int32_t count);
2374  int32_t (*TIDL_CustomLayerProcess)(void * tidlHandle,
2375  sTIDL_Layer_t *tidlLayer,
2376  void *inPtrs[],
2377  void *outPtrs[],
2378  void *params,
2379  void *dmaUtilsContext,
2380  const sTIDL_sysMemHandle_t sysMems[TIDL_SYSMEM_MAX],
2381  int32_t execMode);
2382 }
2384 
2391 typedef struct
2392 {
2394  IVISION_InArgs iVisionInArgs;
2396  int32_t numInBufs;
2401 } TIDL_InArgs;
2402 
2418 typedef struct {
2419  int32_t totalOps;
2420  int32_t actualOps;
2421  int32_t layerExecId;
2422  uint64_t profilePoint[TIDL_PROFILE_MAX];
2424 
2431 typedef struct
2432 {
2434  IVISION_OutArgs iVisionOutArgs;
2436  int32_t numOutBufs;
2439  int32_t numLayers ;
2440  /* Private arguments - For debug and internal use */
2441  void *privArgs ;
2443 } TIDL_outArgs;
2444 
2452 #define TIVX_TIDL_CMD_GET_C7X_PTRS (0x10000001u)
2453 #define TIVX_TIDL_CMD_SET_C7X_PTRS (0x10000002u)
2454 #define TIVX_TIDL_CMD_INIT (0x10000003u)
2455 
2463 {
2464  return net->preEmptWorstCaseDelay;
2465 }
2466 
2467 static inline int TIDL_createParamsInit(TIDL_CreateParams * params)
2468 {
2469  params->net = NULL;
2470  params->udmaDrvObj = NULL;
2471  params->currLayersGroupId = 1;
2472  params->isInbufsPaded = 0;
2474  params->quantRangeExpansionFactor = 1.0;
2475  params->quantRangeUpdateFactor = -1.0;
2476  params->maxPreEmptDelay = FLT_MAX;
2477  params->visionParams.algParams.size = sizeof(TIDL_CreateParams);
2478  params->visionParams.cacheWriteBack = NULL;
2479  params->TIDLWriteBinToFile = NULL;
2480  params->TIDLReadBinFromFile = NULL;
2481  params->TIDLVprintf = NULL;
2482  params->pFxnLock = NULL;
2483  params->pFxnUnLock = NULL;
2484  params->traceLogLevel = 0;
2485  params->traceWriteLevel = 0;
2486  params->traceBaseName[0] = '\0';
2487  params->tracePtr = NULL;
2488  params->reservedCtrl = 0;
2489  params->coreId = 0;
2490 #if defined(x86_64) || defined(HOST_EMULATION)
2491  params->flowCtrl = 1;
2492 #else
2493  params->flowCtrl = 0;
2494 #endif
2495  params->targetPriority = 0;
2496  params->coreStartIdx = 0;
2497  return IALG_EOK;
2498 }
2499 
2500 #endif
2501 
2502 #ifdef __cplusplus
2503 }
2504 #endif
2505 
2507 /* iTI_DL */
2508 
2509 #endif /*ITIDL_H_ */
2510 /*==========================================================================*/
2511 /* END of the FILE */
2512 /*==========================================================================*/
int32_t enableEltWise
Definition: itidl_ti.h:1241
Definition: itidl_ti.h:1698
int32_t multiCoreMode
Definition: itidl_ti.h:1662
This structure define the parameters Soft max layer in TIDL.
Definition: itidl_ti.h:1632
int32_t derivedScales
Definition: itidl_ti.h:1559
This structure define the parameters of Gather layer in TIDL.
Definition: itidl_ti.h:819
float32_tidl maxTensorValue
Definition: itidl_ti.h:766
int32_t weights
Definition: itidl_ti.h:1545
Definition: itidl_ti.h:1936
sTIDL_odOutputReformatLayerParams_t odOutputReformatLayerParams
Definition: itidl_ti.h:1771
float32_tidl xmin
Definition: itidl_ti.h:2204
Definition: itidl_ti.h:1922
int32_t biasQ
Definition: itidl_ti.h:1505
Definition: itidl_ti.h:945
sTIDL_SliceLayerParams_t sliceParams
Definition: itidl_ti.h:1766
int32_t padType
Definition: itidl_ti.h:864
float32_tidl quantRangeUpdateFactor
Definition: itidl_ti.h:2310
int32_t numSubHeads
Definition: itidl_ti.h:1386
int32_t strideW
Definition: itidl_ti.h:1071
int32_t numVirtualCores
Definition: itidl_ti.h:1975
float32_tidl r22
Definition: itidl_ti.h:2178
sTIDL_ShuffleLayerParams_t shuffleLayerParams
Definition: itidl_ti.h:1765
This structure define the parameters ScatterElements layer in TIDL.
Definition: itidl_ti.h:1707
int32_t offset
Definition: itidl_ti.h:740
sTIDL_ConstDataParams_t constDataParams
Definition: itidl_ti.h:1776
Definition: itidl_ti.h:1423
float32_tidl clipMin
Definition: itidl_ti.h:992
IVISION_InArgs iVisionInArgs
Definition: itidl_ti.h:2394
int32_t strideOffsetMethod
Definition: itidl_ti.h:1814
int32_t upscaleFactor
Definition: itidl_ti.h:1250
Definition: itidl_ti.h:1273
float32_tidl ObjId
Definition: itidl_ti.h:2223
float32_tidl biasScale
Definition: itidl_ti.h:1515
int32_t traceWriteLevel
Definition: itidl_ti.h:2314
int32_t numGroups
Definition: itidl_ti.h:1193
float32_tidl y
Definition: itidl_ti.h:2153
int32_t inHeightOdNetwork
Definition: itidl_ti.h:881
int32_t numInCols
Definition: itidl_ti.h:1569
Definition: itidl_ti.h:1934
int32_t perChannelPadConstTensorOffset
Definition: itidl_ti.h:867
sTIDL_DetectionLayerSubCodeParams_t subCodeParams
Definition: itidl_ti.h:1378
int32_t padB
Definition: itidl_ti.h:1081
int32_t isBroadcast
Definition: itidl_ti.h:1624
sTIDL_ReduceParams_t reduceParams
Definition: itidl_ti.h:1774
Definition: itidl_ti.h:1958
int32_t kernelType
Definition: itidl_ti.h:1245
int32_t numInData
Definition: itidl_ti.h:1612
int32_t padR
Definition: itidl_ti.h:860
int32_t multiCoreMode
Definition: itidl_ti.h:1816
int32_t reduction
Definition: itidl_ti.h:1717
int32_t actualOps
Definition: itidl_ti.h:2420
This structure contains meta data for TIDL output IMP*** this structure content may change b/w releas...
Definition: itidl_ti.h:2418
int32_t layersGroupId
Definition: itidl_ti.h:1810
float32_tidl kpt_confidence
Definition: itidl_ti.h:2155
eTIDL_inReduceOp
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1954
int32_t weightScales
Definition: itidl_ti.h:1549
float32_tidl clipMax
Definition: itidl_ti.h:994
This union define the layer specific parameters of all the supported layers in TIDL.
Definition: itidl_ti.h:1752
int32_t padW
Definition: itidl_ti.h:1207
Definition: itidl_ti.h:1299
Definition: itidl_ti.h:2247
int32_t isInbufsPaded
Definition: itidl_ti.h:2303
int32_t roundBits
Definition: itidl_ti.h:786
int32_t numInRows
Definition: itidl_ti.h:1567
float32_tidl percentileActRangeShrink
Definition: itidl_ti.h:1024
int32_t resvd
Definition: itidl_ti.h:834
int32_t quantizationStyle
Definition: itidl_ti.h:1868
This structure define the parameters Dat Convert layer in TIDL.
Definition: itidl_ti.h:1671
int32_t biasQ
Definition: itidl_ti.h:1531
int32_t poolingType
Definition: itidl_ti.h:1065
int32_t kernelW
Definition: itidl_ti.h:1067
Definition: itidl_ti.h:2256
#define TIDL_NUM_MAX_LAYERS
Definition: itidl_ti.h:106
Definition: itidl_ti.h:942
sTIDL_ScatterElementsParams_t scatterElementsParams
Definition: itidl_ti.h:1775
void * udmaDrvObj
Definition: itidl_ti.h:2334
This structure contains all the parameters which TI DL library at create time.
Definition: itidl_ti.h:2296
Definition: itidl_ti.h:1913
int32_t processingType
Definition: itidl_ti.h:1340
float32_tidl ymin
Definition: itidl_ti.h:2206
int32_t inDataQ
Definition: itidl_ti.h:1231
This structure defines the Input and output buffer descriptors required for a given Layer group...
Definition: itidl_ti.h:1966
This structure contains the 6D object pose information of BBox detected by OD layer.
Definition: itidl_ti.h:2167
int32_t inDataQ
Definition: itidl_ti.h:1507
sTIDL_BiasParams_t biasParams
Definition: itidl_ti.h:1763
This structure define the parameters of ROI Pooling layer in TIDL.
Definition: itidl_ti.h:957
static float32_tidl TIDL_getWorstcaseDelayForPreemption(sTIDL_Network_t *net)
Definition: itidl_ti.h:2462
Definition: itidl_ti.h:892
static int32_t TIDL_SetObjDetectionFormat(int32_t *odObjectType, int32_t odObjectFormat)
Definition: itidl_ti.h:2081
Definition: itidl_ti.h:1297
int32_t codeType
Definition: itidl_ti.h:1350
Definition: itidl_ti.h:1277
int32_t numKeyPoints
Definition: itidl_ti.h:1442
#define TIDL_SYSMEM_MAX
Definition: itidl_ti.h:651
int32_t blockSize
Definition: itidl_ti.h:844
sTIDL_ResizeLayerParams_t resizeParams
Definition: itidl_ti.h:1767
sTIDL_Network_t * net
Definition: itidl_ti.h:2336
Definition: itidl_ti.h:1274
int32_t numChannels
Definition: itidl_ti.h:1049
sTIDL_RoiPoolingLayerParams_t roiPoolingParams
Definition: itidl_ti.h:1768
int32_t layerType
Definition: itidl_ti.h:879
int32_t inputATranspose
Definition: itidl_ti.h:1593
sTIDL_ActParams_t actParams
Definition: itidl_ti.h:1791
eTIDL_DetectionOutputFormat
This enumerator defines the differnt types of OD format indicated by TIDL_ODLayerHeaderInfo::odObject...
Definition: itidl_ti.h:2073
int32_t offsetH
Definition: itidl_ti.h:1660
float32_tidl strideH
Definition: itidl_ti.h:1450
int32_t enableLayerPerfTraces
Definition: itidl_ti.h:2400
int32_t inWidthOdNetwork
Definition: itidl_ti.h:880
float32_tidl yaw
Definition: itidl_ti.h:2241
int32_t kernelW
Definition: itidl_ti.h:1195
int32_t numLayers
Definition: itidl_ti.h:1856
int32_t dataId
Definition: itidl_ti.h:752
This structure contains all the parameters which are required by TIDL control callbacks for SET comma...
Definition: itidl_ti.h:2285
int32_t zeroWeightValue
Definition: itidl_ti.h:1517
This structure defines the system memory handles in TIDL There are total four handles: 0: L1...
Definition: itidl_ti.h:736
Definition: itidl_ti.h:893
int32_t netVersion
Definition: itidl_ti.h:1852
char traceBaseName[TIDL_STRING_SIZE]
Definition: itidl_ti.h:2329
int32_t outDataQ
Definition: itidl_ti.h:1656
Definition: itidl_ti.h:941
sTIDL_CalibParams_t calibrationParams
Definition: itidl_ti.h:1879
float32_tidl biasCalibrationFactor
Definition: itidl_ti.h:1034
float32_tidl score
Definition: itidl_ti.h:2227
int32_t derivedBias
Definition: itidl_ti.h:1557
void * base
Definition: itidl_ti.h:738
int32_t rsvdPassThrough
Definition: itidl_ti.h:1154
int32_t biasB
Definition: itidl_ti.h:1589
static int TIDL_createParamsInit(TIDL_CreateParams *params)
Definition: itidl_ti.h:2467
Definition: itidl_ti.h:1268
This structure define the parameters of Pad layer in TIDL.
Definition: itidl_ti.h:852
int32_t isDataConvertNeeded
Definition: itidl_ti.h:1741
int32_t numInBufs
Definition: itidl_ti.h:2396
int32_t imHeight
Definition: itidl_ti.h:963
int32_t enablePooling
Definition: itidl_ti.h:1239
Definition: itidl_ti.h:1269
int32_t coreID
Definition: itidl_ti.h:1807
sTIDL_SoftMaxParams_t softMaxParams
Definition: itidl_ti.h:1759
float32_tidl pX
Definition: itidl_ti.h:1314
int32_t numBatches
Definition: itidl_ti.h:1565
#define TIDL_MAX_ALG_IN_BUFS
Definition: itidl_ti.h:111
eTIDL_inResizeType
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1943
int32_t graphCompilerInfoOffset
Definition: itidl_ti.h:1883
int32_t axis
Definition: itidl_ti.h:976
int32_t imWidth
Definition: itidl_ti.h:961
This structure define the parameters Transpose layer in TIDL.
Definition: itidl_ti.h:1739
int32_t outZeroPoint
Definition: itidl_ti.h:1677
Definition: itidl_ti.h:2262
int32_t enableEWRelU
Definition: itidl_ti.h:1243
sTIDL_CameraIntrinsicsParams_t cameraParams
Definition: itidl_ti.h:1328
sTIDL_CropParams_t cropParams
Definition: itidl_ti.h:1760
This structure define the parameters spatial Pooling layer in TIDL.
Definition: itidl_ti.h:1061
Definition: itidl_ti.h:1327
int32_t outDataQ
Definition: itidl_ti.h:1089
void * tracePtr
Definition: itidl_ti.h:2353
Definition: itidl_ti.h:1696
int32_t stride
Definition: itidl_ti.h:978
int32_t derivedShifts
Definition: itidl_ti.h:1182
int32_t padT
Definition: itidl_ti.h:854
int32_t dilationW
Definition: itidl_ti.h:1203
int32_t flowCtrl
Definition: itidl_ti.h:2318
int32_t elementType
Definition: itidl_ti.h:754
int32_t outDataQ
Definition: itidl_ti.h:1638
int32_t minValue
Definition: itidl_ti.h:760
Definition: itidl_ti.h:2258
int32_t keepDims
Definition: itidl_ti.h:1689
#define TIDL_DIM_MAX
Definition: itidl_ti.h:488
int32_t dilationH
Definition: itidl_ti.h:1205
Definition: itidl_ti.h:972
float float32_tidl
Definition: itidl_ti.h:130
int32_t biasQ
Definition: itidl_ti.h:1614
Definition: itidl_ti.h:1275
float32_tidl weightScale
Definition: itidl_ti.h:1575
Definition: itidl_ti.h:1947
int32_t numInChannels
Definition: itidl_ti.h:1189
Definition: itidl_ti.h:1924
int32_t padH
Definition: itidl_ti.h:776
float32_tidl biasScale
Definition: itidl_ti.h:1577
This structure define the parameters Arg max layer in TIDL.
Definition: itidl_ti.h:1047
int32_t poolingType
Definition: itidl_ti.h:959
sTIDL_PoolingParams_t poolParams
Definition: itidl_ti.h:1252
int32_t biasScales
Definition: itidl_ti.h:1174
float32_tidl offsetH
Definition: itidl_ti.h:1456
Definition: itidl_ti.h:926
int32_t weightZeroPoints
Definition: itidl_ti.h:1551
int32_t numChannels
Definition: itidl_ti.h:1652
int32_t padT
Definition: itidl_ti.h:1215
Definition: itidl_ti.h:807
This structure define the parameters of Bias layer in TIDL.
Definition: itidl_ti.h:1525
int32_t outDataQ
Definition: itidl_ti.h:1233
This structure contains the each object&#39;s information detected by Objection detection layer...
Definition: itidl_ti.h:2195
float32_tidl x
Definition: itidl_ti.h:2151
Definition: itidl_ti.h:1945
int32_t doesLayerFillOutXPadding
Definition: itidl_ti.h:1152
float32_tidl z
Definition: itidl_ti.h:2233
Definition: itidl_ti.h:2250
sTIDL_TransposeParams_t transposeParams
Definition: itidl_ti.h:1777
int32_t zeroWeightValue
Definition: itidl_ti.h:1225
int32_t slope
Definition: itidl_ti.h:988
sTIDL_sysMemHandle_t sTIDL_NetBuffer_t
Definition: itidl_ti.h:743
float32_tidl epsilon
Definition: itidl_ti.h:811
float32_tidl nmsThreshold
Definition: itidl_ti.h:1356
sTIDL_ConvParams_t convParams
Definition: itidl_ti.h:1753
int32_t padB
Definition: itidl_ti.h:1217
int32_t outDataQ
Definition: itidl_ti.h:1535
This structure define the parameters of Detection Output Layer in TIDL.
Definition: itidl_ti.h:1338
float32_tidl objInfoSize
Definition: itidl_ti.h:2137
Definition: itidl_ti.h:1911
float32_tidl quantRangeExpansionFactor
Definition: itidl_ti.h:2307
eTIDL_PadLayerPadType
This enumerator defines the different types of padding supported by TIDL library. ...
Definition: itidl_ti.h:924
This structure define the parameters of ReLU activation layer in TIDL.
Definition: itidl_ti.h:1004
int32_t coreStartIdx
Definition: itidl_ti.h:2341
int32_t tensorZeroPoint
Definition: itidl_ti.h:770
int32_t offset
Definition: itidl_ti.h:714
This structure define the parameters of Data layer in TIDL.
Definition: itidl_ti.h:800
int32_t outDataQ
Definition: itidl_ti.h:1053
Definition: itidl_ti.h:1699
#define TIDL_OD_MAX_KEY_POINTS
Definition: itidl_ti.h:2159
int32_t inferenceMode
Definition: itidl_ti.h:1979
int32_t numOutBufs
Definition: itidl_ti.h:1799
int32_t varianceEncoded
Definition: itidl_ti.h:1370
int32_t outDataQ
Definition: itidl_ti.h:1585
sTIDL_LayerNormParams_t layerNormParams
Definition: itidl_ti.h:1779
float32_tidl biasScale
Definition: itidl_ti.h:1221
int32_t padB
Definition: itidl_ti.h:856
int32_t avgDims
Definition: itidl_ti.h:1093
int32_t outDataQ
Definition: itidl_ti.h:1618
int32_t biasZeroPoints
Definition: itidl_ti.h:1176
int32_t kernelH
Definition: itidl_ti.h:1197
float32_tidl fY
Definition: itidl_ti.h:1312
int32_t activationType
Definition: itidl_ti.h:1563
Definition: itidl_ti.h:1288
float32_tidl ObjId
Definition: itidl_ti.h:2198
int32_t weightsQ
Definition: itidl_ti.h:1511
float32_tidl offsetL
Definition: itidl_ti.h:1458
int32_t bias
Definition: itidl_ti.h:1606
#define TIDL_NUM_OUT_BUFS
Definition: itidl_ti.h:108
Definition: itidl_ti.h:2077
This structure define common parameters ReduceMax/ReduceMin layer in TIDL.
Definition: itidl_ti.h:1685
int32_t(* TIDL_Lock_t)(void)
Call back function pointer to lock interrupts.
Definition: itidl_ti.h:139
eTIDL_SubCodeType
This enumerator defines the differnt types of subCodeParams indicated by sTIDL_DetectOutputParams_t::...
Definition: itidl_ti.h:1421
TIDL_Lock_t pFxnLock
Definition: itidl_ti.h:2347
int32_t layerKernelType
Definition: itidl_ti.h:1795
int32_t padW
Definition: itidl_ti.h:774
int32_t interDataQ
Definition: itidl_ti.h:1235
int32_t odObjectType
Definition: itidl_ti.h:2144
float32_tidl weightScale
Definition: itidl_ti.h:1513
int32_t quantizationStyle
Definition: itidl_ti.h:1258
float32_tidl score
Definition: itidl_ti.h:2202
int32_t numSuperBatches
Definition: itidl_ti.h:1977
int32_t outDataQ
Definition: itidl_ti.h:1509
float32_tidl weightScale
Definition: itidl_ti.h:1219
float32_tidl percentileWtRangeShrink
Definition: itidl_ti.h:1031
int32_t numOutputBuf
Definition: itidl_ti.h:1971
uint8_t mmaScale
Definition: itidl_ti.h:1620
float32_tidl tensorScale
Definition: itidl_ti.h:768
This structure define the parameters Convolution Layer in TIDL.
Definition: itidl_ti.h:1164
int32_t offsetW
Definition: itidl_ti.h:1658
Definition: itidl_ti.h:1267
int32_t numBatchW
Definition: itidl_ti.h:782
int32_t maxPointsPerVoxel
Definition: itidl_ti.h:1401
int32_t offset
Definition: itidl_ti.h:1727
void * ptr
Definition: itidl_ti.h:712
Definition: itidl_ti.h:938
int32_t inDataQ
Definition: itidl_ti.h:1051
float32_tidl l
Definition: itidl_ti.h:2237
float32_tidl offsetDir
Definition: itidl_ti.h:1460
This structure define the parameters of Batch Norm layer in TIDL.
Definition: itidl_ti.h:1497
eTIDL_MemTypes
Definition: itidl_ti.h:2254
This structure contains all the parameters which are required by TIDL control callbacks for GET comma...
Definition: itidl_ti.h:2273
This structure define the parameters of the OD output reformatting layer in TIDL. ...
Definition: itidl_ti.h:877
Definition: itidl_ti.h:2251
int32_t keepTopK
Definition: itidl_ti.h:1364
This structure define the parameters of Shuffle layer in TIDL.
Definition: itidl_ti.h:830
Definition: itidl_ti.h:1287
#define TIDL_NET_TOTAL_BUF
Definition: itidl_ti.h:1840
int32_t inputBTranspose
Definition: itidl_ti.h:1595
int32_t actType
Definition: itidl_ti.h:996
sTIDL_PadLayerParams_t padLayerParams
Definition: itidl_ti.h:1770
eTIDL_odOutputReformatType
This enumerator defines the different types of output types for the OD output reformatting layer...
Definition: itidl_ti.h:936
int32_t enableBias
Definition: itidl_ti.h:1237
#define TIDL_PROFILE_MAX
Definition: itidl_ti.h:695
int32_t dataElementSize
Definition: itidl_ti.h:1864
int32_t biasQ
Definition: itidl_ti.h:1581
This structure define the common layer parameters in TIDL.
Definition: itidl_ti.h:1788
int32_t scoreConverter
Definition: itidl_ti.h:1404
uint8_t mmaShift
Definition: itidl_ti.h:1621
int32_t inDataQ
Definition: itidl_ti.h:1583
void * privArgs
Definition: itidl_ti.h:2441
eTIDL_metaArchType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1265
int32_t padH
Definition: itidl_ti.h:1108
Definition: itidl_ti.h:947
int32_t subCodeType
Definition: itidl_ti.h:1376
eTIDL_RoiPoolingType
This enumerator defines the different types of ROI pooling supported by TIDL library.
Definition: itidl_ti.h:913
int32_t convolutionType
Definition: itidl_ti.h:1187
int32_t derivedScales
Definition: itidl_ti.h:1180
int32_t batchPadW
Definition: itidl_ti.h:778
This structure define the parameters of data or kernel buffer used by TIDL layers (In...
Definition: itidl_ti.h:750
sTIDL_LayerParams_t layerParams
Definition: itidl_ti.h:1789
int32_t weights
Definition: itidl_ti.h:1499
Definition: itidl_ti.h:2257
int32_t biasB
Definition: itidl_ti.h:1227
float32_tidl objInfoOffset
Definition: itidl_ti.h:2141
Definition: itidl_ti.h:891
int32_t traceLogLevel
Definition: itidl_ti.h:2312
int32_t axis
Definition: itidl_ti.h:1640
int32_t axis
Definition: itidl_ti.h:1687
int32_t numCores
Definition: itidl_ti.h:1895
This structure define the parameters of ReLU activation layer in TIDL.
Definition: itidl_ti.h:986
This structure define the parameters CNN/Deep learning net in TIDL.
Definition: itidl_ti.h:1850
int32_t biasCalibrationIterations
Definition: itidl_ti.h:1038
int32_t strideH
Definition: itidl_ti.h:1201
int32_t strideH
Definition: itidl_ti.h:1073
int32_t headWidth
Definition: itidl_ti.h:1444
float32_tidl preEmptWorstCaseDelay
Definition: itidl_ti.h:1887
sTIDL_EltWiseParams_t eltWiseParams
Definition: itidl_ti.h:1754
float32_tidl numDetObjects
Definition: itidl_ti.h:2135
#define TIDL_MAX_ALG_OUT_BUFS
Definition: itidl_ti.h:112
int32_t eltWiseType
Definition: itidl_ti.h:1610
sTIDL_ConcatParams_t concatParams
Definition: itidl_ti.h:1761
int32_t totalOps
Definition: itidl_ti.h:2419
int32_t inZeroPoint
Definition: itidl_ti.h:1676
int32_t bias
Definition: itidl_ti.h:1547
int32_t numAnchors
Definition: itidl_ti.h:1440
int32_t numKeypoints
Definition: itidl_ti.h:1372
Definition: itidl_ti.h:1276
int32_t priorBox
Definition: itidl_ti.h:1342
float32_tidl h
Definition: itidl_ti.h:2239
int32_t doesLayerChangePadding
Definition: itidl_ti.h:1126
float32_tidl eta
Definition: itidl_ti.h:1358
int32_t useCeil
Definition: itidl_ti.h:1091
int32_t padConstValue
Definition: itidl_ti.h:862
int32_t topK
Definition: itidl_ti.h:1360
int32_t numChannels
Definition: itidl_ti.h:1634
int32_t(* TIDLWriteBinToFile)(const char *fileName, void *addr, int32_t size, int32_t count)
Definition: itidl_ti.h:2355
int32_t padH
Definition: itidl_ti.h:1077
float32_tidl y
Definition: itidl_ti.h:2231
int32_t padH
Definition: itidl_ti.h:1209
int32_t numLayers
Definition: itidl_ti.h:2439
int32_t modelGroupId
Definition: itidl_ti.h:1891
TIDL_sharedBufferProperties ctrlGetArgs
Definition: itidl_ti.h:2275
int32_t optimiseExtMem
Definition: itidl_ti.h:2305
Definition: itidl_ti.h:1957
uint32_t targetPriority
Definition: itidl_ti.h:2344
int32_t inDataQ
Definition: itidl_ti.h:1654
const IVISION_Fxns TIDL_VISION_FXNS
The unique const function table for the TI deep learning algorithm.
double float64_tidl
Definition: itidl_ti.h:132
int32_t interElementSize
Definition: itidl_ti.h:1866
float32_tidl tx
Definition: itidl_ti.h:2182
This structure contains the header information of Objection detection layer.
Definition: itidl_ti.h:2132
int32_t numCores
Definition: itidl_ti.h:1973
float32_tidl label
Definition: itidl_ti.h:2200
eTIDL_inferenceMode
This enumerator defines the different inference implementation modes supported by TIDL...
Definition: itidl_ti.h:1920
int32_t size
Definition: itidl_ti.h:739
int32_t forceInPlace
Definition: itidl_ti.h:1120
int32_t numOutCols
Definition: itidl_ti.h:1571
Definition: itidl_ti.h:944
float32_tidl r21
Definition: itidl_ti.h:2172
int32_t slopeElementSize
Definition: itidl_ti.h:1860
sTIDL_BatchNormParams_t batchNormParams
Definition: itidl_ti.h:1764
int32_t dataFlowInfo
Definition: itidl_ti.h:1881
Definition: itidl_ti.h:2076
Definition: itidl_ti.h:949
Definition: itidl_ti.h:915
Definition: itidl_ti.h:1307
eTIDL_inYuvFormat
This enumerator defines the different YUV formats.
Definition: itidl_ti.h:1931
sTIDL_dataConvertParams_t dataConvertParams
Definition: itidl_ti.h:1772
int32_t outTranspose
Definition: itidl_ti.h:1642
int32_t outLayout
Definition: itidl_ti.h:1675
IVISION_Params visionParams
Definition: itidl_ti.h:2299
int32_t layerExecId
Definition: itidl_ti.h:2421
Definition: itidl_ti.h:939
int32_t keypointConfidence
Definition: itidl_ti.h:1374
This structure define the parameters of Element wise layer in TIDL.
Definition: itidl_ti.h:1604
int32_t numChannels
Definition: itidl_ti.h:802
float32_tidl r32
Definition: itidl_ti.h:2180
Definition: itidl_ti.h:927
sTIDL_InnerProductParams_t innerProductParams
Definition: itidl_ti.h:1756
This structure defines the parameters for custom layer in TIDL.
Definition: itidl_ti.h:1100
int32_t biasElementSize
Definition: itidl_ti.h:1862
This structure define the parameters of AnchorBox used by Detection Output Layer in TIDL...
Definition: itidl_ti.h:1437
int32_t(* TIDLReadBinFromFile)(const char *fileName, void *addr, int32_t size, int32_t count)
Definition: itidl_ti.h:2357
int32_t maxPSAT
Definition: itidl_ti.h:1256
int32_t biasScales
Definition: itidl_ti.h:1553
sTIDL_PoolingParams_t poolParams
Definition: itidl_ti.h:1755
int32_t constIdx
Definition: itidl_ti.h:1596
int32_t padL
Definition: itidl_ti.h:1211
Definition: itidl_ti.h:1286
#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:393
int32_t perChannelPadConstTensorSize
Definition: itidl_ti.h:869
sTIDL_ArgMaxParams_t argMaxParams
Definition: itidl_ti.h:1758
int32_t numOutChannels
Definition: itidl_ti.h:1191
Definition: itidl_ti.h:916
int32_t biasTerm
Definition: itidl_ti.h:1622
int32_t numGroups
Definition: itidl_ti.h:832
int32_t shareLocation
Definition: itidl_ti.h:1367
int32_t backgroundLabelId
Definition: itidl_ti.h:1348
This structure define the parameters of Inner Product (Fully connected) layer in TIDL.
Definition: itidl_ti.h:1543
Definition: itidl_ti.h:1956
eTIDL_inDataFormat
This enumerator defines the different indata formats.
Definition: itidl_ti.h:1909
int32_t weightRangeMethod
Definition: itidl_ti.h:1016
int32_t inDataQ
Definition: itidl_ti.h:1087
Definition: itidl_ti.h:2249
int32_t outDataQ
Definition: itidl_ti.h:1487
int32_t imHeight
Definition: itidl_ti.h:1392
sTIDL_DataParams_t * inDataPtr
Definition: itidl_ti.h:1805
float32_tidl label
Definition: itidl_ti.h:2225
int32_t priorBoxSize
Definition: itidl_ti.h:1344
eTIDL_MemSpaces
Definition: itidl_ti.h:2244
TIDL_Unlock_t pFxnUnLock
Definition: itidl_ti.h:2349
Definition: itidl_ti.h:943
int32_t weightScales
Definition: itidl_ti.h:1170
IVISION_OutArgs iVisionOutArgs
Definition: itidl_ti.h:2434
int32_t calibrationOption
Definition: itidl_ti.h:1875
int32_t inDataQ
Definition: itidl_ti.h:1636
int32_t numBatchH
Definition: itidl_ti.h:784
int32_t padL
Definition: itidl_ti.h:1083
int32_t dataQ
Definition: itidl_ti.h:758
int32_t reserved
Definition: itidl_ti.h:1889
int32_t strideW
Definition: itidl_ti.h:1199
int32_t axis
Definition: itidl_ti.h:821
int32_t type
Definition: itidl_ti.h:1673
#define TIDL_STRING_SIZE
Definition: itidl_ti.h:109
int32_t numInputBuf
Definition: itidl_ti.h:1969
sTIDL_DataParams_t outData
Definition: itidl_ti.h:1803
float32_tidl pY
Definition: itidl_ti.h:1316
int32_t weightsElementSizeInBits
Definition: itidl_ti.h:1812
sTIDL_DepthToSpaceParams_t depthToSpaceParams
Definition: itidl_ti.h:1769
float32_tidl xmax
Definition: itidl_ti.h:2208
int32_t rsvdPassThroughSize
Definition: itidl_ti.h:1156
This structure contains the key points information of BBox detected by OD layer.
Definition: itidl_ti.h:2148
int32_t topKAllClasses
Definition: itidl_ti.h:1362
float32_tidl ty
Definition: itidl_ti.h:2184
Definition: itidl_ti.h:1946
uint32_t coreId
Definition: itidl_ti.h:2339
Definition: itidl_ti.h:2248
int32_t axis
Definition: itidl_ti.h:809
float32_tidl x
Definition: itidl_ti.h:2229
int32_t numChannels
Definition: itidl_ti.h:1503
sTIDL_DataLayerParams_t dataLayerParams
Definition: itidl_ti.h:1757
int32_t numClasses
Definition: itidl_ti.h:1346
Definition: itidl_ti.h:1697
float32_tidl weightScale
Definition: itidl_ti.h:1729
float32_tidl slopeScale
Definition: itidl_ti.h:990
int32_t currLayersGroupId
Definition: itidl_ti.h:2301
eTIDL_ScatterElementsReductionType
Definition: itidl_ti.h:1694
Definition: itidl_ti.h:946
This structure define the parameters of data or kernel buffer memory in TIDL.
Definition: itidl_ti.h:710
float32_tidl r12
Definition: itidl_ti.h:2176
int32_t padR
Definition: itidl_ti.h:1213
float32_tidl confThreshold
Definition: itidl_ti.h:1353
Definition: itidl_ti.h:1298
int32_t deviceName
Definition: itidl_ti.h:1854
int32_t inDataQ
Definition: itidl_ti.h:1533
int32_t numChannels
Definition: itidl_ti.h:1608
float32_tidl r31
Definition: itidl_ti.h:2174
int32_t derivedShifts
Definition: itidl_ti.h:1561
int32_t weightsQ
Definition: itidl_ti.h:1573
int32_t bias
Definition: itidl_ti.h:1168
Definition: itidl_ti.h:1923
int32_t biasQ
Definition: itidl_ti.h:1229
This structure contains all the parameters which controls the applet at create time.
Definition: itidl_ti.h:2391
int32_t activationRangeMethod
Definition: itidl_ti.h:1009
int32_t bias
Definition: itidl_ti.h:1501
Definition: itidl_ti.h:2246
float32_tidl maxPreEmptDelay
Definition: itidl_ti.h:2327
int32_t zeroWeightValue
Definition: itidl_ti.h:1579
int32_t inferenceMode
Definition: itidl_ti.h:1893
This structure contains the each object&#39;s information detected by 3D Objection detection layer...
Definition: itidl_ti.h:2220
int32_t enableDepthToSpace
Definition: itidl_ti.h:1247
This structure contains all the parameters which controls the applet at create time.
Definition: itidl_ti.h:2431
int32_t interDataQ
Definition: itidl_ti.h:1587
int32_t padT
Definition: itidl_ti.h:1079
void(* TIDL_Unlock_t)(int32_t)
Call back function pointer to unlock interrupts.
Definition: itidl_ti.h:147
int32_t padW
Definition: itidl_ti.h:1075
float32_tidl strideL
Definition: itidl_ti.h:1452
Definition: itidl_ti.h:1272
Definition: itidl_ti.h:1271
int32_t axis
Definition: itidl_ti.h:1709
int32_t(* TIDLVprintf)(const char *format, va_list arg)
Definition: itidl_ti.h:2351
int32_t weightsQ
Definition: itidl_ti.h:1223
This structure define the parameters of PriorBox layer in TIDL.
Definition: itidl_ti.h:1483
Definition: itidl_ti.h:928
int32_t layout
Definition: itidl_ti.h:1674
int32_t dataLayout
Definition: itidl_ti.h:1411
int32_t weights
Definition: itidl_ti.h:1166
eTIDL_processingType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1284
int32_t batchPadH
Definition: itidl_ti.h:780
int32_t numInBufs
Definition: itidl_ti.h:1797
Definition: itidl_ti.h:2075
float32_tidl r11
Definition: itidl_ti.h:2170
int32_t ops
Definition: itidl_ti.h:1691
int32_t dataQ
Definition: itidl_ti.h:804
int32_t imWidth
Definition: itidl_ti.h:1389
int32_t kernelH
Definition: itidl_ti.h:1069
int32_t bias
Definition: itidl_ti.h:1527
int32_t weightZeroPoints
Definition: itidl_ti.h:1172
#define TIDL_OD_MAX_ANCHORS_PER_HEAD
Definition: itidl_ti.h:1429
int32_t isQuantStatsAvailable
Definition: itidl_ti.h:1885
int32_t numOutBufs
Definition: itidl_ti.h:2436
int32_t metaArchType
Definition: itidl_ti.h:1407
float32_tidl offsetW
Definition: itidl_ti.h:1454
int32_t numChannels
Definition: itidl_ti.h:1529
float32_tidl * anchorInputs
Definition: itidl_ti.h:1474
float32_tidl odNumKeyPoints
Definition: itidl_ti.h:2139
This structure define the parameters Crop layer in TIDL.
Definition: itidl_ti.h:1650
Definition: itidl_ti.h:1933
#define TIDL_NUM_IN_BUFS
Definition: itidl_ti.h:107
sTIDL_GatherLayerParams_t gatherParams
Definition: itidl_ti.h:1778
sTIDL_CustomParams_t customParams
Definition: itidl_ti.h:1773
int32_t scratchMemRequired
Definition: itidl_ti.h:1818
int32_t reservedCtrl
Definition: itidl_ti.h:2316
int32_t weightsElementSize
Definition: itidl_ti.h:1858
int32_t bufSize
Definition: itidl_ti.h:713
static int32_t TIDL_GetObjDetectionFormatState(int32_t odObjectType, int32_t odObjectFormat)
Definition: itidl_ti.h:2086
Definition: itidl_ti.h:1270
float32_tidl tz
Definition: itidl_ti.h:2186
int32_t padW
Definition: itidl_ti.h:1105
int32_t perChannelWeightScaleOffset
Definition: itidl_ti.h:1185
int32_t numChannels
Definition: itidl_ti.h:1063
This structure define the parameters of Depth To Space layer in TIDL.
Definition: itidl_ti.h:842
This structure define the parameters of Resize layer in TIDL.
Definition: itidl_ti.h:901
int32_t padR
Definition: itidl_ti.h:1085
int32_t memOverlapType
Definition: itidl_ti.h:1114
Definition: itidl_ti.h:940
Definition: itidl_ti.h:1424
#define TIDL_OD_MAX_KEYPOINTS
Definition: itidl_ti.h:1428
Definition: itidl_ti.h:2078
float32_tidl fX
Definition: itidl_ti.h:1310
int32_t headHeight
Definition: itidl_ti.h:1446
int32_t layerType
Definition: itidl_ti.h:1793
int32_t axis
Definition: itidl_ti.h:1485
int32_t derivedBias
Definition: itidl_ti.h:1178
int32_t isBias
Definition: itidl_ti.h:1591
This structure define the parameters ConstData layer in TIDL.
Definition: itidl_ti.h:1725
eTIDL_scoreConverterType
This enumerator defines the different Meta Arch types.
Definition: itidl_ti.h:1295
int32_t minPSAT
Definition: itidl_ti.h:1254
float32_tidl minTensorValue
Definition: itidl_ti.h:764
int32_t isBroadcast
Definition: itidl_ti.h:1731
int32_t padL
Definition: itidl_ti.h:858
int32_t biasZeroPoints
Definition: itidl_ti.h:1555
float32_tidl w
Definition: itidl_ti.h:2235
int32_t maxValue
Definition: itidl_ti.h:762
int32_t mode
Definition: itidl_ti.h:903
int32_t tensorType
Definition: itidl_ti.h:772
int32_t numDim
Definition: itidl_ti.h:756
Definition: itidl_ti.h:1912
Definition: itidl_ti.h:1935
float32_tidl strideW
Definition: itidl_ti.h:1448
sTIDL_DetectOutputParams_t detectOutParams
Definition: itidl_ti.h:1762
float32_tidl ymax
Definition: itidl_ti.h:2210
int32_t customLayerType
Definition: itidl_ti.h:1102
int32_t numHeads
Definition: itidl_ti.h:1381
eTIDL_ResizeType
This enumerator defines the different types of element type used by TIDL library. ...
Definition: itidl_ti.h:889