# 0: Caffe, 1: TensorFlow, 2: ONNX, 3: TFLite
modelType = 2

# Bit depth for model parameters like Kernel, Bias etc., if this value is set to 32 bit then TIDL will run inferene in floating point, this feature is only supported in REF only host emulation flow.
numParamBits = 8

# Bit depth for Layer activation; Max supported is 16.
numFeatureBits = 8

# Quantization method. 0: TIDL_QuantStyleFixed, 1: TIDL_QuantStyleDynamic, 2: TIDL_QuantStyleNP2Fixed (default), 3: TIDL_QuantStyleP2Dynamic
quantizationStyle = 2

# Calibration options. 0: Simple calibration (default)
#                      1: Histogram based activation range collection - (optional) percentileActRangeShrink. E.g. percentileRangeShrink = 1 discards 1/100 elements from the edge(s) of the activation distribution.
#                      7: Advanced Bias calibration
#                     64: Bias range clipping
#                   1024: Simple calibration with disabling max saturation check (SDK 7.3 emulation)
#                   1088: Advanced bias calibration with disabling max saturation check (SDK 7.3 emulation)

calibrationOption = 0
biasCalibrationIterations = 0
calibrationOption = 0

# List: Scale factor of input feature, if the input range used in training is 0 to 1 and the same is passed as tensor range of 0 - 255 to TIDL then this parameters shall be 255. This shall not be set in config file when inDataNorm is 1
inQuantFactor = 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000

# Enable / Disable Normalization on input tensor. Scale and mean values are applicable only if this is enabled
inDataNorm = 0

# Network definition from selected Training framework. Example "deploy.prototxt" from caffe or frozen binary protobuf with parameters from tensorflow
inputNetFile = "/mnt/hdd2/milind/DCL_impl/v440/model/model_onnx/gs_tidl/CDCNet_model.onnx"

# Output TIDL model with Net and Parameters
outputNetFile = "/mnt/hdd2/milind/DCL_impl/CDCNet_v440_Frames_50_test_sdk10_cal_0/tidl_sdk_10_1_TDA4VH_model_q8_mp_qcal50_simple/tidl_net_onnx_model_simple_8.bin"

# Input and output buffer descriptor file for TIDL ivision interface
outputParamsFile = "/mnt/hdd2/milind/DCL_impl/CDCNet_v440_Frames_50_test_sdk10_cal_0/tidl_sdk_10_1_TDA4VH_model_q8_mp_qcal50_simple/tidl_io_onnx_model_simple_8_"

# List: each input tensors Height. If set, this value will overwrite the input size. If not set, the import tool will use the original size of input net file. This value will pass on to Range Collection.
inHeight = 1 3 1 1 1 1 1 1

# List: each input tensors width. If set, this value will overwrite the input size. If not set, the import tool will use the original size of input net file. This value will pass on to Range Collection.
inWidth = 1 8192 8192 8192 8192 8192 8192 8192

# List: each input tensors Number of channels. If set, this value will overwrite the input size. If not set, the import tool will use the original size of input net file. This value will pass on to Range Collection.
inNumChannels = 1 1 1 1 1 1 1 1

# List: datatype of each input, 0: uint8, 1: int8, 2: uint16, 3: int16, 6: float32
inElementType = 2 6 3 6 6 6 6 6

#proper mergefull MILIND (ENERGY)
#inElementType = 6 6 6 6 6 6 6 6 6 6 6 6 6 6
#inElementType = 6 2 3 6 6 6 6 6 6 6 6 6 1 6
#inElementType = 1 2 3 3 3 3 3 2 3 6 2 6 1 6
#inElementType = 6 2 3 3 3 3 6 6 6 6 2 6 1 6
#addDataConvertToNet = 2
#NetInElementType = 1 2 3 3 3 3 3 2 3 3 2 6 1 6
#outElementType = 6 1 3 3
#outElementType = 6 1 6 6

#proper CDCNet MILIND 
#inElementType = 2 3 3 3 3 6 3 2
#addDataConvertToNet = 1
#NetInElementType = 2 3 3 3 3 3 3 2

inElementType = 2 6 3 6 6 6 6 6
addDataConvertToNet = 1
NetInElementType = 2 3 3 3 3 3 3 2


#proper Merge Front MILIND 
#inElementType = 1 2 3 6 3 3 3 2 3 3 2 6
#addDataConvertToNet = 1
#NetInElementType = 1 2 3 3 3 3 3 2 3 3 2 6

