Tool/software:
Hello,
Recently, I have updated my board to SDK 10.00.00.08, and I have updated my Docker container accordingly from edgeai-tidl-tools
I can compile and run ResNet-18 and MobileNetV2 on my TDA4 board without any issues.
I can also compile deit_tiny_patch16_224 and some other transformer model, but that compile artifact does not work on the board.
I am following this example (as starting point) from your official repository - DeiT Transformer Example
I am running following GStreamer pipeline to run the artifacts
gst-launch-1.0 -v videotestsrc num-buffers=-1 pattern=ball is-live=false ! \ video/x-raw,height=224,width=224,format=RGB ! \ tidlpreproc ! tidlinferer model=../models/deit_tiny_patch16_224 ! \ fpsdisplaysink text-overlay=0 video-sink=fakesink sync=false
I am getting following error on my TDA4
libtidl_onnxrt_EP loaded 0x20ae18c0
Final number of subgraphs created are : 1, - Offloaded Nodes - 592, Total Nodes - 592
APP: Init ... !!!
3274.520923 s: MEM: Init ... !!!
3274.520969 s: MEM: Initialized DMA HEAP (fd=8) !!!
3274.521065 s: MEM: Init ... Done !!!
3274.521075 s: IPC: Init ... !!!
3274.593911 s: IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
3274.602514 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
3274.602595 s: VX_ZONE_INIT:Enabled
3274.602605 s: VX_ZONE_ERROR:Enabled
3274.602614 s: VX_ZONE_WARNING:Enabled
3274.603527 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0
3274.603644 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1
3274.603730 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2
3274.603812 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3
3274.603823 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
3274.604218 s: VX_ZONE_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!!
3275.550322 s: VX_ZONE_ERROR:[ownContextSendCmd:885] Command ack message returned failure cmd_status: -1
[C7x_1 ] 3275.550098 s: VX_ZONE_ERROR:[tivxAlgiVisionAllocMem:194] Failed to Allocate memory record 5 @ space = 17 and size = 8670480 !!!
3275.550787 s: VX_ZONE_ERROR:[ownNodeKernelInit:592] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
3275.550821 s: VX_ZONE_ERROR:[ownNodeKernelInit:593] Please be sure the target callbacks have been registered for this core
3275.550830 s: VX_ZONE_ERROR:[ownNodeKernelInit:594] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
[C7x_1 ] 3275.550128 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:358] tivxAlgiVisionAllocMem Failed
3275.550842 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:620] kernel init for node 0, kernel com.ti.tidl:1:1 ... failed !!!
3275.550876 s: VX_ZONE_ERROR:[vxVerifyGraph:2254] Node kernel init failed
[C7x_1 ] 3275.550153 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
3275.550885 s: VX_ZONE_ERROR:[vxVerifyGraph:2311] Graph verify failed
TIDL_RT_OVX: ERROR: Verifying TIDL graph ... Failed !!!
TIDL_RT_OVX: ERROR: Verify OpenVX graph failed
3275.561652 s: VX_ZONE_ERROR:[ownContextSendCmd:885] Command ack message returned failure cmd_status: -1
3275.561683 s: VX_ZONE_ERROR:[ownNodeKernelInit:592] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
3275.561694 s: VX_ZONE_ERROR:[ownNodeKernelInit:593] Please be sure the target callbacks have been registered for this core
3275.561704 s: VX_ZONE_ERROR:[ownNodeKernelInit:594] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel
3275.561712 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:620] kernel init for node 0, kernel com.ti.tidl:1:1 ... failed !!!
3275.561722 s: VX_ZONE_ERROR:[vxVerifyGraph:2254] Node kernel init failed
3275.561729 s: VX_ZONE_ERROR:[vxVerifyGraph:2311] Graph verify failed
3275.561787 s: VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:919] graph is not in a state required to be scheduled
3275.561795 s: VX_ZONE_ERROR:[vxProcessGraph:844] schedule graph failed
3275.561800 s: VX_ZONE_ERROR:[vxProcessGraph:849] wait graph failed
ERROR: Running TIDL graph ... Failed !!!
2024-09-25 13:55:35.654023216 [E:onnxruntime:, sequential_executor.cc:494 ExecuteKernel] Non-zero status code returned while running TIDL_0 node. Name:'TIDLExecutionProvider_TIDL_0_0' Status Message: TIDL Compute Invoke Failed.
terminate called after throwing an instance of 'Ort::Exception'
what(): Non-zero status code returned while running TIDL_0 node. Name:'TIDLExecutionProvider_TIDL_0_0' Status Message: TIDL Compute Invoke Failed.
I have tried compiling various vision transformers with different sizes, most of them I was able to compile successfully.
But none of them run on TDA4.
This is the result of vx_app_arm_remote_log.out
[C7x_1 ] 5.411076 s: MEM: Created heap (DDR_LOCAL_MEM, id=0, flags=0x00000004) @ 117000000 of size 268435456 bytes !!!
[C7x_1 ] 5.411098 s: MEM: Init ... Done !!!
[C7x_1 ] 5.411107 s: IPC: Init ... !!!
[C7x_1 ] 5.411121 s: IPC: 6 CPUs participating in IPC !!!
[C7x_1 ] 5.411136 s: IPC: Waiting for HLOS to be ready ... !!!
[C7x_1 ] 16.252871 s: IPC: HLOS is ready !!!
[C7x_1 ] 16.254806 s: IPC: Init ... Done !!!
[C7x_1 ] 16.254820 s: APP: Syncing with 5 CPUs ... !!!
[C7x_1 ] 16.706152 s: APP: Syncing with 5 CPUs ... Done !!!
[C7x_1 ] 16.706170 s: REMOTE_SERVICE: Init ... !!!
[C7x_1 ] 16.706310 s: REMOTE_SERVICE: Init ... Done !!!
[C7x_1 ] 16.706330 s: VX_ZONE_INIT:Enabled
[C7x_1 ] 16.706342 s: VX_ZONE_ERROR:Enabled
[C7x_1 ] 16.706353 s: VX_ZONE_WARNING:Enabled
[C7x_1 ] 16.706592 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1
[C7x_1 ] 16.706666 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1_PRI_2
[C7x_1 ] 16.706774 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1_PRI_3
[C7x_1 ] 16.706853 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1_PRI_4
[C7x_1 ] 16.706921 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1_PRI_5
[C7x_1 ] 16.706987 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1_PRI_6
[C7x_1 ] 16.707059 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1_PRI_7
[C7x_1 ] 16.707128 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target DSP_C7-1_PRI_8
[C7x_1 ] 16.707149 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
[C7x_1 ] 16.707162 s: APP: OpenVX Target kernel init ... !!!
[C7x_1 ] 16.707332 s: APP: OpenVX Target kernel init ... Done !!!
[C7x_1 ] 16.707346 s: APP: Init ... Done !!!
[C7x_1 ] 16.707355 s: APP: Run ... !!!
[C7x_1 ] 16.707364 s: IPC: Starting echo test ...
[C7x_1 ] 16.707461 s: APP: Run ... Done !!!
[C7x_1 ] 16.713198 s: IPC: Echo status: mpu1_0[x] mcu2_0[x] mcu2_1[x] C66X_1[P] C66X_2[.] C7X_1[s]
[C7x_1 ] 16.713400 s: IPC: Echo status: mpu1_0[x] mcu2_0[x] mcu2_1[x] C66X_1[P] C66X_2[P] C7X_1[s]
[C7x_1 ] 16.727360 s: IPC: Echo status: mpu1_0[x] mcu2_0[x] mcu2_1[P] C66X_1[P] C66X_2[P] C7X_1[s]
[C7x_1 ] 16.762010 s: IPC: Echo status: mpu1_0[x] mcu2_0[P] mcu2_1[P] C66X_1[P] C66X_2[P] C7X_1[s]
[C7x_1 ] 118.503251 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 118.503297 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 118.514061 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 236.003623 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 236.003670 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 236.014710 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 249.938003 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 249.938049 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 249.948790 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 274.237117 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 274.237163 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 274.247866 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 292.161099 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 292.161146 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 292.171659 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 307.041204 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 307.041250 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 307.051874 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 425.098803 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 425.099168 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 425.109739 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 658.811138 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 658.811185 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 658.821964 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 2596.942467 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = 1
[C7x_1 ] 2596.942514 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
[C7x_1 ] 2596.953128 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
[C7x_1 ] 3275.561512 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:945] Network version - 0x00000000, Expected version - 0x20240719
Can you please help me to fix the issue?
Thank you very much in advance.
BR,
Vivek