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.

SK-TDA4VM: edgeAI CPP Apps can't run any ONNX models

Part Number: SK-TDA4VM


Hi,

I try to test edgeAI Apps on SK-TDA4VM.
So I using CPP based edgeAI Apps. It can run TFL/TVM(CL/OD/SS) models.
but CPP based edgeAI App can't run any ONNX model.
it shows below message:

root@j7-evm:/opt/edge_ai_apps/apps_cpp# ./bin/Release/app_edgeai ../configs/object_detection.yaml
libtidl_onnxrt_EP loaded 0x1613a690
ERROR : artifacts_folder not a directoryParsing ONNX Model
Segmentation fault (core dumped)

root@j7-evm:/opt/model_zoo# ls -l ONR-OD-8020-ssd-lite-mobv2-coco-512x512/
total 56
drwxr-xr-x 2 root  root  4096 Mar 16 05:12 artifacts
drwxr-xr-x 2 root  root  4096 Mar 16 05:12 model
-rw-r--r-- 1 30409 3355  4215 Mar 22 07:45 param.yaml
-rw-r--r-- 1 30409 3355 39083 Dec 13 07:14 run.log
root@j7-evm:/opt/model_zoo# ls -l ONR-OD-8020-ssd-lite-mobv2-coco-512x512/artifacts/
total 6232
-rw-r--r-- 1 30409 3355    1824 Dec 13 05:16 allowedNode.txt
-rw-r--r-- 1 30409 3355   37256 Dec 13 06:23 boxeslabels_tidl_io_1.bin
-rw-r--r-- 1 30409 3355 4573360 Dec 13 06:23 boxeslabels_tidl_net.bin
-rw-r--r-- 1 30409 3355    1129 Dec 13 06:23 boxeslabels_tidl_net.bin.layer_info.txt
-rw-r--r-- 1 30409 3355 1075945 Dec 13 06:23 boxeslabels_tidl_net.bin.svg
-rw-r--r-- 1 30409 3355   25066 Dec 13 06:23 boxeslabels_tidl_net.bin_netLog.txt
-rw-r--r-- 1 30409 3355  649453 Dec 13 05:16 runtimes_visualization.svg
root@j7-evm:/opt/model_zoo# 

Also i tested Python based EdgeAI Apps. it works well using any ONNX sample models.

I don't know that why cpp based app can't run ONNX model.
How can i fix this problem?

Regards,
Lee.

  • Hi Lee,

    The issue is caused because the branch from which
    onnxruntime headers are cloned has been moved

    We will fix this in next release by applying tags

    for now please follow below steps to resolve your issue

    1. rm /opt/onnxruntime/ -rf
    2. Modify scripts/install_onnx_rt.sh like below

    diff --git a/scripts/install_onnx_rt.sh b/scripts/install_onnx_rt.sh
    index fc835ac..f8de8ab 100755
    --- a/scripts/install_onnx_rt.sh
    +++ b/scripts/install_onnx_rt.sh
    @@ -36,7 +36,10 @@ cd $(dirname $0)
    # Install ONNX runtime under /opt if not found
    cd ../../
    rm -rf onnxruntime
    -git clone --single-branch --branch tidl-j7 --depth 1 github.com/.../onnxruntime.git
    +git clone --single-branch --branch tidl-j7 github.com/.../onnxruntime.git
    +cd onnxruntime
    +git reset --hard 0ab07df1803bb86adfbb7e1158fbed2687a8a2f3
    +
    if [ "$?" -ne "0" ]; then
    cd $current_dir
    exit 1

    3. run the setup script


    Regards
    Rahul T R