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.

TDA4VEN-Q1: SDK 中的tidl程序运行异常

Part Number: TDA4VEN-Q1

您好,我用SDK编译完成后制作SD启动,在板端执行我这边的模型文件,包括前处理和模型运行,前处理在C7x_2中运行,运行时间不到9毫秒,模型在C7x_1中运行,运行时间135秒.

和您沟通后,运行内部测试程序TI_DEVICE_armv8_test_dl_algo_host_rt.out,从ti-processor-sdk-rtos-j722s-evm-10_00_00_05/c7x-mma-tidl/arm-tidl/rt/out/J722S/A53/LINUX/release中拷贝出来的.

从SDK8.2中中拷贝的运行相关配置文件,从SDK8.2中中拷贝的运行相关配置文件,修改/opt/tidl_test/testvecs/multinet/tidl_infer_multinet.txt,

root@j722s-evm:/opt/tidl_test/testvecs/multinet# cat tidl_infer_multinet.txt
inFileFormat    = 2
postProcType = 2
numFrames   = 1
#padInBuffInTB = 1

#out-det-quantize
#netBinFile      = "testvecs/config/tidl_models/onnx/multinet/test/20220126_bisenet/tidl_net_.bin"
#ioConfigFile   = "testvecs/config/tidl_models/onnx/multinet/test/20220126_bisenet/tidl_io_1.bin"

#netBinFile      = "testvecs/multinet/model/yolov5_yolox_exp12_epoch75_seg_20220813/tidl_net_.bin"
#ioConfigFile   = "testvecs/multinet/model/yolov5_yolox_exp12_epoch75_seg_20220813/tidl_io_1.bin"
#netBinFile      = "testvecs/multinet/model/yolov5_yolox_exp12_epoch75_seg_20220813/tidl_net_park.bin"
#ioConfigFile   = "testvecs/multinet/model/yolov5_yolox_exp12_epoch75_seg_20220813/tidl_io_park.bin"
netBinFile      = "/opt/vision_apps/model//tidl_net_park.bin"
ioConfigFile   = "/opt/vision_apps/model//tidl_io_park.bin"


inData  =   testvecs/multinet/input/file_list_image_bmp.txt
outData =   testvecs/multinet/output/out.bin
#debugTraceLevel = 3
#writeTraceLevel = 3
#writeBinAsHeader = 0

#quantRangeUpdateFactor = 0.1

#flowCtrl = 0
postProcDataId = 1


上电运行程序,第一次异常结果

root@j722s-evm:/opt/tidl_test# ./TI_DEVICE_armv8_test_dl_algo_host_rt.out

Processing config file #0 : testvecs/multinet/tidl_infer_multinet.txt
APP: Init ... !!!
 13622.845071 s: MEM: Init ... !!!
 13622.845169 s: MEM: Initialized DMA HEAP (fd=7) !!!
 13622.845415 s: MEM: Init ... Done !!!
 13622.845440 s: IPC: Init ... !!!
 13622.902301 s: IPC: Init ... Done !!!
REMOTE_SERVICE: Init ... !!!
REMOTE_SERVICE: Init ... Done !!!
 13622.910651 s: GTC Frequency = 200 MHz
APP: Init ... Done !!!
 13622.915958 s:  VX_ZONE_INIT:Enabled
 13622.916022 s:  VX_ZONE_ERROR:Enabled
 13622.916031 s:  VX_ZONE_WARNING:Enabled
 13622.917745 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0
 13622.918010 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1
 13622.918164 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2
 13622.918285 s:  VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3
 13622.918304 s:  VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
 13622.918454 s:  VX_ZONE_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!!
 13622.966474 s:  VX_ZONE_ERROR:[ownContextSendCmd:885] Command ack message returned failure cmd_status: -1
 13622.966712 s:  VX_ZONE_ERROR:[ownNodeKernelInit:592] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
 13622.966736 s:  VX_ZONE_ERROR:[ownNodeKernelInit:593] Please be sure the target callbacks have been registered for this core
 13622.966749 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
 13622.966767 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:620] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
 13622.966798 s:  VX_ZONE_ERROR:[vxVerifyGraph:2254] Node kernel init failed
 13622.966811 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

