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.

TDA4VM: [TIDL] importing inception_optimize.pb to inceptionv1.bin error

Part Number: TDA4VM

Hi TI

I have genera the final inception.pb,and if not set TIDL_TEST_CUSTOM_LAYER=1 ,it's import  and  running in PC simulation success.

actually I want to run the  demo of custom layer.

but when set TIDL_TEST_CUSTOM_LAYER=1 ,it's failed.the log as below:

TF Model (Proto) File : ../../test/testvecs/models/public/tensorflow/inceptionNetv1/inceptionv1_optimize.pb
TIDL Network File : ../../test/testvecs/config/tidl_models/tensorflow/inceptionNetv1/tidl_net_inception_v1.bin
TIDL IO Info File : ../../test/testvecs/config/tidl_models/tensorflow/inceptionNetv1/tidl_io_inception_v1_

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~

Processing config file #0 : /home/super/psdk_rtos_auto_j7_06_01_01_12/tidl_j7_01_00_01_00/ti_dl/utils/tidlModelImport/tempDir/qunat_stats_config.txt
----------------------- TIDL Process with REF_ONLY FLOW ------------------------

# 0 . ..Segmentation fault (core dumped)

------------------ Network Compiler Traces -----------------------------
Main iteration numer: 0....
Preparing for memory allocation : internal iteration number: 0
successful Memory allocation

-------------------- Network Compiler : Analysis Results are available --------------------


