I try to export pointcloud model using TVM into TIDL model, and I export successfully, and generated eploy_lib.so and so on.
Then, I use edgeai-tidl-tools example dlr to run model inference, and I got an error.
root@tda4vm-sk:/workspace/TI/awesome_tda4/tvm_import/runtime/edgeai-tidl-tools# ./bin/Release/dlr_runtime -f /workspace/TI/awesome_tda4/tvm_import/panolidar_export/ -i /workspace/TI/awesome_tda4/pytorch_tidl/images/0_3.bmp -v 1 -c 1 ***** Display run Config: start ***** verbose level set to: 1 accelerated mode set to: 1 device mem set to: 1 loop count set to: 1 model path set to: model artifacts path set to: /workspace/TI/awesome_tda4/tvm_import/panolidar_export/ image path set to: /workspace/TI/awesome_tda4/pytorch_tidl/images/0_3.bmp device_type set to: cpu labels path set to: test_data/labels.txt num of threads set to: 4 num of results set to: 5 num of warmup runs set to: 2 ***** Display run Config: end ***** APP: Init ... !!! MEM: Init ... !!! MEM: Initialized DMA HEAP (fd=4) !!! MEM: Init ... Done !!! IPC: Init ... !!! IPC: Init ... Done !!! REMOTE_SERVICE: Init ... !!! REMOTE_SERVICE: Init ... Done !!! 2413.533403 s: GTC Frequency = 200 MHz APP: Init ... Done !!! 2413.533529 s: VX_ZONE_INIT:Enabled 2413.533540 s: VX_ZONE_ERROR:Enabled 2413.533587 s: VX_ZONE_WARNING:Enabled 2413.534158 s: VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!! 2413.534458 s: VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!! 2413.559158 s: VX_ZONE_ERROR:[ownContextSendCmd:815] Command ack message returned failure cmd_status: -1 2413.559178 s: VX_ZONE_ERROR:[ownContextSendCmd:851] tivxEventWait() failed. 2413.559274 s: VX_ZONE_ERROR:[ownNodeKernelInit:538] Target kernel, TIVX_CMD_NODE_CREATE failed for node TVMNode 2413.559288 s: VX_ZONE_ERROR:[ownNodeKernelInit:539] Please be sure the target callbacks have been registered for this core 2413.559335 s: VX_ZONE_ERROR:[ownNodeKernelInit:540] If the target callbacks have been registered, please ensure no errors are occurring within the create callback of this kernel 2413.559371 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:583] kernel init for node 0, kernel com.ti.tvm ... failed !!! 2413.559445 s: VX_ZONE_ERROR:[vxVerifyGraph:2055] Node kernel init failed 2413.559456 s: VX_ZONE_ERROR:[vxVerifyGraph:2109] Graph verify failed TVM_RT_OVX: ERROR: Verifying TVM graph ... Failed !!! TVM_RT_OVX: ERROR: Verify OpenVX graph failed 2413.561191 s: VX_ZONE_INIT:[tivxHostDeInitLocal:100] De-Initialization Done for HOST !!! 2413.565665 s: VX_ZONE_INIT:[tivxDeInitLocal:193] De-Initialization Done !!! APP: Deinit ... !!! REMOTE_SERVICE: Deinit ... !!! REMOTE_SERVICE: Deinit ... Done !!! IPC: Deinit ... !!! IPC: DeInit ... Done !!! MEM: Deinit ... !!! MEM: Alloc's: 10 alloc's of 26024488 bytes MEM: Free's : 10 free's of 26024488 bytes MEM: Open's : 0 allocs of 0 bytes MEM: Deinit ... Done !!! APP: Deinit ... Done !!! [03:06:56] ../src/dlr.cc:343: Error: [03:06:56] ../3rdparty/tvm/src/runtime/contrib/tidl/tidl_runtime.cc:639: Failed to initialize TVMRT for c7xgraph 0 Stack trace: [bt] (0) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0xfcf84) [0xffffa006cf84] [bt] (1) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0x2bbf0) [0xffff9ff9bbf0] [bt] (2) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0xc39e8) [0xffffa00339e8] [bt] (3) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0xfd694) [0xffffa006d694] [bt] (4) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0x6ad98) [0xffff9ffdad98] [bt] (5) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0xfd694) [0xffffa006d694] [bt] (6) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0x141b58) [0xffffa00b1b58] [bt] (7) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0x145eb0) [0xffffa00b5eb0] [bt] (8) /usr/lib/python3.8/site-packages/dlr/libdlr.so(+0x147be0) [0xffffa00b7be0] [03:06:56.000.000000]:ERROR:[runInference:0101] Could not load DLR Model [03:06:56.000.000028]:ERROR:[main:0409] Failed to run runInference
And I use /opt/vx_app_arm_remote_log.out to get detail error, I got
[C7x_1 ] 2413.558809 s: << D L O A D >> ERROR: relocation overflow at vaddr 42fc9b4, rtype=28 reloc_value=fffffffffc665fc0 [C7x_1 ] 2413.558965 s: VX_ZONE_ERROR:[tivxKernelTVMCreate:271] ERROR: Dsp dynamic loader failed.
And if I generate part of my model as follows, and I can generate model and inference model successfully.
