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.

TDA4VH-Q1: TIDL Node Initialization Issue with MiDaS ONNX Model

Part Number: TDA4VH-Q1
Other Parts Discussed in Thread: MIDAS

We are trying to run the MiDaS midas_v21_small_256.onnx model using the TIDL/OpenVX pipeline on the J784S4 EVM.

Steps we followed:

  1. Exported the MiDaS model to ONNX with input_names=["input"] and output_names=["depth"].

  2. Generated the TIDL artifacts using edgeai-tidl-tools.

  3. Updated app_init() to remove display/mosaic/graphics and set input as vx_tensor.

Issue:

During graph verification, the TIDL node fails to initialize:

VX_ZONE_ERROR: [ownNodeKernelInit:704] Target kernel, TIVX_CMD_NODE_CREATE failed for node midas_tidl_obj
VX_ZONE_ERROR: [MidasOpenVxGraph] Node kernel init failed
  • Hi Akshay,

    Is this the only log? Can you please share the complete log? Difficult to figure out error from just these two lines. 

    Also is it possible to run this model in tidl-rt flow? Since you are compiling it using edge-ai-tools, is there any layer offloaded to ARM? 

    Regards,

    Brijesh

  • Hi I have shared the entire log for reference 
    the below is the log 
    APP: Init ... !!!
    6812.077780 s: MEM: Init ... !!!
    6812.077837 s: MEM: Initialized DMA HEAP (fd=5) !!!
    6812.077976 s: MEM: Init ... Done !!!
    6812.077984 s: IPC: Init ... !!!
    6812.105129 s: IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
    6812.113024 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    6812.113094 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_ERROR
    6812.113098 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_WARNING
    6812.113101 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_INFO
    6812.113979 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-0
    6812.114080 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-1
    6812.114161 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-2
    6812.114247 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-3
    6812.114252 s: VX_ZONE_INFO: [tivxInitLocal:202] Initialization Done !!!
    6812.114257 s: VX_ZONE_INFO: Globally Disabled VX_ZONE_INFO
    [DEBUG PRINT] vxCreateContext SUCCESS
    obj->input.width = 1920, obj->input.height = 1080
    [DEBUG PRINT] vxCreateImage (Input RGB) SUCCESS
    [DEBUG PRINT] app_init_scaler SUCCESS
    [DEBUG PRINT] app_init_tidl SUCCESS
    [DEBUG PRINT] app_update_pre_proc SUCCESS
    [DEBUG PRINT] app_init_pre_proc SUCCESS
    [DEBUG PRINT] app_update_post_proc SUCCESS
    [DEBUG PRINT] app_init_post_proc SUCCESS
    [DEBUG PRINT] vxCreateGraph SUCCESS
    [DEBUG PRINT] vxSetReferenceName SUCCESS
    [DEBUG PRINT] app_create_graph_scaler SUCCESS
    [DEBUG PRINT] app_create_graph_pre_proc SUCCESS
    [DEBUG PRINT] app_create_graph_tidl SUCCESS
    [DEBUG PRINT] app_create_graph_post_proc SUCCESS
    [DEBUG PRINT] add_graph_parameter_by_node_index (Scaler input) SUCCESS
    [DEBUG PRINT] vxSetGraphScheduleConfig SUCCESS
    [DEBUG PRINT] tivxSetGraphPipelineDepth SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (Scaler 1) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (Scaler 2) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (PreProc) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (TIDL) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (PostProc) SUCCESS
    [DEBUG PRINT] appCreate Graph Done
    6812.423508 s: VX_ZONE_ERROR: [ownContextSendCmd:1001] Command ack message returned failure cmd_status: -1
    6812.423516 s: VX_ZONE_ERROR: [ownNodeKernelInit:704] Target kernel, TIVX_CMD_NODE_CREATE failed for node tidl_node
    6812.423519 s: VX_ZONE_ERROR: [ownNodeKernelInit:705] Please be sure the target callbacks have been registered for this core
    6812.423522 s: VX_ZONE_ERROR: [ownNodeKernelInit:706] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
    6812.423526 s: VX_ZONE_ERROR: [ownGraphNodeKernelInit:793] kernel init for node 2, kernel com.ti.tidl:1:1 ... failed !!!
    6812.423548 s: VX_ZONE_ERROR: [ OpenVxGraph ] Node kernel init failed
    6812.423551 s: VX_ZONE_ERROR: [ OpenVxGraph ] Graph verify failed
    MSC: Node send command failed!
    [DEBUG PRINT] app_verify_graph FAILED
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    6812.565547 s: IPC: Deinit ... !!!
    6812.566463 s: IPC: DeInit ... Done !!!
    6812.566472 s: MEM: Deinit ... !!!
    6812.566550 s: DDR_SHARED_MEM: Alloc's: 26 alloc's of 228518488 bytes
    6812.566553 s: DDR_SHARED_MEM: Free's : 26 free's of 228518488 bytes
    6812.566556 s: DDR_SHARED_MEM: Open's : 0 allocs of 0 bytes
    6812.566564 s: MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!



    Model is having 199 layers and all are running on the C7x . I am yet to try tidl-rt . 

  • Hi,

    But this does not have any error from C7x, are you running vision_apps_init.sh script to get the logs from other cores? Also how are sure that all layers are supported in the C7x? Have you checked and verified in model artifacts generated after compilation? 

    Regards,

    Brijesh

  •  Hi I am running onnxrt_ep.py with -c I am seeing that all layers are running on C7x  and I have shared the logs after vision_apps_init.sh run 
    root@j784s4-evm:/home/fastsim-1# ./vx_app_tidl_midas.out --cfg app_midas.cfg
    APP: Init ... !!!
    944.675571 s: MEM: Init ... !!!
    944.675641 s: MEM: Initialized DMA HEAP (fd=5) !!!
    944.675819 s: MEM: Init ... Done !!!
    944.675836 s: IPC: Init ... !!!
    944.704868 s: IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
    944.712316 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    944.712411 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_ERROR
    944.712425 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_WARNING
    944.712436 s: VX_ZONE_INFO: Globally Enabled VX_ZONE_INFO
    944.713458 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-0
    944.713610 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-1
    944.713728 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-2
    944.713883 s: VX_ZONE_INFO: [tivxPlatformCreateTargetId:169] Added target MPU-3
    944.713898 s: VX_ZONE_INFO: [tivxInitLocal:202] Initialization Done !!!
    944.713915 s: VX_ZONE_INFO: Globally Disabled VX_ZONE_INFO
    [DEBUG PRINT] vxCreateContext SUCCESS
    obj->input.width = 1920, obj->input.height = 1080
    [DEBUG PRINT] vxCreateImage (Input RGB) SUCCESS
    [DEBUG PRINT] app_init_scaler SUCCESS
    [DEBUG PRINT] app_init_tidl SUCCESS
    [DEBUG PRINT] app_update_pre_proc SUCCESS
    [DEBUG PRINT] app_init_pre_proc SUCCESS
    [DEBUG PRINT] app_update_post_proc SUCCESS
    [DEBUG PRINT] app_init_post_proc SUCCESS
    [DEBUG PRINT] vxCreateGraph SUCCESS
    [DEBUG PRINT] vxSetReferenceName SUCCESS
    [DEBUG PRINT] app_create_graph_scaler SUCCESS
    [DEBUG PRINT] app_create_graph_pre_proc SUCCESS
    [DEBUG PRINT] app_create_graph_tidl SUCCESS
    [DEBUG PRINT] app_create_graph_post_proc SUCCESS
    [DEBUG PRINT] add_graph_parameter_by_node_index (Scaler input) SUCCESS
    [DEBUG PRINT] vxSetGraphScheduleConfig SUCCESS
    [DEBUG PRINT] tivxSetGraphPipelineDepth SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (Scaler 1) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (Scaler 2) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (PreProc) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (TIDL) SUCCESS
    [DEBUG PRINT] tivxSetNodeParameterNumBufByIndex (PostProc) SUCCESS
    [DEBUG PRINT] appCreate Graph Done
    945.054603 s: VX_ZONE_ERROR: [ownContextSendCmd:1001] Command ack message returned failure cmd_status: -1
    945.054629 s: VX_ZONE_ERROR: [ownNodeKernelInit:704] Target kernel, TIVX_CMD_NODE_CREATE failed for node tidl_node
    945.054641 s: VX_ZONE_ERROR: [ownNodeKernelInit:705] Please be sure the target callbacks have been registered for this core
    945.054653 s: VX_ZONE_ERROR: [ownNodeKernelInit:706] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
    945.054669 s: VX_ZONE_ERROR: [ownGraphNodeKernelInit:793] kernel init for node 2, kernel com.ti.tidl:1:1 ... failed !!!
    945.054698 s: VX_ZONE_ERROR: [ OpenVxGraph ] Node kernel init failed
    945.054709 s: VX_ZONE_ERROR: [ OpenVxGraph ] Graph verify failed
    MSC: Node send command failed!
    [C7x_1 ] 945.054440 s: VX_ZONE_ERROR: [tivxAlgiVisionCreate:363] Calling ialg.algAlloc failed with status = -1
    [C7x_1 ] 945.054470 s: VX_ZONE_ERROR: [tivxKernelTIDLCreate:1140] tivxAlgiVisionCreate returned NULL
    [DEBUG PRINT] app_verify_graph FAILED
    APP: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... !!!
    REMOTE_SERVICE: Deinit ... Done !!!
    945.197145 s: IPC: Deinit ... !!!
    945.198397 s: IPC: DeInit ... Done !!!
    945.198430 s: MEM: Deinit ... !!!
    945.198512 s: DDR_SHARED_MEM: Alloc's: 26 alloc's of 228518488 bytes
    945.198526 s: DDR_SHARED_MEM: Free's : 26 free's of 228518488 bytes
    945.198532 s: DDR_SHARED_MEM: Open's : 0 allocs of 0 bytes
    945.198548 s: MEM: Deinit ... Done !!!
    APP: Deinit ... Done !!!
    root@j784s4-evm:/home/fastsim-1#

  • Hi,

    Are you still looking for enabling MiDAS model on TDA4 platform? Then can you please share this model? 

    Regards,

    Brijesh