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.

PROCESSOR-SDK-J784S4: Issue Compiling ONNX Model with Custom-Built TIDL Tools

Part Number: PROCESSOR-SDK-J784S4
Other Parts Discussed in Thread: AM69A

Tool/software:

Hello,

I am using edgeai-tidl version 10_00_08_00 which is compatible with my J784S4 RTOS SDK  version 10.00.00.05 as shown in version_compatibility_table.md

I have an ONNX model that I want to compile using the TIDL tools.

  • when using prebuilt tidl_tools ( downloaded via this command /home/root/edgeai-tidl-tools/scripts/get-tidl-tools.sh am69a ) the model compiles successfully, and I can run it on the J784S4 EVM without issues.
  • When I build tidl_tools from source using the sdk and integrating the output libs in edgeai, the compilation of the model shows an error.
    here are the steps that I followed:

    • build tidl_tools (without changes)
      • ./sdk_builder/scripts/setup_psdk_rtos.sh --install_tidl_deps
      • cd sdk_builder
      • make tidl_pc_tools -j
    • integration of the output libs: I extracted the generated tidl_tools.tar.gz into edgeai-tidl-tools/tidl_tools
  • This is the error that I have:

*******  TIDL_subgraphRtInvoke done  ******** 
In TIDL_onnxRtImportInit subgraph_name=subgraph_11
Layer 0, subgraph id subgraph_11, name=/model/od_grid/Polar2VCS_0/_Patch_polar2VCS_conversion_m/Cast_1_output_0
Layer 1, subgraph id subgraph_11, name=/model/od_grid/Polar2VCS_0/_Patch_polar2VCS_conversion_m/Div_1_output_0
ERROR : ONNX RT data type : 9 not supported by TIDL
[TIDL Import] [PARSER] ERROR: Onnx RT import failed - Failed in function: TIDL_computeImportFunc -- [tidl_onnxRtImport_EP.cpp, 1433]
2025-04-22 09:55:47.259898796 [E:onnxruntime:, sequential_executor.cc:494 ExecuteKernel] Non-zero status code returned while running TIDL_11 node. Name:'TIDLExecutionProvider_TIDL_11_11' Status Message: TIDL Compute Import Failed.
Traceback (most recent call last):
  File "/home/root/scripts/run_model.py", line 101, in <module>
    result = session.run(OUTPUTS_NAME, dummy_data) #calibration_data[i])
  File "/usr/local/lib/python3.10/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py", line 200, in run
    return self._sess.run(output_names, input_feed, run_options)
onnxruntime.capi.onnxruntime_pybind11_state.Fail: [ONNXRuntimeError] : 1 : FAIL : Non-zero status code returned while running TIDL_11 node. Name:'TIDLExecutionProvider_TIDL_11_11' Status Message: TIDL Compute Import Failed.

PS: I have done the same thing using J721e SDK 10.00.00.05 and the model compilation was successful.

Can you please help me figure out what is the problem? 

Are there any known differences between TIDL for J721E and J784S4 that might affect compilation?

And what is the difference between pre-built tidl-tools and the generated one for J784S40?

Thank you.

  • Hi Ghassen,

    There are many things that could affect compilation. Could you share your model and configurations so I could better see what the issue might be? One is the make sure correct device configuration is set in the device_config in the following section

    ID for a Device, TDA4VMID = 0, TIDL_TDA4AEP = 1, TIDL_TDA4AM = 2, TIDL_TDA4AMPlus = 3
    DEVICE_NAME = 2

    In your case, J721E would have DEVICE_NAME = 1 and J784S4 would be DEVICE_NAME = 3

    What are you referring to when stating " generate " here 

    And what is the difference between pre-built tidl-tools and the generated one for J784S40

    Are you referring to the image vs github?

     

    Warm regards,

    Christina

  • Hello Christina,

    Thank you for your reply.

    What are you referring to when stating " generate " here

    After building c7x-mma-tidl in J784s4 RTOS SDK (using this command make tidl_pc_tools -j), I take the generated files from c7x-mma-tidl/tidl_tools.

    I'm using the default configuration in the SDK to build it.

    I tried to change DEVICE_NAME to 3 (in c7x-mma-tidl/tidl_tools/device_config.cfg)  but still I have the same error.

    Do you have any other suggestion?

  • Hi Ghassen,

    I am not sure what else could be an issue without looking at the model & configs. However, you should try to do it in a docker environment so no other dependencies effect it. 

    Warm regards,

    Christina