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.

AM62A7: Problems to convert Yolo V8 and V11 Nano TfLite to TIDL

Part Number: AM62A7

Tool/software:

I have an AM62A EVK board that I was trying to use to execute the Yolo V8 and V11 models.

Using the edge-ai-tools repository (tag 10_01_04_00), I managed to convert the TI example models listed here:

https://github.com/TexasInstruments/edgeai-tidl-tools/blob/10_01_04_00/examples/osrt_python/model_configs.py#L277

Using the "tflrt_delegate.py", I tried to convert a Yolo V8/11 Nano model, which was successful; however, I noticed that the conversion had this message:

- For YoloV8 Nano:

[TIDL Import] [PARSER] UNSUPPORTED: All the tensor dimensions has to be greater then zero. For tensor model_10/tf.math.multiply_242/Mul/y_6, id 1 - Dim 4 is 0 -- [tidl_import_common_model_ch
eck.cpp, 2303]
[TIDL Import] [PARSER] WARNING:
********************************************************************
* Network compiler returned with error or didn't executed *
* This model can only be used on PC/Host emulation mode *
* It is not expected to work on target/EVM *
********************************************************************

- For YoloV11 Nano:

[TIDL Import] [PARSER] UNSUPPORTED: All the tensor dimensions has to be greater then zero. For tensor model_23/tf.math.multiply_340/Mul/y_6, id 1 - Dim 4 is 0 -- [tidl_import_common_model_ch
eck.cpp, 2303]
[TIDL Import] [PARSER] WARNING:
********************************************************************
* Network compiler returned with error or didn't executed *
* This model can only be used on PC/Host emulation mode *
* It is not expected to work on target/EVM *
********************************************************************

And I noticed that the output folder didn't have the "allowedNode.txt".

Is it expected to these models to work with your TfLite Delegate?

  • Hello Caio,

    Using the edge-ai-tools repository (tag 10_01_04_00), I managed to convert the TI example models listed here:

    Sounds like your tools are correctly setup and working well on TI-validated models

    * Network compiler returned with error or didn't executed *
    * This model can only be used on PC/Host emulation mode *
    * It is not expected to work on target/EVM *

    Model import did not complete, so the resulting artifacts are not expected to work as-is. This log tells me that import was not successful

    The unsupported layers should have been labelled for Arm/CPU execution, rather than the C7x accelerator. However, the Network Compiler / Memory Planner (final stage of overall model import) errored out. It's not clear if these two things are linked or not, but having zeroes for dimensions is certainly not typical. I would suggest investigating this 

    • If a dimension is not being used, it should be "Squeeze"d out rather than using a zero 
    • If you're comfortable doing so, it would help to share the model file (weights may be randomized too) 

    The logs here look trimmed -- can you provide the full log? We may want to increase the debugging verbosity by setting the debug_level parameter to 1 or 2. If you are using edgeai-tidl-tools, you can set this globally in examples/osrt_python/common_utils.py. 

    I will note that we can import YOLOv8, but I'm unsure if we support YOLOv11 OD head. We have validated this for ONNX-format

    BR,
    Reese

  • Thanks for the reply.

    I have updated edge-ai-tools to the tag "11_00_07_00" and tested again on some of your reference models to validate my setup.

    I'm getting a similar error as before:

    "

    [TIDL Import] [PARSER] UNSUPPORTED: All the input tensor dimensions has to be greater then zero. For tensor model_10/8669, id 3 - Dim 3 is -1 -- [tidl_import_common_model_check.cpp, 2304]
    [TIDL Import] ERROR: Invalid input tensor dimension, aborting -- [tidl_import_core.cpp, 2747]
    [TIDL Import] ERROR: Network Optimization failed - Failed in function: TIDL_runtimesOptimizeNet -- [tidl_runtimes_import_common.cpp, 1392]

    "

    Check the full logs with debug level 2 and the YoloV8 Nano TfLite file:

    https://drive.google.com/drive/folders/18SJAOFC1qVTOygIgnGvnHycA262l5SfS?usp=drive_link

    ---

    Let me know if I should roll back to 10_01_04_00, but as far as I could see, the tag 11_00_07_00 should be supported by AM62A EVK as well.

  • Hi Caio,

    My apologies, I must give only a quick response for now since it is July 4th holiday in the US and I will be out of office for several days. I will respond back with more detail in the middle of next week. 

    My short-term suggestion would be to try using the 'deny_list' feature [0] on this specific layer(s) that is giving issues. It seems that the dimensions some layers are causing issues (noted that the offending layer now is different from your previous logs)

    me know if I should roll back to 10_01_04_00, but as far as I could see, the tag 11_00_07_00 should be supported by AM62A EVK as wel

    This new release should be fine. AM62A did not have a full 11.0 SDK release, but odd-numbered bugfix releases (e.g. 07) are compatible with the previous SDK. 11_00_07_00 is suitable for AM62A with SDK 10.1, although you will need to run a script [1] on the EVM to update a few libraries/firmwares to be compatible with this updated release. 

    [0]https://github.com/TexasInstruments/edgeai-tidl-tools/tree/master/examples/osrt_python#options-to-enable-control-on-layer-level-delegation-to-ti-dsparm 

    [1] https://github.com/TexasInstruments/edgeai-tidl-tools/blob/master/update_target.sh 

    BR,
    Reese

  • Hi Caio,

    I'm looking at your network and the logs you shared. It looks like there are multiple subgraphs due to unsupported layer configurations [0]. The cause of the error is not immediately obvious from the logs but I have a feeling some of the networks' dimensions were not parsed correctly.

    Yours seem to fail in the second subgraph (title subgraph_389, which should correspond to some named files within the model-artifacts/yolov8n_160/artifacts/tempDir path). I would like to see the SVG files within that tempDir. I wonder if some of the tensor-dimensions are incorrectly parsed -- you can see these tensor shapes if you open the SVG

    • Relevant doc for graph visualization [1] 

    [0] https://github.com/TexasInstruments/edgeai-tidl-tools/blob/11_00_07_00/docs/supported_ops_rts_versions.md

    [1]https://github.com/TexasInstruments/edgeai-tidl-tools/blob/master/docs/tidl_osr_debug.md#graph-visualization 

    BR,
    Reese