This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2EXEVM: TIDL limitation

Part Number: TDA2EXEVM

I have a prototxt like below,there are some limitation:

1. tidl do NOT support transpose layer, so I use dma to implement the layer, BUT I do NOT know how to integrate it to TIDL.

2. the tidl user guide says the channel is only up to 1024, BUT the input shape of "conv_2" is (4094, 1, 64). how to support it ? use dense conv ? use group=4 ?

3. is there some other limitation about this prototxt ?

name: "model_A"
input: "data"
input_shape {
dim: 1
dim: 3
dim: 32
dim: 64
}
layer {
name: "conv_1"
type: "Convolution"
bottom: "data"
top: "conv_1"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 128
bias_term: true
pad: 1
kernel_size: 3
stride: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
}
}
layer {
name: "transpose_1"
type: "Permute"
bottom: "conv_1"
top: "transpose_1"
permute_param {
order: 0
order: 2
order: 1
order: 3
}
}
layer {
name: "reshape_1"
type: "Reshape"
bottom: "transpose_1"
top: "reshape_1"
reshape_param {
shape {
dim: 1
dim: 4096
dim: 1
dim: 64
}
}
}
layer {
name: "conv_2"
type: "Convolution"
bottom: "reshape_1"
top: "conv_2"
param {
lr_mult: 1
decay_mult: 1
}
param {
lr_mult: 2
decay_mult: 0
}
convolution_param {
num_output: 128
bias_term: true
pad: 0
kernel_size: 1
stride: 1
weight_filler {
type: "msra"
}
bias_filler {
type: "constant"
value: 0
}
}
}

  • Hi,

    1. You refer to flatten layer in TIDL, which is implemented only using DMA, you can implement something similar to that.

    2. Yes, you can try that.

    3. As TIDL do not support permute and Reshape layers, if you implement permute and reshape, then there are no other limitations.

    Thanks,
    Praveen
  • Hi Praveen,
    Thank you for your response.
    Because I add new layer, I must rebuild quantTool firstly.
    According to the TIDL user guide, I rebuild the quantTool by using "gmake CORE=eve TARGET_PLATFORM=PC all"(REL.TIDLSRC.01.01.01.00) and I do NOT change any code. BUT I get the wrong result. Note that the outQ is always 1.

    Processing Frame Number : 0

    Layer 1 : Out Q : 1 , TIDL_BatchNormLayer , PASSED #MMACs = 0.26, 0.26, Sparsity : 0.00
    Layer 2 : Out Q : 1 , TIDL_ConvolutionLayer, PASSED #MMACs = 33.55, 33.55, Sparsity : 0.00
    Layer 3 : Out Q : 1 , TIDL_InnerProductLayer, PASSED #MMACs = 0.00, 0.00, Sparsity : 0.00

    my config is like below:

    # Default - 0
    randParams = 0

    # 0: Caffe, 1: TensorFlow, Default - 0
    modelType = 0

    # test sparse 0, dense 1
    conv2dKernelType = 0

    # 0: Fixed quantization By tarininng Framework, 1: Dyanamic quantization by TIDL, Default - 1
    quantizationStyle = 1

    # quantRoundAdd/100 will be added while rounding to integer, Default - 50
    quantRoundAdd = 50

    numParamBits = 8

    # 0 : 8bit Unsigned, 1 : 8bit Signed Default - 1
    inElementType = 0

    inputNetFile = "model_test.prototxt"
    inputParamsFile = "model_test.caffemodel"

    outputNetFile = "NET.BIN"
    outputParamsFile = "PRM.BIN"

    rawSampleInData = 1

    numSampleInData = 1
    sampleInData = "f.bin"

    tidlStatsTool = "D:\REL.TIDLSRC.01.01.01.00\modules\ti_dl\test\out\eve_test_dl_algo.out.exe"

  • Hi,

    The command used to build the quantTool is not proper, please refer to section 3.6.3 in the userguide..
    Use below command..
    gmake TARGET_PLATFORM=PC TARGET_BUILD=release CORE=eve RUN_REF_FOR_STATS=1 all

    Also, use some raw image (.y file) instead of bin file as sampleInData

    Thanks,
    Praveen
  • yes, i do use "gmake TARGET_PLATFORM=PC TARGET_BUILD=release CORE=eve RUN_REF_FOR_STATS=1 all" and my bin file is also raw file.
    BUT i still get "1" value of outQ.
  • Hi,

    Please execute the below clean command first and then make command...
    gmake TARGET_PLATFORM=PC TARGET_BUILD=release CORE=eve RUN_REF_FOR_STATS=1 clean
    gmake TARGET_PLATFORM=PC TARGET_BUILD=release CORE=eve RUN_REF_FOR_STATS=1 all

    Thanks,
    Praveen
  • it works now , thank you !