edgeai-tidl-tools icon indicating copy to clipboard operation
edgeai-tidl-tools copied to clipboard

Failed to compile onnx model if use PSDK-RTOS's tidl_tools

Open GesilaA opened this issue 2 years ago • 1 comments

SDK_version : ti-processor-sdk-rtos-j721s2-evm-08_05_00_11 TIDL_version : tidl_j721s2_08_05_00_16

I run commands below

export DEVICE=j7
export TIDL_TOOLS_PATH=${PSDKR_PATH}/tidl_j721s2_08_05_00_16/tidl_tools
source ./setup.sh

and all passed. but error occured when I compile the onnx model: resnet18_opset9.onnx

MEM: Init ... !!!
MEM: Init ... Done !!!
 0.0s:  VX_ZONE_INIT:Enabled
 0.2s:  VX_ZONE_ERROR:Enabled
 0.3s:  VX_ZONE_WARNING:Enabled
 0.929s:  VX_ZONE_INIT:[tivxInit:184] Initialization Done !!!
 0.21883s:  VX_ZONE_ERROR:[tivxTIDLValidate:193] 'outArgs' should be a user_data_object of name:
 TIDL_outArgs 
 0.21892s:  VX_ZONE_ERROR:[ownGraphNodeKernelValidate:531] node kernel validate failed for kernel com.ti.tidl:1:1 at index 0
 0.21894s:  VX_ZONE_ERROR:[vxVerifyGraph:1941] Node kernel Validate failed
 0.21895s:  VX_ZONE_ERROR:[vxVerifyGraph:2109] Graph verify failed
TIDL_RT_OVX: ERROR: Verifying TIDL graph ... Failed !!!
TIDL_RT_OVX: ERROR: Verify OpenVX graph failed
 0.22304s:  VX_ZONE_ERROR:[tivxTIDLValidate:193] 'outArgs' should be a user_data_object of name:
 TIDL_outArgs 
 0.22308s:  VX_ZONE_ERROR:[ownGraphNodeKernelValidate:531] node kernel validate failed for kernel com.ti.tidl:1:1 at index 0
 0.22309s:  VX_ZONE_ERROR:[vxVerifyGraph:1941] Node kernel Validate failed
 0.22310s:  VX_ZONE_ERROR:[vxVerifyGraph:2109] Graph verify failed
 0.22330s:  VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:799] graph is not in a state required to be scheduled
 0.22332s:  VX_ZONE_ERROR:[vxProcessGraph:734] schedule graph failed
 0.22333s:  VX_ZONE_ERROR:[vxProcessGraph:739] wait graph failed
ERROR: Running TIDL graph ... Failed !!!

**********  Frame Index 1 : Running float inference **********
 0.48069s:  VX_ZONE_ERROR:[tivxTIDLValidate:193] 'outArgs' should be a user_data_object of name:
 TIDL_outArgs 
 0.48079s:  VX_ZONE_ERROR:[ownGraphNodeKernelValidate:531] node kernel validate failed for kernel com.ti.tidl:1:1 at index 0
 0.48081s:  VX_ZONE_ERROR:[vxVerifyGraph:1941] Node kernel Validate failed
 0.48082s:  VX_ZONE_ERROR:[vxVerifyGraph:2109] Graph verify failed
 0.48103s:  VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:799] graph is not in a state required to be scheduled
 0.48104s:  VX_ZONE_ERROR:[vxProcessGraph:734] schedule graph failed
 0.48106s:  VX_ZONE_ERROR:[vxProcessGraph:739] wait graph failed
ERROR: Running TIDL graph ... Failed !!!

**********  Frame Index 2 : Running fixed point mode for calibration **********

~~~~~Running TIDL in PC emulation mode to collect Activations range for each layer~~~~~
...

This error is disappeared if I export TIDL_TOOLS_PATH=${this_repo}/tidl_tools, and run the same python script

MEM: Init ... !!!
MEM: Init ... Done !!!
 0.0s:  VX_ZONE_INIT:Enabled
 0.13s:  VX_ZONE_ERROR:Enabled
 0.14s:  VX_ZONE_WARNING:Enabled
 0.8960s:  VX_ZONE_INIT:[tivxInit:184] Initialization Done !!!

**********  Frame Index 1 : Running float inference **********

**********  Frame Index 2 : Running fixed point mode for calibration **********

What should I do to use ${PSDKR_PATH}/***/tidl_tools to compile onnx model?

GesilaA avatar Jan 17 '23 07:01 GesilaA

Is TDA4VL could not use ${this_repo}/tidl_tools/osrt_deps/* which build by TDA4VM sdk? And how to build tidl_tools/osrt_deps/* use TDA4VL sdk?

GesilaA avatar Jan 17 '23 11:01 GesilaA