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.

TDA4x EVM: Inception based model takes 20 minutes per frame

Hi E2E'ers

I'm trying to run a 30 layer model based on inception net for performing image segmentation. During the conversion process from caffe a performance analysis showed that the model requires about 1.6 GMACs, which does not seem like an infeasible load for the TDA4x to handle. Nonetheless, when trying to run the model on our EVM, I am finding that the TIDL openVX node is taking more than 20 minutes to push out a frame.

Our OpenVX app is based loosely on the provided AVP TIDL demo.

I'm stuck here - any ideas why this could be happening?

-Ying

  • Hi Ying,

    Can you first try to run the model standalone with TIDL and see the performance.

    Please refer to TIDL user guide: psdk_rtos_auto_j7_06_01_00_15/tidl_j7_01_00_00_00/ti_dl/docs/user_guide_html/md_tidl_fsg_steps_to_debug_mismatch.html

    Regards,

    Rishabh

  • Thanks for the quick response Rishabh!

    So I've tried running "./PC_dsp_test_dl_algo.out configList.txt"

    Contents of "configList.txt":

    test.txt


    Contents of "test.txt"

    netBinFile = "model.bin"

    ioConfigFile = "ioConfig.bin"
    inData = "rawImg.bgr"
    outData = "outputTensor.bin"
    inFileFormat = 1
    padInBuffInTB = 0
    numFrames = 1
    postProcType = 0
    debugTraceLevel = 2
    enableLayerPerfTraces = 1

    rawImg.bgr is a raw 512*288*3 binary test image datafile, in BGR planar format. This file was generated from a real image from a driving log and is strictly pixel values with no padding (e.g. the file's size is exactly 512*288*3)
    outputTensor.bin is expected to have a pixel segmented output with dimensions 512*288.

    Running the demo produces the following output:

    Processing config file #0 : test.txt 
    Alg Alloc for Layer # -    0
    Alg Alloc for Layer # -    1
    Alg Alloc for Layer # -    2
    Alg Alloc for Layer # -    3
    Alg Alloc for Layer # -    4
    Alg Alloc for Layer # -    5
    Alg Alloc for Layer # -    6
    Alg Alloc for Layer # -    7
    Alg Alloc for Layer # -    8
    Alg Alloc for Layer # -    9
    Alg Alloc for Layer # -   10
    Alg Alloc for Layer # -   11
    Alg Alloc for Layer # -   12
    Alg Alloc for Layer # -   13
    Alg Alloc for Layer # -   14
    Alg Alloc for Layer # -   15
    Alg Alloc for Layer # -   16
    Alg Alloc for Layer # -   17
    Alg Alloc for Layer # -   18
    Alg Alloc for Layer # -   19
    Alg Alloc for Layer # -   20
    Alg Alloc for Layer # -   21
    Alg Alloc for Layer # -   22
    Alg Alloc for Layer # -   23
    Alg Alloc for Layer # -   24
    Alg Alloc for Layer # -   25
    Alg Alloc for Layer # -   26
    Alg Alloc for Layer # -   27
    Alg Alloc for Layer # -   28
    Alg Alloc for Layer # -   29
    Num,    Space,     SizeinBytes,   SineInMB
       0,    17,         2816,      0.003 0x2c5b430
       1,    17,          120,      0.000 0x2c5bf40
       2,    17,        16384,      0.016 0x7fef24f0d080
       3,    17,       458752,      0.438 0x7fef24f11080
       4,    17,      8257536,      7.875 0x7fef24f81080
       5,    17,      2766484,      2.638 0x7fef249be010
       6,    17,       717568,      0.684 0x7fef25761080
       7,    17,      5787136,      5.519 0x7fef25810380
       8,    17,     28915712,     27.576 0x7fef25d95180
       9,    17,      9636864,      9.190 0x7fef27928980
      10,    17,       692480,      0.660 0x7fef672b6010
      11,    17,       381248,      0.364 0x7fef24960010
      12,    17,          256,      0.000 0x7fef28259580
    Total External Memory (DDR) Size =     57633356,     54.963 
    Alg Init for Layer # -    0
    Alg Init for Layer # -    1
    Alg Init for Layer # -    2
    Alg Init for Layer # -    3
    Alg Init for Layer # -    4
    Alg Init for Layer # -    5
    Alg Init for Layer # -    6
    Alg Init for Layer # -    7
    Alg Init for Layer # -    8
    Alg Init for Layer # -    9
    Alg Init for Layer # -   10
    Alg Init for Layer # -   11
    Alg Init for Layer # -   12
    Alg Init for Layer # -   13
    Alg Init for Layer # -   14
    Alg Init for Layer # -   15
    Alg Init for Layer # -   16
    Alg Init for Layer # -   17
    Alg Init for Layer # -   18
    Alg Init for Layer # -   19
    Alg Init for Layer # -   20
    Alg Init for Layer # -   21
    Alg Init for Layer # -   22
    Alg Init for Layer # -   23
    Alg Init for Layer # -   24
    Alg Init for Layer # -   25
    Alg Init for Layer # -   26
    Alg Init for Layer # -   27
    Alg Init for Layer # -   28
    Alg Init for Layer # -   29
    
     Instance created for  test.txt
    
    Processing Cnt :    0, InstCnt :    0 model.bin!
     ----------------------- TIDL Process with REF_ONLY FLOW ------------------------
    
    #    0 . ..Starting Layer # -    0
    Starting Layer # -    1
    Processing Layer # -    1
    End of Layer # -    1
    Starting Layer # -    2
    Processing Layer # -    2
    End of Layer # -    2
    Starting Layer # -    3
    Processing Layer # -    3
    End of Layer # -    3
    Starting Layer # -    4
    Processing Layer # -    4
    End of Layer # -    4
    Starting Layer # -    5
    Processing Layer # -    5
    End of Layer # -    5
    Starting Layer # -    6
    Processing Layer # -    6
    End of Layer # -    6
    Starting Layer # -    7
    Processing Layer # -    7
    End of Layer # -    7
    Starting Layer # -    8
    Processing Layer # -    8
    End of Layer # -    8
    Starting Layer # -    9
    Processing Layer # -    9
    End of Layer # -    9
    Starting Layer # -   10
    Processing Layer # -   10
    End of Layer # -   10
    Starting Layer # -   11
    Processing Layer # -   11
    End of Layer # -   11
    Starting Layer # -   12
    Processing Layer # -   12
    End of Layer # -   12
    Starting Layer # -   13
    Processing Layer # -   13
    End of Layer # -   13
    Starting Layer # -   14
    Processing Layer # -   14
    End of Layer # -   14
    Starting Layer # -   15
    Processing Layer # -   15
    End of Layer # -   15
    Starting Layer # -   16
    Processing Layer # -   16
    End of Layer # -   16
    Starting Layer # -   17
    Processing Layer # -   17
    End of Layer # -   17
    Starting Layer # -   18
    Processing Layer # -   18
    End of Layer # -   18
    Starting Layer # -   19
    Processing Layer # -   19
    End of Layer # -   19
    Starting Layer # -   20
    Processing Layer # -   20
    End of Layer # -   20
    Starting Layer # -   21
    Processing Layer # -   21
    End of Layer # -   21
    Starting Layer # -   22
    Processing Layer # -   22
    End of Layer # -   22
    Starting Layer # -   23
    Processing Layer # -   23
    End of Layer # -   23
    Starting Layer # -   24
    Processing Layer # -   24
    End of Layer # -   24
    Starting Layer # -   25
    Processing Layer # -   25
    End of Layer # -   25
    Starting Layer # -   26
    Processing Layer # -   26
    End of Layer # -   26
    Starting Layer # -   27
    Processing Layer # -   27
    End of Layer # -   27
    Starting Layer # -   28
    Processing Layer # -   28
    End of Layer # -   28
    Starting Layer # -   29
    
    Network Cycles 0 
               Layer,   Layer Cycles,kernelOnlyCycles, coreLoopCycles,LayerSetupCycles,dmaPipeupCycles, dmaPipeDownCycles, PrefetchCycles,copyKerCoeffCycles,LayerDeinitCycles,LastBlockCycles, paddingTrigger,    paddingWait,LayerWithoutPad,LayerHandleCopy,
         1,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         2,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         3,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         4,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         5,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         6,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         7,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         8,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
         9,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        10,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        11,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        12,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        13,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        14,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        15,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        16,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        17,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        18,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        19,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        20,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        21,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        22,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        23,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        24,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        25,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        26,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        27,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
        28,              0,              0,              0,              0,              0,                 0,              0,                 0,              0,              0,              0,              0,              0,              0,
    

     

    
    

    Additionally, the outputTensor.bin file is generated as a 147456B file (i.e. 512*288 bytes) containing all zeros. Toggling the "padInBuffInTB" parameter does not change the results.

    ...I'm assuming I haven't specified some input correctly.

  • Also, here's an analysis that I think was output by the perfSim tool, showing the layers of our toy model and some configuration details. The original file is also attached.

    Num of Layer Detected :  30 
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Num|TIDL Layer Name               |Out Data Name                                     |Group |#Ins  |#Outs |Inbuf Ids                       |Outbuf Id |In NCHW                             |Out NCHW                            |MACS       |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        0|TIDL_DataLayer                |img_data                                          |     0|    -1|     1|  x   x   x   x   x   x   x   x |  0       |       0        0        0        0 |       1        3      288      512 |         0 |
        1|TIDL_ConvolutionLayer         |conv1a                                            |     0|     1|     1|  0   x   x   x   x   x   x   x |  1       |       1        3      288      512 |       1       32      144      256 |  90832896 |
        2|TIDL_ConvolutionLayer         |conv1b                                            |     0|     1|     1|  1   x   x   x   x   x   x   x |  2       |       1       32      144      256 |       1       32      144      256 |  87293952 |
        3|TIDL_PoolingLayer             |pool1                                             |     0|     1|     1|  2   x   x   x   x   x   x   x |  3       |       1       32      144      256 |       1       32       72      128 |   1179648 |
        4|TIDL_ConvolutionLayer         |res2a_branch2a                                    |     0|     1|     1|  3   x   x   x   x   x   x   x |  4       |       1       32       72      128 |       1       64       72      128 | 171048960 |
        5|TIDL_ConvolutionLayer         |res2a_branch2b                                    |     0|     1|     1|  4   x   x   x   x   x   x   x |  5       |       1       64       72      128 |       1       64       72      128 |  86114304 |
        6|TIDL_PoolingLayer             |pool2                                             |     0|     1|     1|  5   x   x   x   x   x   x   x |  6       |       1       64       72      128 |       1       64       36       64 |    589824 |
        7|TIDL_ConvolutionLayer         |res3a_branch2a                                    |     0|     1|     1|  6   x   x   x   x   x   x   x |  7       |       1       64       36       64 |       1      128       36       64 | 170459136 |
        8|TIDL_ConvolutionLayer         |res3a_branch2b                                    |     0|     1|     1|  7   x   x   x   x   x   x   x |  8       |       1      128       36       64 |       1      128       36       64 |  85524480 |
        9|TIDL_PoolingLayer             |pool3                                             |     0|     1|     1|  8   x   x   x   x   x   x   x |  9       |       1      128       36       64 |       1      128       18       32 |    294912 |
       10|TIDL_ConvolutionLayer         |out3a                                             |     0|     1|     1|  8   x   x   x   x   x   x   x | 10       |       1      128       36       64 |       1       64       36       64 |  85229568 |
       11|TIDL_ConvolutionLayer         |res4a_branch2a                                    |     0|     1|     1|  9   x   x   x   x   x   x   x | 11       |       1      128       18       32 |       1      256       18       32 | 170164224 |
       12|TIDL_ConvolutionLayer         |res4a_branch2b                                    |     0|     1|     1| 11   x   x   x   x   x   x   x | 12       |       1      256       18       32 |       1      256       18       32 |  85229568 |
       13|TIDL_PoolingLayer             |pool4                                             |     0|     1|     1| 12   x   x   x   x   x   x   x | 13       |       1      256       18       32 |       1      256        9       16 |    147456 |
       14|TIDL_ConvolutionLayer         |res5a_branch2a                                    |     0|     1|     1| 13   x   x   x   x   x   x   x | 14       |       1      256        9       16 |       1      512        9       16 | 170016768 |
       15|TIDL_ConvolutionLayer         |res5a_branch2b                                    |     0|     1|     1| 14   x   x   x   x   x   x   x | 15       |       1      512        9       16 |       1      512        9       16 |  85082112 |
       16|TIDL_ConvolutionLayer         |out5a                                             |     0|     1|     1| 15   x   x   x   x   x   x   x | 16       |       1      512        9       16 |       1       64        9       16 |  21252096 |
       17|TIDL_Deconv2DLayer            |out5a_up2                                         |     0|     1|     1| 16   x   x   x   x   x   x   x | 17       |       1       64        9       16 |       1       64       18       32 |    663552 |
       18|TIDL_Deconv2DLayer            |out5a_up4                                         |     0|     1|     1| 17   x   x   x   x   x   x   x | 18       |       1       64       18       32 |       1       64       36       64 |   2654208 |
       19|TIDL_EltWiseLayer             |out3_out5_combined                                |     0|     2|     1| 18  10   x   x   x   x   x   x | 19       |       1       64       36       64 |       1       64       36       64 |    147456 |
       20|TIDL_ConvolutionLayer         |ctx_conv1                                         |     0|     1|     1| 19   x   x   x   x   x   x   x | 20       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       21|TIDL_ConvolutionLayer         |ctx_conv2                                         |     0|     1|     1| 20   x   x   x   x   x   x   x | 21       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       22|TIDL_ConvolutionLayer         |ctx_conv3                                         |     0|     1|     1| 21   x   x   x   x   x   x   x | 22       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       23|TIDL_ConvolutionLayer         |ctx_conv4                                         |     0|     1|     1| 22   x   x   x   x   x   x   x | 23       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       24|TIDL_ConvolutionLayer         |ctx_final                                         |     0|     1|     1| 23   x   x   x   x   x   x   x | 24       |       1       64       36       64 |       1        5       36       64 |   6658560 |
       25|TIDL_Deconv2DLayer            |out_deconv_final_up2                              |     0|     1|     1| 24   x   x   x   x   x   x   x | 25       |       1        5       36       64 |       1        5       72      128 |    829440 |
       26|TIDL_Deconv2DLayer            |out_deconv_final_up4                              |     0|     1|     1| 25   x   x   x   x   x   x   x | 26       |       1        5       72      128 |       1        5      144      256 |   3317760 |
       27|TIDL_Deconv2DLayer            |out_deconv_final_up8                              |     0|     1|     1| 26   x   x   x   x   x   x   x | 27       |       1        5      144      256 |       1        5      288      512 |  11796480 |
       28|TIDL_ArgMaxLayer              |seg_out                                           |     0|     1|     1| 27   x   x   x   x   x   x   x | 28       |       1        5      288      512 |       1        1      288      512 |    147456 |
       29|TIDL_DataLayer                |seg_out                                           |     0|     1|    -1| 28   x   x   x   x   x   x   x |  0       |       1        1      288      512 |       0        0        0        0 |         0 |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total Giga Macs : 1.6776
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    

    
    
    Num of Layer Detected :  30 
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      Num|TIDL Layer Name               |Out Data Name                                     |Group |#Ins  |#Outs |Inbuf Ids                       |Outbuf Id |In NCHW                             |Out NCHW                            |MACS       |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        0|TIDL_DataLayer                |img_data                                          |     0|    -1|     1|  x   x   x   x   x   x   x   x |  0       |       0        0        0        0 |       1        3      288      512 |         0 |
        1|TIDL_ConvolutionLayer         |conv1a                                            |     0|     1|     1|  0   x   x   x   x   x   x   x |  1       |       1        3      288      512 |       1       32      144      256 |  90832896 |
        2|TIDL_ConvolutionLayer         |conv1b                                            |     0|     1|     1|  1   x   x   x   x   x   x   x |  2       |       1       32      144      256 |       1       32      144      256 |  87293952 |
        3|TIDL_PoolingLayer             |pool1                                             |     0|     1|     1|  2   x   x   x   x   x   x   x |  3       |       1       32      144      256 |       1       32       72      128 |   1179648 |
        4|TIDL_ConvolutionLayer         |res2a_branch2a                                    |     0|     1|     1|  3   x   x   x   x   x   x   x |  4       |       1       32       72      128 |       1       64       72      128 | 171048960 |
        5|TIDL_ConvolutionLayer         |res2a_branch2b                                    |     0|     1|     1|  4   x   x   x   x   x   x   x |  5       |       1       64       72      128 |       1       64       72      128 |  86114304 |
        6|TIDL_PoolingLayer             |pool2                                             |     0|     1|     1|  5   x   x   x   x   x   x   x |  6       |       1       64       72      128 |       1       64       36       64 |    589824 |
        7|TIDL_ConvolutionLayer         |res3a_branch2a                                    |     0|     1|     1|  6   x   x   x   x   x   x   x |  7       |       1       64       36       64 |       1      128       36       64 | 170459136 |
        8|TIDL_ConvolutionLayer         |res3a_branch2b                                    |     0|     1|     1|  7   x   x   x   x   x   x   x |  8       |       1      128       36       64 |       1      128       36       64 |  85524480 |
        9|TIDL_PoolingLayer             |pool3                                             |     0|     1|     1|  8   x   x   x   x   x   x   x |  9       |       1      128       36       64 |       1      128       18       32 |    294912 |
       10|TIDL_ConvolutionLayer         |out3a                                             |     0|     1|     1|  8   x   x   x   x   x   x   x | 10       |       1      128       36       64 |       1       64       36       64 |  85229568 |
       11|TIDL_ConvolutionLayer         |res4a_branch2a                                    |     0|     1|     1|  9   x   x   x   x   x   x   x | 11       |       1      128       18       32 |       1      256       18       32 | 170164224 |
       12|TIDL_ConvolutionLayer         |res4a_branch2b                                    |     0|     1|     1| 11   x   x   x   x   x   x   x | 12       |       1      256       18       32 |       1      256       18       32 |  85229568 |
       13|TIDL_PoolingLayer             |pool4                                             |     0|     1|     1| 12   x   x   x   x   x   x   x | 13       |       1      256       18       32 |       1      256        9       16 |    147456 |
       14|TIDL_ConvolutionLayer         |res5a_branch2a                                    |     0|     1|     1| 13   x   x   x   x   x   x   x | 14       |       1      256        9       16 |       1      512        9       16 | 170016768 |
       15|TIDL_ConvolutionLayer         |res5a_branch2b                                    |     0|     1|     1| 14   x   x   x   x   x   x   x | 15       |       1      512        9       16 |       1      512        9       16 |  85082112 |
       16|TIDL_ConvolutionLayer         |out5a                                             |     0|     1|     1| 15   x   x   x   x   x   x   x | 16       |       1      512        9       16 |       1       64        9       16 |  21252096 |
       17|TIDL_Deconv2DLayer            |out5a_up2                                         |     0|     1|     1| 16   x   x   x   x   x   x   x | 17       |       1       64        9       16 |       1       64       18       32 |    663552 |
       18|TIDL_Deconv2DLayer            |out5a_up4                                         |     0|     1|     1| 17   x   x   x   x   x   x   x | 18       |       1       64       18       32 |       1       64       36       64 |   2654208 |
       19|TIDL_EltWiseLayer             |out3_out5_combined                                |     0|     2|     1| 18  10   x   x   x   x   x   x | 19       |       1       64       36       64 |       1       64       36       64 |    147456 |
       20|TIDL_ConvolutionLayer         |ctx_conv1                                         |     0|     1|     1| 19   x   x   x   x   x   x   x | 20       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       21|TIDL_ConvolutionLayer         |ctx_conv2                                         |     0|     1|     1| 20   x   x   x   x   x   x   x | 21       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       22|TIDL_ConvolutionLayer         |ctx_conv3                                         |     0|     1|     1| 21   x   x   x   x   x   x   x | 22       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       23|TIDL_ConvolutionLayer         |ctx_conv4                                         |     0|     1|     1| 22   x   x   x   x   x   x   x | 23       |       1       64       36       64 |       1       64       36       64 |  85229568 |
       24|TIDL_ConvolutionLayer         |ctx_final                                         |     0|     1|     1| 23   x   x   x   x   x   x   x | 24       |       1       64       36       64 |       1        5       36       64 |   6658560 |
       25|TIDL_Deconv2DLayer            |out_deconv_final_up2                              |     0|     1|     1| 24   x   x   x   x   x   x   x | 25       |       1        5       36       64 |       1        5       72      128 |    829440 |
       26|TIDL_Deconv2DLayer            |out_deconv_final_up4                              |     0|     1|     1| 25   x   x   x   x   x   x   x | 26       |       1        5       72      128 |       1        5      144      256 |   3317760 |
       27|TIDL_Deconv2DLayer            |out_deconv_final_up8                              |     0|     1|     1| 26   x   x   x   x   x   x   x | 27       |       1        5      144      256 |       1        5      288      512 |  11796480 |
       28|TIDL_ArgMaxLayer              |seg_out                                           |     0|     1|     1| 27   x   x   x   x   x   x   x | 28       |       1        5      288      512 |       1        1      288      512 |    147456 |
       29|TIDL_DataLayer                |seg_out                                           |     0|     1|    -1| 28   x   x   x   x   x   x   x |  0       |       1        1      288      512 |       0        0        0        0 |         0 |
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Total Giga Macs : 1.6776
    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Hi,

    This network looks similar to jsegNet21v2. Please see https://e2e.ti.com/support/processors/f/791/t/848577

    Also can you run the standalone network on target to see the performance numbers.

    Regards,

    Rishabh

  • Hi,

    Have you been able to make progress on this issue?

    Regards,

    Rishabh

  • Hi Rishabh,

    I'm getting the following issue when trying to initialize the DSP app via JTAG:

    C71X_0: Trouble Reading Memory Block at 0x0 on Page 0 of Length 0x1: (Error -1344 - (0:0:0)) Register or Memory request has failed due to a Transaction Error. This may be the result of reading from a write only register, writing to a read only register, or accessing a memory location that is not assigned. No user action required. (Emulation package 8.3.1.00007)

    C71X_0: Trouble Reading Memory Block at 0x707e8e42 on Page 0 of Length 0x1: (Error -1350 - (0:0:0)) Register or Memory request has timed out. The CPU is executing a High Priority Interrupt, this is typically due to a Double Page Fault. Choose 'Force' to force the CPU into a state that allows debug of why the HPI is active. (Emulation package 8.3.1.00007)

    I'm using a Spectrum Digital XDS560v2 STM.

  • Regarding the jsegNet model you linked to, you mentioned in that thread that there were some changes made to deploy.protoxt. Would you be able to describe those changes? Do they address an issue that could be causing the symptoms I'm seeing here?

  • I also got clearance from my team to share with you our model, prototxt, and tidl_import.txt files.

    I've sent them to John Smrstk and David Copeland and asked them to forward to you. Hopefully this will help us more directly approach a root cause. Please let me know if you are able to get meaningful test bench results and/or coherent tensor outputs from these files.

    Meanwhile I've attached the prototxt file:

    name: "tinet_v3"
    
    input: "img_data"
    input_shape {
      dim: 1
      dim: 3
      dim: 288
      dim: 512
    }
    layer {
      name: "conv1a"
      type: "Convolution"
      bottom: "img_data"
      top: "conv1a"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 32
        bias_term: true
        pad: 2
        kernel_size: 5
        group: 1
        stride: 2
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "conv1a/bn"
      type: "BatchNorm"
      bottom: "conv1a"
      top: "conv1a"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "conv1a/relu"
      type: "ReLU"
      bottom: "conv1a"
      top: "conv1a"
    }
    layer {
      name: "conv1b"
      type: "Convolution"
      bottom: "conv1a"
      top: "conv1b"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 32
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 4
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "conv1b/bn"
      type: "BatchNorm"
      bottom: "conv1b"
      top: "conv1b"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "conv1b/relu"
      type: "ReLU"
      bottom: "conv1b"
      top: "conv1b"
    }
    layer {
      name: "pool1"
      type: "Pooling"
      bottom: "conv1b"
      top: "pool1"
      pooling_param {
        pool: MAX
        kernel_size: 2
        stride: 2
      }
    }
    layer {
      name: "res2a_branch2a"
      type: "Convolution"
      bottom: "pool1"
      top: "res2a_branch2a"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "res2a_branch2a/bn"
      type: "BatchNorm"
      bottom: "res2a_branch2a"
      top: "res2a_branch2a"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res2a_branch2a/relu"
      type: "ReLU"
      bottom: "res2a_branch2a"
      top: "res2a_branch2a"
    }
    layer {
      name: "res2a_branch2b"
      type: "Convolution"
      bottom: "res2a_branch2a"
      top: "res2a_branch2b"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 4
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "res2a_branch2b/bn"
      type: "BatchNorm"
      bottom: "res2a_branch2b"
      top: "res2a_branch2b"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res2a_branch2b/relu"
      type: "ReLU"
      bottom: "res2a_branch2b"
      top: "res2a_branch2b"
    }
    layer {
      name: "pool2"
      type: "Pooling"
      bottom: "res2a_branch2b"
      top: "pool2"
      pooling_param {
        pool: MAX
        kernel_size: 2
        stride: 2
      }
    }
    layer {
      name: "res3a_branch2a"
      type: "Convolution"
      bottom: "pool2"
      top: "res3a_branch2a"
      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
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "res3a_branch2a/bn"
      type: "BatchNorm"
      bottom: "res3a_branch2a"
      top: "res3a_branch2a"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res3a_branch2a/relu"
      type: "ReLU"
      bottom: "res3a_branch2a"
      top: "res3a_branch2a"
    }
    layer {
      name: "res3a_branch2b"
      type: "Convolution"
      bottom: "res3a_branch2a"
      top: "res3a_branch2b"
      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
        group: 4
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "res3a_branch2b/bn"
      type: "BatchNorm"
      bottom: "res3a_branch2b"
      top: "res3a_branch2b"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res3a_branch2b/relu"
      type: "ReLU"
      bottom: "res3a_branch2b"
      top: "res3a_branch2b"
    }
    layer {
      name: "pool3"
      type: "Pooling"
      bottom: "res3a_branch2b"
      top: "pool3"
      pooling_param {
        pool: MAX
        kernel_size: 2
        stride: 2
      }
    }
    layer {
      name: "res4a_branch2a"
      type: "Convolution"
      bottom: "pool3"
      top: "res4a_branch2a"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 256
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "res4a_branch2a/bn"
      type: "BatchNorm"
      bottom: "res4a_branch2a"
      top: "res4a_branch2a"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res4a_branch2a/relu"
      type: "ReLU"
      bottom: "res4a_branch2a"
      top: "res4a_branch2a"
    }
    layer {
      name: "res4a_branch2b"
      type: "Convolution"
      bottom: "res4a_branch2a"
      top: "res4a_branch2b"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 256
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 4
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "res4a_branch2b/bn"
      type: "BatchNorm"
      bottom: "res4a_branch2b"
      top: "res4a_branch2b"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res4a_branch2b/relu"
      type: "ReLU"
      bottom: "res4a_branch2b"
      top: "res4a_branch2b"
    }
    layer {
      name: "pool4"
      type: "Pooling"
      bottom: "res4a_branch2b"
      top: "pool4"
      pooling_param {
        pool: MAX
        kernel_size: 2
        stride: 2
      }
    }
    layer {
      name: "res5a_branch2a"
      type: "Convolution"
      bottom: "pool4"
      top: "res5a_branch2a"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 512
        bias_term: true
        pad: 2
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 2
      }
    }
    layer {
      name: "res5a_branch2a/bn"
      type: "BatchNorm"
      bottom: "res5a_branch2a"
      top: "res5a_branch2a"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res5a_branch2a/relu"
      type: "ReLU"
      bottom: "res5a_branch2a"
      top: "res5a_branch2a"
    }
    layer {
      name: "res5a_branch2b"
      type: "Convolution"
      bottom: "res5a_branch2a"
      top: "res5a_branch2b"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 512
        bias_term: true
        pad: 2
        kernel_size: 3
        group: 4
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 2
      }
    }
    layer {
      name: "res5a_branch2b/bn"
      type: "BatchNorm"
      bottom: "res5a_branch2b"
      top: "res5a_branch2b"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "res5a_branch2b/relu"
      type: "ReLU"
      bottom: "res5a_branch2b"
      top: "res5a_branch2b"
    }
    ################
    # segmentation #
    ################
    layer {
      name: "out5a"
      type: "Convolution"
      bottom: "res5a_branch2b"
      top: "out5a"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 4
        kernel_size: 3
        group: 2
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 4
      }
    }
    layer {
      name: "out5a/bn"
      type: "BatchNorm"
      bottom: "out5a"
      top: "out5a"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "out5a/relu"
      type: "ReLU"
      bottom: "out5a"
      top: "out5a"
    }
    layer {
      name: "out5a_up2"
      type: "Deconvolution"
      bottom: "out5a"
      top: "out5a_up2"
      param {
        lr_mult: 0
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 64
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "out5a_up2/bn"
      type: "BatchNorm"
      bottom: "out5a_up2"
      top: "out5a_up2"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "out5a_up2/relu"
      type: "ReLU"
      bottom: "out5a_up2"
      top: "out5a_up2"
    }
    layer {
      name: "out5a_up4"
      type: "Deconvolution"
      bottom: "out5a_up2"
      top: "out5a_up4"
      param {
        lr_mult: 0
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 64
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "out5a_up4/bn"
      type: "BatchNorm"
      bottom: "out5a_up4"
      top: "out5a_up4"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "out5a_up4/relu"
      type: "ReLU"
      bottom: "out5a_up4"
      top: "out5a_up4"
    }
    layer {
      name: "out3a"
      type: "Convolution"
      bottom: "res3a_branch2b"
      top: "out3a"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 2
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "out3a/bn"
      type: "BatchNorm"
      bottom: "out3a"
      top: "out3a"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "out3a/relu"
      type: "ReLU"
      bottom: "out3a"
      top: "out3a"
    }
    layer {
      name: "out3_out5_combined"
      type: "Eltwise"
      bottom: "out5a_up4"
      bottom: "out3a"
      top: "out3_out5_combined"
    }
    layer {
      name: "ctx_conv1"
      type: "Convolution"
      bottom: "out3_out5_combined"
      top: "ctx_conv1"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "ctx_conv1/bn"
      type: "BatchNorm"
      bottom: "ctx_conv1"
      top: "ctx_conv1"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "ctx_conv1/relu"
      type: "ReLU"
      bottom: "ctx_conv1"
      top: "ctx_conv1"
    }
    layer {
      name: "ctx_conv2"
      type: "Convolution"
      bottom: "ctx_conv1"
      top: "ctx_conv2"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 4
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 4
      }
    }
    layer {
      name: "ctx_conv2/bn"
      type: "BatchNorm"
      bottom: "ctx_conv2"
      top: "ctx_conv2"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "ctx_conv2/relu"
      type: "ReLU"
      bottom: "ctx_conv2"
      top: "ctx_conv2"
    }
    layer {
      name: "ctx_conv3"
      type: "Convolution"
      bottom: "ctx_conv2"
      top: "ctx_conv3"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 4
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 4
      }
    }
    layer {
      name: "ctx_conv3/bn"
      type: "BatchNorm"
      bottom: "ctx_conv3"
      top: "ctx_conv3"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "ctx_conv3/relu"
      type: "ReLU"
      bottom: "ctx_conv3"
      top: "ctx_conv3"
    }
    layer {
      name: "ctx_conv4"
      type: "Convolution"
      bottom: "ctx_conv3"
      top: "ctx_conv4"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 64
        bias_term: true
        pad: 4
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 4
      }
    }
    layer {
      name: "ctx_conv4/bn"
      type: "BatchNorm"
      bottom: "ctx_conv4"
      top: "ctx_conv4"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "ctx_conv4/relu"
      type: "ReLU"
      bottom: "ctx_conv4"
      top: "ctx_conv4"
    }
    layer {
      name: "ctx_final"
      type: "Convolution"
      bottom: "ctx_conv4"
      top: "ctx_final"
      param {
        lr_mult: 1
        decay_mult: 1
      }
      param {
        lr_mult: 2
        decay_mult: 0
      }
      convolution_param {
        num_output: 5
        bias_term: true
        pad: 1
        kernel_size: 3
        group: 1
        stride: 1
        weight_filler {
          type: "msra"
        }
        bias_filler {
          type: "constant"
          value: 0
        }
        dilation: 1
      }
    }
    layer {
      name: "ctx_final/bn"
      type: "BatchNorm"
      bottom: "ctx_final"
      top: "ctx_final"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "ctx_final/relu"
      type: "ReLU"
      bottom: "ctx_final"
      top: "ctx_final"
    }
    layer {
      name: "out_deconv_final_up2"
      type: "Deconvolution"
      bottom: "ctx_final"
      top: "out_deconv_final_up2"
      param {
        lr_mult: 0
        decay_mult: 0
      }
      convolution_param {
        num_output: 5
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 5
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "out_deconv_final_up2/bn"
      type: "BatchNorm"
      bottom: "out_deconv_final_up2"
      top: "out_deconv_final_up2"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "out_deconv_final_up2/relu"
      type: "ReLU"
      bottom: "out_deconv_final_up2"
      top: "out_deconv_final_up2"
    }
    layer {
      name: "out_deconv_final_up4"
      type: "Deconvolution"
      bottom: "out_deconv_final_up2"
      top: "out_deconv_final_up4"
      param {
        lr_mult: 0
        decay_mult: 0
      }
      convolution_param {
        num_output: 5
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 5
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "out_deconv_final_up4/bn"
      type: "BatchNorm"
      bottom: "out_deconv_final_up4"
      top: "out_deconv_final_up4"
      batch_norm_param {
        moving_average_fraction: 0.99
        eps: 0.0001
        scale_bias: true
      }
    }
    layer {
      name: "out_deconv_final_up4/relu"
      type: "ReLU"
      bottom: "out_deconv_final_up4"
      top: "out_deconv_final_up4"
    }
    layer {
      name: "out_deconv_final_up8"
      type: "Deconvolution"
      bottom: "out_deconv_final_up4"
      top: "out_deconv_final_up8"
      param {
        lr_mult: 0
        decay_mult: 0
      }
      convolution_param {
        num_output: 5
        bias_term: false
        pad: 1
        kernel_size: 4
        group: 5
        stride: 2
        weight_filler {
          type: "bilinear"
        }
      }
    }
    layer {
      name: "seg_out"
      type: "ArgMax"
      bottom: "out_deconv_final_up8"
      top: "seg_out"
      argmax_param {
        axis: 1
      }
    }
    ##############
    ## detection #
    ##############
    #layer {
    #  name: "det_conv1"
    #  type: "Convolution"
    #  bottom: "ctx_conv4"
    #  top: "det_conv1"
    #  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
    #    group: 2
    #    stride: 2
    #    weight_filler {
    #      type: "msra"
    #    }
    #    bias_filler {
    #      type: "constant"
    #      value: 0
    #    }
    #    dilation: 1
    #  }
    #}
    #layer {
    #  name: "det_conv1/bn"
    #  type: "BatchNorm"
    #  bottom: "det_conv1"
    #  top: "det_conv1"
    #  batch_norm_param {
    #    moving_average_fraction: 0.99
    #    eps: 0.0001
    #    scale_bias: true
    #  }
    #}
    #layer {
    #  name: "det_conv1/relu"
    #  type: "ReLU"
    #  bottom: "det_conv1"
    #  top: "det_conv1"
    #}
    #layer {
    #  name: "det_conv2"
    #  type: "Convolution"
    #  bottom: "det_conv1"
    #  top: "det_conv2"
    #  param {
    #    lr_mult: 1
    #    decay_mult: 1
    #  }
    #  param {
    #    lr_mult: 2
    #    decay_mult: 0
    #  }
    #  convolution_param {
    #    num_output: 512
    #    bias_term: true
    #    pad: 2
    #    kernel_size: 5
    #    group: 8
    #    stride: 2
    #    weight_filler {
    #      type: "msra"
    #    }
    #    bias_filler {
    #      type: "constant"
    #      value: 0
    #    }
    #    dilation: 1
    #  }
    #}
    #layer {
    #  name: "det_conv2/bn"
    #  type: "BatchNorm"
    #  bottom: "det_conv2"
    #  top: "det_conv2"
    #  batch_norm_param {
    #    moving_average_fraction: 0.99
    #    eps: 0.0001
    #    scale_bias: true
    #  }
    #}
    #layer {
    #  name: "det_conv2/relu"
    #  type: "ReLU"
    #  bottom: "det_conv2"
    #  top: "det_conv2"
    #}
    #layer {
    #  name: "det_concat"
    #  type: "Concat"
    #  bottom: "res5a_branch2b"
    #  bottom: "det_conv2"
    #  top: "det_concat"
    #}
    #layer {
    #  name: "det_conv_final"
    #  type: "Convolution"
    #  bottom: "det_concat"
    #  top: "det_conv_final"
    #  param {
    #    lr_mult: 1
    #    decay_mult: 1
    #  }
    #  param {
    #    lr_mult: 2
    #    decay_mult: 0
    #  }
    #  convolution_param {
    #    num_output: 40
    ## num_anchors * (xywho + num_classes)
    #    bias_term: true
    #    pad: 0
    #    kernel_size: 1
    #    group: 1
    #    stride: 1
    #    weight_filler {
    #      type: "msra"
    #    }
    #    bias_filler {
    #      type: "constant"
    #      value: 0
    #    }
    #    dilation: 1
    #  }
    #}
    #layer {
    #  name: "det_out"
    #  type: "Yolo2"
    #  bottom: "det_conv_final"
    #  top: "det_out"
    #  yolo_param {
    #    anchor { w: 1.0 h: 1.0 }
    #    anchor { w: 2.0 h: 2.0 }
    #    anchor { w: 4.0 h: 4.0 }
    #    anchor { w: 8.0 h: 8.0 }
    #    anchor { w: 12.0 h: 12.0 }
    #    label_offset: 0
    #    num_classes: 3
    #    width_scale: 512
    #    height_scale: 288
    #  }
    #}
    

  • Also, some images showing what we're seeing. This is the first frame, which took 20 minutes to render.

    This is an image of the provided avp_tidl demo, swapping out the provided onnx model with our own. The config file was modified to point to our own converted model and the variable pc_size modified to 512 288.

  • Hi,

    Instructions for running TIDL standalone using CCS are given here: tidl_j7_01_00_00_00/ti_dl/docs/user_guide_html/md_tidl_sample_test.html.

    I had attached the modified deploy.prototxt in thread https://e2e.ti.com/support/j721e/f/1026/t/848577 (please see reply on 6th Nov)

    Regards,

    Rishabh

  • Yes... those are the instructions I was following when I got the error I shared yesterday:

    C71X_0: Trouble Reading Memory Block at 0x0 on Page 0 of Length 0x1: (Error -1344 - (0:0:0)) Register or Memory request has failed due to a Transaction Error. This may be the result of reading from a write only register, writing to a read only register, or accessing a memory location that is not assigned. No user action required. (Emulation package 8.3.1.00007)

    C71X_0: Trouble Reading Memory Block at 0x707e8e42 on Page 0 of Length 0x1: (Error -1350 - (0:0:0)) Register or Memory request has timed out. The CPU is executing a High Priority Interrupt, this is typically due to a Double Page Fault. Choose 'Force' to force the CPU into a state that allows debug of why the HPI is active. (Emulation package 8.3.1.00007)

    More specifically, I am getting this error at step 6 below:

    Steps to run Sample Application on EVM

    1. Copy the "testvecs" folder in to the memory card. Create a empty "trace" folder in memory card if you are enabling writeTraceLevel.
    2. Follow the steps mentioned in SDK Vision Apps documentation to setup the CCS + GELS + CCXML files to bringup/connect EVM.
    3. Insert the memory car in to EVM
    4. Start the CCS and Launch target configuration for the EVM
    5. Run the script for running the sciclient available in PDK "packages\ti\drv\sciclient\tools\ccsLoadDmsc\j721e\launch.js"
    6. Run the TIDL Launch script"ti_dl\utils\targetTest\launch_tidl.js" to run the Sample application. This will stop the C7x core on a break-point. Press the run to continue the execution.
    7. At the end of execution take out the memory card from EVM and compare the results with reference. One can also set writeOutput = 0 to compare the results against a reference instead of file write.

     

  • Hi Ying,

    Is your board set to NO BOOT mode?

    Regards,

    Rishabh

  • I believe so, here's a picture of the DIP switches:

  • Hi Ying,

    Dip switches are set correctly.

    I had installed CSP and emulator package to match the one you are using after looking at yesterday's response and it worked fine for me.

    Can you try after restarting CCS and emulator?

    Regards,

    Rishabh

  • In any case, it sounds like the model we are trying to run is not quite within the realm that the SDK was tested for. I will discuss with our model experts about training a model from the list here: tidl_j7_01_00_00_00/ti_dl/docs/user_guide_html/md_tidl_performance.html

  • OK, so I've tried importing the model you attached here:

    https://github.com/tidsp/caffe-jacinto-models/tree/caffe-0.17/trained/image_segmentation/cityscapes5_jsegnet21v2/sparse

    Running this model on the tidl_avp demo gives.... better results, but is still quite slow. The attached image took about 7 minutes to render. I will try the JTAG profiler again tomorrow to see if I can get you some performance numbers.



    I've also made sure to use the deploy.prototxt that you shared, and not the one in the github folder.

    Here are the contents of my tidl_import.txt:

    modelType          = 0
    inputNetFile       = "cityscapes5_jsegnet21v2/deploy.prototxt"
    inputParamsFile    = "cityscapes5_jsegnet21v2/cityscapes5_jsegnet21v2_iter_60000.caffemodel"
    outputNetFile      = "cityscapes5_jsegnet21v2/output/tidlNetwork.bin"
    outputParamsFile   = "cityscapes5_jsegnet21v2/output/tidlIO_"
    numParamBits = 8
    numFeatureBits = 8
    inElementType = 0
    inWidth = 768
    inHeight = 384
    inNumChannels = 3
    inDataFormat = 0
    
    #Quantization
    inFileFormat = 2
    inData = cityscapes5_jsegnet21v2/calib_list.txt
    tidlStatsTool = ../../test/tidl_quant_stats_tool.out
    
    # Performance Simulation
    perfSimConfig = ../../test/testvecs/config/import/perfsim_base.cfg
    perfSimTool = ../../utils/perfsim/ti_cnnperfsim.out

  • Hi Ying,

    I am attaching the import and infer files that I had used

    modelType          = 0
    inputNetFile       = "../../test/testvecs/models/public/caffe/jsegNet21v2/deploy.prototxt"
    inputParamsFile    = "../../test/testvecs/models/public/caffe/jsegNet21v2/deploy.caffemodel"
    outputNetFile      = "../../test/testvecs/config/tidl_models/caffe/tidl_net_jSegNet21v2_1024x512.bin"
    outputParamsFile   = "../../test/testvecs/config/tidl_models/caffe/tidl_io_jSegNet21v2_1024x512_"
    inDataFormat = 0
    perfSimConfig = ../../test/testvecs/config/import/perfsim_base.cfg
    inData  =   "../../test/testvecs/config/segmentation_list.txt"
    postProcType = 3
    foldMaxPoolInConv2D = 0
    
    inFileFormat    = 2
    postProcType = 3
    padInBuffInTB = 1
    netBinFile      = "testvecs/config/tidl_models/caffe/tidl_net_jSegNet21v2_1024x512.bin"
    ioConfigFile    = "testvecs/config/tidl_models/caffe/tidl_io_jSegNet21v2_1024x512_1.bin"
    outData =   "testvecs/output/jsegNet21v2_1024x512.bin"
    inData  =   "testvecs/config/segmentation_list.txt"
    totNumClasses = 5
    debugTraceLevel = 0
    writeTraceLevel = 0
    
    
    
    
    
    

    Regards,

    Rishabh

  • The output that I got is also given below:

    Regards,

    Rishabh

  • Hi Rishabh,

    Excellent progress!! I've imported with your settings and was able to confirm real-time performance.

    Experimenting with the differences between our import.txt files, it looks like the "inWidth" and "inHeight" parameters are causing the severe slow-down. 

    Not sure what you guys will want to do with this information, but we can probably work with this for now by using resize nodes to preprocess images into "native" inference resolution.

    Thanks so much for your patience Rishabh - much appreciated.

    -Ying

  • Hi Ying,

    Glad that your issue is resolved.

    We have multiple publicly available networks running at different resolutions with real time performance.

    You can look at the TIDL data sheet (part of user guide) to see those numbers.

    We will be further optimizing TIDL performance in subsequent releases.

    Regards,

    Rishabh

  • Hi Ying,

    Can you please share the final performance numbers that you were able to achieve with this network.

    Regards,

    Rishabh

  • I have a lot of debugging left to do on my custom graph, but the TIDL node seems to be running at about 45 ms per frame (~22 fps)

  • Hi Ying,

    Ok , thanks for sharing this information.

    Regards,

    Rishabh