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.

AM62P: Fail to export manifest and config on docker building

Part Number: AM62P
Other Parts Discussed in Thread: AM67A, , TDA4VM

Tool/software:

Hi,

I'm settng up the docker environment for SOC AM62A by following the instructions from below link. 

https://github.com/TexasInstruments/edgeai-tidl-tools (version: 10_01_04_00)

When I run the build docker script (source ./scripts/docker/build_docker.sh), the build was completed BUT from the build log, showed docker image able to generate and exported but fail to export manifest and config file. This lead to subsequent steps fail. Attached my docker build log. 

TIDL_TOOLS_TYPE unset, defaulting to CPU tools
No REPO_LOCATION specified, using default
Using PROXY: none
[+] Building 257.4s (13/13) FINISHED docker:default
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 2.08kB 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:22.04 2.9s
=> [internal] load .dockerignore 0.2s
=> => transferring context: 2B 0.2s
=> [1/8] FROM docker.io/library/ubuntu:22.04@sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd8563118240 1.6s
=> => resolve docker.io/library/ubuntu:22.04@sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd8563118240 0.0s
=> => sha256:67cadaff1dca187079fce41360d5a7eb6f7dcd3745e53c79ad5efd8563118240 6.69kB / 6.69kB 0.0s
=> => sha256:899ec23064539c814a4dbbf98d4baf0e384e4394ebc8638bea7bbe4cb8ef4e12 424B / 424B 0.0s
=> => sha256:c42dedf797ba5e7e37e744cdd998e1db046375c702d6dc8a822b422189b019bb 2.30kB / 2.30kB 0.0s
=> => sha256:215ed5a638430309375291c48a01872859a8dbf1331e54ba0af221918eb8ce2e 29.53MB / 29.53MB 0.8s
=> => extracting sha256:215ed5a638430309375291c48a01872859a8dbf1331e54ba0af221918eb8ce2e 0.7s
=> [internal] load build context 0.4s
=> => transferring context: 286B 0.4s
=> [2/8] RUN bash -c 'if [ ${PROXY} != none ]; then echo "Acquire::http::proxy \"${PROXY}\";" > /etc/apt/apt.conf; fi' 0.4s
=> [3/8] RUN apt-get update 6.7s
=> [4/8] RUN apt-get install -y python3 python3-pip python3-setuptools 21.5s
=> [5/8] RUN bash -c 'if [ ${PROXY} != none ];then export ftp_proxy=${PROXY}; export http_pr 50.9s
=> [6/8] COPY requirements_pc.txt /requirements_pc.txt 0.0s
=> [7/8] RUN bash -c 'if [ ${PROXY} != none ];then export ftp_proxy=${PROXY}; export http_p 159.8s
=> [8/8] RUN bash -c 'if [ ${PROXY} != none ];then echo -e "export ftp_proxy=${PROXY}\nexport http_proxy=${PROXY}\nexport ht 0.2s
=> exporting to image 13.2s
=> => exporting layers 13.2s
=> => writing image sha256:1546c34fc605547ff2ceaa345c1ec993ec235b4b4b0e7290bf117b9f6259eab6 0.0s
=> => naming to docker.io/library/edgeai_tidl_tools_x86_ubuntu_22

