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.

Please provide python3.11 pip whls for tflite & onnx download packages.

The ti-tidl-osrt.bb of meta-edgeai layer provides Open Source DL/ML runtime Modules pre-built download packages.

The ti-tidl-osrt.bb of meta-edgeai is:

https://git.ti.com/cgit/edgeai/meta-edgeai/tree/recipes-tisdk/ti-tidl/ti-tidl-osrt.bb?h=kirkstone-next

Currently these download packages are based on python3.10,  through these below address to get download packages from the ti-tidl-osrt.bb.

SRC_URI = "software-dl.ti.com/.../dlr\
           software-dl.ti.com/.../tflite\
           software-dl.ti.com/.../ort\
           software-dl.ti.com/.../tfl_lib\
           software-dl.ti.com/.../ort_lib\
           software-dl.ti.com/.../opencv\
"

Coud you please provide the python3.11 download packages to support python3.11 system?

Thanks

Xulin

  • Hi,

    Can you explain the use case, what is your test setup ?

    May i understand from where does this request coming from to support python 3.11 packages ?

  • Thanks for your reply.

    The test case is to test a python based image classification demo for AM62AX edgeai, the guide link is: software-dl.ti.com/.../sample_apps.html

    The test is based on ourselves Linux distro, which integrates the meta-edgeai layer and the TI released test data.

    Our Linux distro is based on python3.11 not python3.10, thus when running the edgeai demo:
    "/opt/edgeai-gst-apps/apps_python# ./app_edgeai.py ../configs/image_classification.yaml"

    There will be out the python version mismatch error.

    Since TI relesed binary download packages through the web "">software-dl.ti.com/.../tflite_runtime-2.8.2-cp310-cp310-linux_aarch64.whl", it's only for python3.10 version.

    We expect to get version pythons3.11's download packages to finish the same demo as PROCESSOR-SDK-LINUX-AM62A can do.

    Thanks

    Xulin

  • Thanks for the use case, as it seems to be specific to the AM62A device.

    Let me assign this thread respected expert. 

    Please expect the response from him

  • I am seeking further information from the SDK/development team, but I do not believe we have compiled WHL's for python 3.11. Our current SDK's support up to 3.10.

    Most of these packages are either unmodified from their public version or maintained in forks held on the Texasinstruments github pages, e.g. onnxruntime. A wheel can be built from these repositories, but there may be a specific branch to use. For instance, I linked to the tidl-1.14 branch for onnxruntime because that is the one used in our latest releases.

    Providing these builds for a specific version of Python not within the SDK is outside our typical model

    BR,
    Reese

  • ONNXRUNTIME code in the below branch can be used for building the python wheel for required python version

    TexasInstruments/onnxruntime at tidl-1.14 (github.com)

     

    Build scripts in the below can be used as reference for the same. (this default script is building different version, but can be used reference)

    edgeai-tidl-tools/dockers/dependency_build/x86/onnxrt_build.sh at master · TexasInstruments/edgeai-tidl-tools (github.com)

  • Thanks for you infromation.

    Following are the steps to create the onnxruntime whl image on my side to try:

    1. clone the repo "edgeai-tidl-tools" and set the tag "09_01_04_00".

    2 . saw the script "build_onnxrt.sh" will call the docker, based on the user guide "https://github.com/TexasInstruments/edgeai-tidl-tools/blob/master/docs/advanced_setup.md#docker-based-setup-for-x86_pc" to create the docker.  the docker image is "x86_ubuntu_22"

    3. Enter the directory to build onnxruntime with script 

    cd dockers/dependency_build/x86

    sudo ./build_onnxrt.sh x86_ubuntu_22

    However the building will encounter many errors. and failed to create the onnxruntime whl image, below is the error log information

    So the question are: 

    Does your internal use the same script to create the onnxruntime whl image? Without any changes, by default there will be many building errors.

    And the last created whl image with this script is "onnxruntime_tidl-1.7.0-cp38-cp38-linux_aarch64.whl", not your released downloadable whl image "onnxruntime_tidl-1.14.0-cp310-cp310-linux_aarch64.whl"

    <Log information>

    ..............................

    cd /root/dlrt-build/onnx/onnxruntime/build_aarch64/Release/external/nsync && /root/dlrt-build/onnx/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++ -DEIGEN_MPL2_ONLY -DENABLE_ORT_FORMAT_LOAD -DNSYNC_ATOMIC_CPP11 -DNSYNC_USE_CPP11_TIMEPOINT -I/root/dlrt-build/onnx/onnxruntime/cmake/external/nsync/platform/c++11.futex -I/root/dlrt-build/onnx/onnxruntime/cmake/external/nsync/platform/c++11 -I/root/dlrt-build/onnx/onnxruntime/cmake/external/nsync/platform/gcc -I/root/dlrt-build/onnx/onnxruntime/cmake/external/nsync/platform/posix -I/root/dlrt-build/onnx/onnxruntime/cmake/external/nsync/platform/aarch64 -I/root/dlrt-build/onnx/onnxruntime/cmake/external/nsync/public -I/root/dlrt-build/onnx/onnxruntime/cmake/external/nsync/internal -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -std=gnu++14 -std=c++11 -MD -MT external/nsync/CMakeFiles/nsync_cpp.dir/cpp/internal/mu.c.o -MF CMakeFiles/nsync_cpp.dir/cpp/internal/mu.c.o.d -o CMakeFiles/nsync_cpp.dir/cpp/internal/mu.c.o -c /root/dlrt-build/onnx/onnxruntime/build_aarch64/Release/external/nsync/cpp/internal/mu.c
    gmake[2]: *** [external/protobuf/cmake/CMakeFiles/libprotobuf.dir/build.make:107: external/protobuf/cmake/CMakeFiles/libprotobuf.dir/__/src/google/protobuf/extension_set.cc.o] Error 1
    gmake[2]: Leaving directory '/root/dlrt-build/onnx/onnxruntime/build_aarch64/Release'
    gmake[1]: *** [CMakeFiles/Makefile2:2077: external/protobuf/cmake/CMakeFiles/libprotobuf.dir/all] Error 2
    gmake[1]: *** Waiting for unfinished jobs....cc.o

    ..........................................

    /root/dlrt-build/onnx/arm-gnu-toolchain-11.3.rel1-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-ranlib libflatbuffers.a
    gmake[2]: Leaving directory '/root/dlrt-build/onnx/onnxruntime/build_aarch64/Release'
    [ 14%] Built target flatbuffers
    gmake[1]: Leaving directory '/root/dlrt-build/onnx/onnxruntime/build_aarch64/Release'
    gmake: *** [Makefile:169: all] Error 2
    Traceback (most recent call last):
    File "tools/ci_build/build.py", line 2016, in <module>
    sys.exit(main())
    File "tools/ci_build/build.py", line 1949, in main
    build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
    File "tools/ci_build/build.py", line 1026, in build_targets
    run_subprocess(cmd_args, env=env)
    File "tools/ci_build/build.py", line 542, in run_subprocess
    return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
    File "/root/dlrt-build/onnx/onnxruntime/tools/python/util/run.py", line 41, in run
    completed_process = subprocess.run(
    File "/root/miniconda/envs/py38/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['/usr/bin/cmake', '--build', 'build_aarch64/Release', '--config', 'Release', '--', '-j32']' returned non-zero exit status 2.
    mv: cannot stat '/root/dlrt-build/onnx/onnxruntime/build_aarch64/Release/dist/onnxruntime_tidl-1.7.0-cp310-cp310-linux_x86_64.whl': No such file or directory
    cp: cannot stat '/root/dlrt-build/onnx/onnxruntime/build_aarch64/Release/dist/onnxruntime_tidl-1.7.0-cp38-cp38-linux_aarch64.whl': No such file or directory
    cp: cannot stat '/root/dlrt-build/onnx/onnxruntime//build_aarch64/Release/libonnxruntime.so': No such file or directory
    cp: cannot stat '/root/dlrt-build/onnx/onnxruntime/build_aarch64/Release/dist/onnxruntime_tidl-1.7.0-cp38-cp38-linux_aarch64.whl': No such file or directory
    cp: cannot stat '/root/dlrt-build/onnx/onnxruntime//build_aarch64/Release/libonnxruntime.so': No such file or directory
    2024-03-08 13:34:13,094 tools_python_utils [INFO] - flatbuffers module is not installed. parse_config will not be available
    2024-03-08 13:34:13,099 build [DEBUG] - Defaulting to running update, build [and test for native builds].

  • Since there is no activity for more than 6 months, please let us know whether this is still a problem.

    Br, Tommy