# Merge batch Norm layer weight and scale in previous convolution layer if possible. Currently this is always enabled.
foldBnInConv2D = 1
foldPreBnConv2D = 1

# Absolute path to raw quantization calibration data (including input tensors)
inData = /mnt/hdd2/milind/DCL_impl/CDCNet_v440_Frames_50_test_sdk10_cal_0/tidl_sdk_10_1_TDA4VH_model_q8_mp_qcal50_simple/qcalibdata.bin

# Input File Format - 0 : Compressed Image (JPEG/PNG), 1: RAW Image, 2: Compressed Image List
inFileFormat = 1

# Number of input calibration frames within the provided file in inData
numFrames = 50

# Post processing on output tensor. 0 : Disable, 1- Classification top 1 and 5 accuracy, 2 – Draw bounding box for OD, 3 - Pixel level color blending
postProcType = 0

# Listing all network inputs (WARNING: order MIGHT NOT be applied by TIDL)
inDataNamesList = num_bv_0,/model/AFNet_0/model/sector_finalizer/Asin_output_0,sensor_polarity_0,sensor_angle_0,lon_vel_0,lat_vel_0,d_metric_0,vua_0

# Listing all network outputs (WARNING: order MIGHT NOT be applied by TIDL)
outDataNamesList = /model/CDCNet_0/ego_compensate_sparse/Add_3_output_0

# Enabling custom operators by default
enableCustomLayers = 1

# Black magic flag allowing the generation of the per-layer profile table (only documented in the NDA part of the TIDL doc)
compileConstraintsFlag = 83886080

# List of mixed-precision tensors (if any)
outputFeature16bitNamesList = /model/AFNet_0/model/sector_finalizer/Add_output_0,/model/AFNet_0/model/TopK_output_0,/model/AFNet_0/model/sector_finalizer/Asin_output_0,num_bv_0,sensor_polarity_0,sensor_angle_0,lon_vel_0,lat_vel_0,d_metric_0,vua_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/Div_output_0,/model/CDCNet_0/ego_compensate_sparse/Add_3_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/Transpose_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/_stationary_feature_binning/Clip_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/_stationary_feature_binning/Conv_1_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/feature_stacking/Conv_1_output_0,/model/EnergyNet_0/1_1/Relu_output_0,/model/EnergyNet_0/3_1/Relu_output_0,/model/EnergyNet_0/4_1/Conv_output_0,/model/EnergyNet_0/5_1/Tanh_output_0,r_metric_0,/model/DetectionListReplication_0/Repeat/r_metric/Concat_output_0,/model/EnergyNet_0/1/Relu_output_0,/model/EnergyNet_0/3/Relu_output_0,/model/EnergyNet_0/4/Conv_output_0,/model/EnergyNet_0/5/Tanh_output_0,energy_0,/model/DetectionListReplication_0/Repeat/energy/Concat_output_0,/model/EnergyNet_0/Add_output_0,/model/EnergyNet_0/Add_1_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/Concat_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/0_1/Relu_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/1_1/Relu_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/2_1/Relu_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/Concat_1_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/feature_stacking/Conv_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/feature_stacking/Mul_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/feature_stacking/Concat_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/Mul_output_0,/model/od_grid/Polar2VCS_0/polar_feat_calc/Reshape_output_0,radar_idx_0,radar_calib_inv_0,/model/Head/od/od_regression_center/Conv_output_0,/model/Head/od/od_regression_speed/Conv_output_0,/model/Head/od/od_regression_binning/Conv_output_0,/model/Head/od/od_regression_edge_shift/Conv_output_0,/model/Head/od/od_classification/Conv_output_0,/model/Head/od/od_regression_centerness/Conv_output_0,/model/Head/od/al_fused_head/Conv_output_0

# Paths to other tools(optional)
# tidlStatsTool = None
# perfSimTool   = None
# graphVizTool  = None
# modelDumpTool  = None

# Network Compiler Configuration file. Refer Network Compiler guide for configuration parameters
perfSimConfig = /mnt/hdd2/milind/DCL_impl/CDCNet_v440_Frames_50_test_sdk10_cal_0/tidl_sdk_10_1_TDA4VH_model_q8_mp_qcal50_simple/device_config_model.txt

# (Optional) Prototxt file to be used to bypass calibration / fill in empty file
quantParamsPrototxtFile = "/mnt/hdd2/milind/DCL_impl/CDCNet_v440_Frames_50_test_sdk10_cal_0/tidl_sdk_10_1_TDA4VH_model_q8_mp_qcal50_simple/quant_params.prototxt"