How to resolve this issue? 

  • Hello,

    I understand what you are saying, but I'm not seeing an obvious issue within the logs. You stated that some required files were not generated.

    Can you clarify what portion of this log is an error? It looks ordinary from my perspective. 

    I assume you are viewing the following document: https://github.com/TexasInstruments/edgeai-tidl-tools/blob/95ba2c7ec62bbedeb637d7a5c0273fcede21cac9/docs/advanced_setup.md 

    Note that for AM62P, there is no true TIDL. The TIDL software is for C7xMMA accelerated devices like AM62A, AM67A, TDA4x. 62P will only use CPU backend. Much of the tooling with edgeai-tidl-tools is for preparing models to run with C7xMMA acceleration. 

    BR,
    Reese

  • My Log:

    => exporting to image 13.2s
    => => exporting layers 13.2s
    => => writing image sha256:1546c34fc605547ff2ceaa345c1ec993ec235b4b4b0e7290bf117b9f6259eab6 0.0s
    => => naming to docker.io/library/edgeai_tidl_tools_x86_ubuntu_22

    The portion of log I referred is missing are highligted in red below compared to above. 

    => exporting to image
    => => exporting layers
    => => exporting manifest sha256:a8284......
    => => exporting config sha256:7a8a......
    => => exporting attestation manifest sha256:03f2......
    => => exporting manifest list sha256:c9920......
    => => naming to docker.io/library/edgeai_tidl_tools_x86_ubuntu_22:latest
    => => unpacking to docker.io/library/edgeai_tidl_tools_x86_ubuntu_22:latest

    I have one machine able to setup successfully following the same documentation link you provided. But the same steps unable to setup on other machine and facing the error stated earlier, this will cause subsequent steps build fail unable to locate the dependency. Paste the compilation error log (command:cmake ../examples && make -j && cd ..):

    In file included from /home/root/edgeai2/edgeai-tidl-tools/examples/osrt_cpp/ort/onnx_main.cpp:63:
    /home/root/edgeai2/edgeai-tidl-tools/examples/osrt_cpp/ort/onnx_main.h:81:10: fatal error: itidl_rt.h: No such file or directory
       81 | #include "itidl_rt.h"
          |          ^~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [osrt_cpp/ort/CMakeFiles/ort_main.dir/build.make:76: osrt_cpp/ort/CMakeFiles/ort_main.dir/onnx_main.cpp.o] Error 1

    make[1]: *** [CMakeFiles/Makefile2:559: osrt_cpp/ort/CMakeFiles/ort_main.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    In file included from /home/root/edgeai2/edgeai-tidl-tools/examples/osrt_cpp/advanced_examples/ort/ort_priority_scheduling.cpp:63:
    /home/root/edgeai2/edgeai-tidl-tools/examples/osrt_cpp/advanced_examples/ort/ort_priority_scheduling.h:80:10: fatal error: itidl_rt.h: No such file or directory
       80 | #include "itidl_rt.h"
          |          ^~~~~~~~~~~~
    compilation terminated.
    make[2]: *** [osrt_cpp/advanced_examples/ort/CMakeFiles/ort_priority_scheduling.dir/build.make:76: osrt_cpp/advanced_examples/ort/CMakeFiles/ort_priority_scheduling.dir/ort_priority_scheduling.cpp.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:417: osrt_cpp/advanced_examples/ort/CMakeFiles/ort_priority_scheduling.dir/all] Error 2
    /home/root/edgeai2/edgeai-tidl-tools/examples/tidlrt_cpp/classification.cpp:51:10: fatal error: itidl_rt.h: No such file or directory
       51 | #include "itidl_rt.h"
          |          ^~~~~~~~~~~~
    compilation terminated.

    Noted for your highlight for AM62P. Currently I would like to setup on X86_PC belore hook up with target. 

  • Is there any chance your other machine was targeting a different device, like AM62A, AM67A, TDA4VM?

    It's failing to find an include that gets downloaded with tidl_tools, which contains device-specific binaries for importing models to C7xMMA. itidl_rt.h is part of tidl_tools

    AM62P does not have such tools, so it is missing this file. This compilation would therefore fail.

    AM62P is also not listed as a supported device for edgeai-tidl-tools, although technically it should be treated same as AM62, which is listed as supported. 

    I'll take a step back -- what is the intent in using this tool?

  • Hi Reese,

    As mentioned in earlier reply, we try to setup the build environment before hook up with any hardware to ensure all the neccessory dev kits and tools installed properly. Our evm target will be using AM62P but as recommendation to us to follow the github (https://github.com/TexasInstruments/edgeai-tidl-tools) documentation for tools setup based on AM62A. 

    On the other machine that able to export and install successfully with the same documentation, we had set the same SoC device as well, ie AM62A. 

    As for the tool setup for edgeai-tidl-tools, my SoC configuration is AM62A, it shall get all the include/dependency downloaded with tidl_tools right? So, is there any missing config path I missed lead to this error?

  • Okay, let me check my own understanding here

    • You are running a project for AM62P
    • You were recommended to setup edgeai-tidl-tools
    • Running tools setup.sh with SOC=am62p failed 
      • compiling the examples then failed because setup.sh did not pull in all the right dependencies
    • Running the build / compile-examples with SOC=am62a did work, following the same process
    As for the tool setup for edgeai-tidl-tools, my SoC configuration is AM62A, it shall get all the include/dependency downloaded with tidl_tools right? So, is there any missing config path I missed lead to this error?

    Yes, it will install the dependencies needed for TIDL. There are a couple of deps like libcgraph that are not necessary but helpful, which may not be installed by default -- if that's the case, then we will see messages around a missing libcgraph.so in logs while importing models for TIDL. 

    • That import step only matters for AM6xA devices like 62A, so AM62P shouldn't require this anyway.

    As I look at the setup.sh script with a closer eye, I notice that AM62P is not a recognized SOC option.  Ordinarily, setup.sh will tell you if SOC is not defined. The docker build may have hidden the message that informs that am62p is not a valid SOC setting

    • You should use SOC='am62' instead for AM62P. It will be valid for AM62P as well. 

    I think this small detail about the SOC setting caused the issue here. Otherwise, some tools should have been downloaded.