ERROR : [TIDL_E_QUANT_STATS_NOT_AVAILABLE] tidl_quant_stats_tool.out fails to collect dynamic range. Please look into quant stats log. This model will get fault on target.
****************************************************
** 0 WARNINGS 1 ERRORS **
****************************************************

  • after re make the tidl_quant_stats_tool.out,it's work

  • Hi Nigel,

    thanks for updating the thread, please let me know if you face any further issues.

    Regards,

    Yordan

  • Hi Yordan

    I have anoher question。

    now I‘m running the custom layer sample ---- inceptionV1

    it's rewrite the maxPooling, but  the result is different from  the mode of all layer on TIDL

    the log is below:

    all  tidl

    Processing config file #0 : testvecs/config/infer/public/tensorflow/tidl_infer_inceptionNetv1_alltidl.txt
    ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

    # 0 . .. T 1112.90 ... A : 896, 1.0000, 1.0000, 896 .... .....

          maxpooling to custom layer 

    Processing config file #0 : testvecs/config/infer/public/tensorflow/tidl_infer_inceptionNetv1.txt
    ----------------------- TIDL Process with REF_ONLY FLOW ------------------------

    T 1126.50 ... A : 896, 0.0000, 0.0000, 0 .... .....


  • Hi Nigel,

    What is the release version that you are using?

    Regards,

    Rishabh

  • Hi Rishabh

    my sdk version is psdk_rtos_auto_j7_06_01_01_12

    BR.

    Nigel

  • Hi Nigel,

    Can you try the latest SDK release and see if you face the same issue: http://software-dl.ti.com/jacinto7/esd/processor-sdk-rtos-jacinto7/latest/index_FDS.html

    Regards,

    Rishabh

  • Hi Rishabh

    our product is base on this version, so if you have a J7-board in your hand,please verify this case, I’m not sure if it is caused by other reasons .

    even though the result was right when  none-custom-layer. thanks.

    BR.

    Nigel.

  • Hi Nigel,

    Can you please mention the build steps that you followed after setting TIDL_TEST_CUSTOM_LAYER=1

    Regards,

    Rishabh

  • Hi Rishabh,

    1、set  TIDL_TEST_CUSTOM_LAYER=1   

                 TARGET_PLATFORM ?= TI_DEVICE

    2、in ti_dl/utils/tidlModelImport: make      //then generate  tidl_model_import.out  success

    3、./out/tidl_model_import.out ../../test/testvecs/config/import/public/tensorflow/tidl_import_inceptionNetv1.txt     //then generate  .bin  success

    4、in ti_dl/custom  :make RUN_REF_FOR_STATS=1   

                                      make

    5、in  ti_dl/test :   make RUN_REF_FOR_STATS=1  TARGET_PLATFORM=PC    //then  generate tidl_quant_stats_tool.out success

                                   make         //then  generate TI_DEVICE_dsp_test_dl_algo.out success

    6、connect J7-board and CCS,follow  the step of 

    "processor-sdk-rtos-jacinto7/latest/exports/docs/tidl_j7_01_01_00_10/ti_dl/docs/user_guide_html/md_tidl_sample_test.html "

  • Hi Nigel,

    Thanks for sharing the steps. There seems to be an issue with custom lib generation for QS tool as you have not built it for PC.

    Can you please try below steps and first validate custom layer in Host Emulation Mode:

    • Set TIDL_TEST_CUSTOM_LAYER to 1 in ti_dl/makerules/config.mk
      • This step will enable custom layer example for Max Pooling. Please note that this should be done only for tensorflow inceptionNetV1.
    • Run “make” from “ti_dl/utils/tidlModelImport” folder to build Import tool for PC
      • This step will generate binary (./tidl_model_import.out) in "ti_dl/utils/tidlModelImport/out"
    • Run "make RUN_REF_FOR_STATS=1 TARGET_PLATFORM=PC” from "ti_dl/custom" folder to build custom library for QS tool - This step will generate library (libtidl_custom.a) in "ti_dl/lib/PC/dsp/qs/release" * Run "make” from "ti_dl/custom" folder to build custom algo library
      • This step will generate library (libtidl_custom.a) in "ti_dl/lib/PC/dsp/algo/release"
    • Run "make RUN_REF_FOR_STATS=1 TARGET_PLATFORM=PC" from "ti_dl/test" folder to re-build qs tool
      • This step will generate binary (./tidl_quant_stats_tool.out) in "ti_dl/test"
    • Run "make" from “ti_dl/test” folder to build the test bench for PC
      • - This Step will generate binary (./PC_dsp_test_dl_algo.out) in "ti_dl/test"

    Regards,

    Rishabh

  • Hi Rishabh,

           in step 5, I have generate the QS tool (tidl_quant_stats_tool.out),

           actually, I'm just follow these steps you mention and all step are success.

    BR.

    Nigel

  • Hi Nigel,

    As I mentioned "There seems to be an issue with custom lib generation for QS tool as you have not built it for PC".

    You did "make RUN_REF_FOR_STATS=1" in step 4 instead of "make RUN_REF_FOR_STATS=1 TARGET_PLATFORM=PC".

    Regards,

    Rishabh

  • Hi Rishabh

         I have run the command "make RUN_REF_FOR_STATS=1"   when  TARGET_PLATFORM ?= PC     in  config.mk.

    BR.

    Nigel

  • Hi Rishabh,

    as you suggested.I have update my sdk to the  latest SDK(psdk_rtos_auto_j7_06_02_00_21).

    but happen error when generate "PC_dsp_test_dl_algo.out"。the "TI_DEVICE_dsp_test_dl_algo.out" can be generate success.

    my steps is as below:

    1、cinfigure the third dependces (opencv-3.1.0、protobuf-3.5.1 、flatbuffers-1.11.0) and modify path in the config.mk

    2、Run “make” from “ti_dl/utils/tidlModelGraphviz” folder.  generate .out success

    3、Run “make” from “ti_dl/utils/tidlModelImport” folder. and import a  mobilenetV2.caffemodel success .

    4、Run "make  TARGET_PLATFORM=PC"  to rebuild “PC_dsp_test_dl_algo.out”  but show err log

    compiling ../../common/ti_draw_utils.c
    compiling ../../common/ti_file_io.c
    compiling ../../common/ti_mem_manager.c
    /usr/bin/ld: cannot find -l:dmautils.lib
    /usr/bin/ld: cannot find -l:udma.lib
    /usr/bin/ld: cannot find -l:sciclient.lib
    /usr/bin/ld: cannot find -l:ti.csl.lib
    /usr/bin/ld: cannot find -l:ti.osal.lib
    collect2: error: ld returned 1 exit status
    /home/super/psdk_rtos_auto_j7_06_02_00_21/tidl_j7_01_01_00_10/makerules/rules.mk:641: recipe for target 'outfile' failed
    make: *** [outfile] Error 1

    how can I resolve this problem.tks

    BR.

    Nigel

  • Hi Nigel,

    I am closing this thread as issue is directly supported by TI FAE.

    Regards,

    Rishabh