# NETWORK_INIT_TIME =   134.17 (in ms, c7x @1GHz)
 ----------------------- TIDL Process with TARGET DATA FLOW ------------------------
 13623.056164 s:  VX_ZONE_ERROR:[ownContextSendCmd:885] Command ack message returned failure cmd_status: -1
 13623.056211 s:  VX_ZONE_ERROR:[ownNodeKernelInit:592] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
 13623.056224 s:  VX_ZONE_ERROR:[ownNodeKernelInit:593] Please be sure the target callbacks have been registered for this core
 13623.056237 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
 13623.056255 s:  VX_ZONE_ERROR:[ownGraphNodeKernelInit:620] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
 13623.056276 s:  VX_ZONE_ERROR:[vxVerifyGraph:2254] Node kernel init failed
 13623.056288 s:  VX_ZONE_ERROR:[vxVerifyGraph:2311] Graph verify failed
 13623.056518 s:  VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:919] graph is not in a state required to be scheduled
 13623.056532 s:  VX_ZONE_ERROR:[vxProcessGraph:844] schedule graph failed
 13623.056543 s:  VX_ZONE_ERROR:[vxProcessGraph:849] wait graph failed
ERROR: Running TIDL graph ... Failed !!!

# NETWORK_EXECUTION_TIME =    18.04 (in ms, c7x @1GHz) with DDR_BANDWIDTH (Read + Write) =     0.00,     0.00,     0.00 (in Mega Bytes/frame)Error at line:   756 : in file /home/liguangying/work/TIVEN/ti-processor-sdk-rtos-j722s-evm-10_00_00_05/c7x-mma-tidl/arm-tidl/rt/test/armv8/../src/tidl_tb.c, of function : tidlMultiInstanceTest
Invalid Error Type!
Error at line:   762 : in file /home/liguangying/work/TIVEN/ti-processor-sdk-rtos-j722s-evm-10_00_00_05/c7x-mma-tidl/arm-tidl/rt/test/armv8/../src/tidl_tb.c, of function : tidlMultiInstanceTest
Invalid Error Type!

  • 增加C7x日志如下

    root@j722s-evm:/opt/tidl_test# ./TI_DEVICE_armv8_test_dl_algo_host_rt.out

    Processing config file #0 : testvecs/multinet/tidl_infer_multinet.txt
    APP: Init ... !!!
    21966.465264 s: MEM: Init ... !!!
    21966.465355 s: MEM: Initialized DMA HEAP (fd=7) !!!
    21966.465613 s: MEM: Init ... Done !!!
    21966.465637 s: IPC: Init ... !!!
    21966.522745 s: IPC: Init ... Done !!!
    REMOTE_SERVICE: Init ... !!!
    REMOTE_SERVICE: Init ... Done !!!
    21966.531072 s: GTC Frequency = 200 MHz
    APP: Init ... Done !!!
    21966.535766 s: VX_ZONE_INIT:Enabled
    21966.535840 s: VX_ZONE_ERROR:Enabled
    21966.535863 s: VX_ZONE_WARNING:Enabled
    21966.537561 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-0
    21966.537937 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-1
    21966.538197 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-2
    21966.538404 s: VX_ZONE_INIT:[tivxPlatformCreateTargetId:124] Added target MPU-3
    21966.538430 s: VX_ZONE_INIT:[tivxInitLocal:136] Initialization Done !!!
    21966.539449 s: VX_ZONE_INIT:[tivxHostInitLocal:106] Initialization Done for HOST !!!
    21966.586696 s: VX_ZONE_ERROR:[ownContextSendCmd:885] Command ack message returned failure cmd_status: -1
    21966.586945 s: VX_ZONE_ERROR:[ownNodeKernelInit:592] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
    21966.586968 s: VX_ZONE_ERROR:[ownNodeKernelInit:593] Please be sure the target callbacks have been registered for this core
    21966.586982 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
    21966.587001 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:620] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
    21966.587036 s: VX_ZONE_ERROR:[vxVerifyGraph:2254] Node kernel init failed
    21966.587049 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
    [C7x_1 ] 21966.586387 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = -1121

    # NETWORK_INIT_TIME = 127.18 (in ms, c7x @1GHz)
    [C7x_1 ] 21966.586444 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
    ----------------------- TIDL Process with TARGET DATA FLOW ------------------------
    21966.676177 s: VX_ZONE_ERROR:[ownContextSendCmd:885] Command ack message returned failure cmd_status: -1
    21966.676226 s: VX_ZONE_ERROR:[ownNodeKernelInit:592] Target kernel, TIVX_CMD_NODE_CREATE failed for node TIDLNode
    21966.676241 s: VX_ZONE_ERROR:[ownNodeKernelInit:593] Please be sure the target callbacks have been registered for this core
    21966.676254 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
    21966.676271 s: VX_ZONE_ERROR:[ownGraphNodeKernelInit:620] kernel init for node 0, kernel com.ti.tidl:1:2 ... failed !!!
    21966.676293 s: VX_ZONE_ERROR:[vxVerifyGraph:2254] Node kernel init failed
    21966.676305 s: VX_ZONE_ERROR:[vxVerifyGraph:2311] Graph verify failed
    21966.676541 s: VX_ZONE_ERROR:[ownGraphScheduleGraphWrapper:919] graph is not in a state required to be scheduled
    21966.676554 s: VX_ZONE_ERROR:[vxProcessGraph:844] schedule graph failed
    21966.676565 s: VX_ZONE_ERROR:[vxProcessGraph:849] wait graph failed
    ERROR: Running TIDL graph ... Failed !!!

    # NETWORK_EXECUTION_TIME = 18.28 (in ms, c7x @1GHz) with DDR_BANDWIDTH (Read + Write) = 0.00, 0.00, 0.00 (in Mega Bytes/frame)Error at line: 756 : in file /home/liguangying/work/TIVEN/ti-processor-sdk-rtos-j722s-evm-10_00_00_05/c7x-mma-tidl/arm-tidl/rt/test/armv8/../src/tidl_tb.c, of function : tidlMultiInstanceTest
    Invalid Error Type!
    Error at line: 762 : in file /home/liguangying/work/TIVEN/ti-processor-sdk-rtos-j722s-evm-10_00_00_05/c7x-mma-tidl/arm-tidl/rt/test/armv8/../src/tidl_tb.c, of function : tidlMultiInstanceTest
    Invalid Error Type!
    [C7x_1 ] 21966.675907 s: VX_ZONE_ERROR:[tivxAlgiVisionCreate:335] Calling ialg.algInit failed with status = -1121
    [C7x_1 ] 21966.675962 s: VX_ZONE_ERROR:[tivxKernelTIDLCreate:961] tivxAlgiVisionCreate returned NULL
    root@j722s-evm:/opt/tidl_test#

  • 您好,   

    您能用 python 运行时试试这个吗?

    这可能会提供更好的结果来说明导致错误的原因。 错误在 openVX 堆栈中,但我不知道它是在堆栈中还是在模型中。

    设置 python 环境

    github.com/.../README.md

    然后将您的模型添加到 /opt/edgeai-tidl-tools/examples/osrt_python/ 中的 model_configs.py

    cd /opt/edgeai-tidl-tools/examples/osrt_python/ort

    要编译:

    python3 ./onnxrt_ep.py -c -m <modelname>

    要运行:

    python3 ./onnxrt_ep.py -m <modelname>

    若要仅在 ARM 上运行,请执行以下操作:

    python3 ./onnxrt_ep.py -d -m <modelname>