From 2c14fd36a548d7475f52bfde9c010c7204894cc1 Mon Sep 17 00:00:00 2001 From: Gabriel Valcazar Date: Mon, 13 May 2024 16:16:58 +0200 Subject: [PATCH] imx-machine-learning: remove backported meta-imx-ml recipes Back in Yocto 4.0, we backported some ml recipes exclusively for the ccimx93 from meta-imx's rel_imx_6.1.55_2.2.0 tag, but now we simply use what's provided in the scarthgap-6.6.23-2.0.0 branch of meta-imx. Reflect this in imx-digi-base.inc. Remove the recipes for: * arm-compute-library * eiq-examples * ethos-u-driver-stack * ethos-u-vela * flatbuffers * onnxruntime * tensorflow-lite https://onedigi.atlassian.net/browse/DEL-9011 https://onedigi.atlassian.net/browse/DEL-9081 Signed-off-by: Gabriel Valcazar --- .../flatbuffers/files/flatbuffers.pc.in | 7 - .../flatbuffers/flatbuffers_2.%.bbappend | 11 -- .../flatbuffers/flatbuffers_2.0.7.bb | 34 ---- .../flatbuffers/python3-flatbuffers_2.0.7.bb | 14 -- .../arm-compute-library_22.05.bbappend | 6 - .../eiq-examples/eiq-examples_git.bb | 28 --- .../ethos-u-driver-stack_23.08.bb | 11 -- .../ethos-u-vela/ethos-u-vela_3.9.0.bb | 28 --- .../onnxruntime/onnxruntime_1.16.1.bb | 184 ------------------ .../tensorflow-lite-2.12.1.inc | 5 - .../tensorflow-lite-ethosu-delegate_2.12.1.bb | 61 ------ .../tensorflow-lite-host-tools_2.12.1.bb | 29 --- .../tensorflow-lite/tensorflow-lite.pc.in | 6 - .../tensorflow-lite/tensorflow-lite_2.12.1.bb | 126 ------------ 14 files changed, 550 deletions(-) delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/files/flatbuffers.pc.in delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.%.bbappend delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.0.7.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/python3-flatbuffers_2.0.7.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples_git.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_23.08.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-vela/ethos-u-vela_3.9.0.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/onnxruntime/onnxruntime_1.16.1.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-2.12.1.inc delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.12.1.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.12.1.bb delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite/tensorflow-lite.pc.in delete mode 100644 meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite_2.12.1.bb diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/files/flatbuffers.pc.in b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/files/flatbuffers.pc.in deleted file mode 100644 index 3a0666c3e..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/files/flatbuffers.pc.in +++ /dev/null @@ -1,7 +0,0 @@ -Name: flatbuffers -Description: memory efficient serialization library -Version: @version@ -Requires: -Libs: -L@libdir@ -lflatbuffers -Cflags: -I@includedir@ - diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.%.bbappend b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.%.bbappend deleted file mode 100644 index b7c5e09a5..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.%.bbappend +++ /dev/null @@ -1,11 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -SRC_URI:append = " file://flatbuffers.pc.in" - -do_install:append() { - install -D -m 0644 ${WORKDIR}/flatbuffers.pc.in ${D}${libdir}/pkgconfig/flatbuffers.pc - sed -i 's:@version@:${PV}:g - s:@libdir@:${libdir}:g - s:@includedir@:${includedir}:g' ${D}${libdir}/pkgconfig/flatbuffers.pc -} - diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.0.7.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.0.7.bb deleted file mode 100644 index 1fe5facda..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/flatbuffers_2.0.7.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Memory Efficient Serialization Library" -HOMEPAGE = "https://github.com/google/flatbuffers" -SECTION = "console/tools" -LICENSE = "Apache-2.0" - -PACKAGE_BEFORE_PN = "${PN}-compiler" -DEPENDS = "flatbuffers-native" - -RDEPENDS:${PN}-compiler = "${PN}" -RDEPENDS:${PN}-${PYTHON_PN} = "${PN}" -RDEPENDS:${PN}-dev += "${PN}-compiler" - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRCREV = "8367664f15c3ea2ee58c67dacf9d630b49466de5" - -SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https" - -CVE_CHECK_IGNORE += "CVE-2020-35864" - -EXTRA_OECMAKE += "\ - -DFLATBUFFERS_BUILD_TESTS=OFF \ - -DFLATBUFFERS_BUILD_SHAREDLIB=ON \ -" - -EXTRA_OECMAKE:append:class-target = " -DFLATBUFFERS_FLATC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/flatc" - -inherit cmake python3native - -S = "${WORKDIR}/git" - -FILES:${PN}-compiler = "${bindir}" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/python3-flatbuffers_2.0.7.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/python3-flatbuffers_2.0.7.bb deleted file mode 100644 index 151aa793b..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-devtools/flatbuffers/python3-flatbuffers_2.0.7.bb +++ /dev/null @@ -1,14 +0,0 @@ -SUMMARY = "Memory Efficient Serialization Library - Python3 Modules" -HOMEPAGE = "https://github.com/google/flatbuffers" -SECTION = "console/tools" -LICENSE = "Apache-2.0" - -LIC_FILES_CHKSUM = "file://../LICENSE.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" - -SRCREV = "8367664f15c3ea2ee58c67dacf9d630b49466de5" -SRC_URI = "git://github.com/google/flatbuffers.git;branch=master;protocol=https" -S = "${WORKDIR}/git/python" - -RDEPENDS:${PN} = "flatbuffers" - -inherit setuptools3 \ No newline at end of file diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend deleted file mode 100644 index bd92334d8..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bbappend +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (C) 2023,2024, Digi International Inc. - -SRCBRANCH:ccimx93 = "imx_22.05" -SRCREV:ccimx93 = "37fc035060646db5048648da01db3738f08e3bfa" - -SCONS_MAXLINELENGTH = "" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples_git.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples_git.bb deleted file mode 100644 index 43ad704a4..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/eiq-examples/eiq-examples_git.bb +++ /dev/null @@ -1,28 +0,0 @@ -SUMMARY = "The eiq examples based on Tf-lite" -DESCRIPTION = "The eiq examples based on Tf-lite" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -SRC_URI = "${EIQ_EXAMPLES_SRC};branch=${SRCBRANCH}" -EIQ_EXAMPLES_SRC ?= "git://github.com/nxp-imx/eiq-example.git;protocol=https" -SRCBRANCH = "lf-6.1.55_2.2.0" -SRCREV = "4a21f2919e7e16ca1847672b6ed1ecfa60f1a86f" - -S = "${WORKDIR}/git" - -do_install () { - # install scripts to /usr/bin - install -d ${D}${bindir}/${PN}-${PV}/ - cp ${S}/download_models.py ${D}${bindir}/${PN}-${PV}/ - cp -r ${S}/dms ${D}${bindir}/${PN}-${PV}/ - cp -r ${S}/face_recognition ${D}${bindir}/${PN}-${PV}/ - cp -r ${S}/image_classification ${D}${bindir}/${PN}-${PV}/ - cp -r ${S}/object_detection ${D}${bindir}/${PN}-${PV}/ - cp -r ${S}/gesture_detection ${D}${bindir}/${PN}-${PV}/ -} - -RDEPENDS:${PN} = "python3 python3-numpy python3-pillow python3-requests \ - python3-opencv python3-pillow tensorflow-lite" - -#Only support imx93 currently, will add other plantform support. -COMPATIBLE_MACHINE = "(mx93-nxp-bsp)" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_23.08.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_23.08.bb deleted file mode 100644 index 3696f747f..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_23.08.bb +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2024 Digi International Inc. - -# -# Reuse meta-imx/meta-ml ethos-u-driver-stack_22.08.bb -# -require recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bb - -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" - -SRCBRANCH = "lf-6.1.55_2.2.0" -SRCREV = "f8975c4d44e7893dcf106d4afaff55e30470b463" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-vela/ethos-u-vela_3.9.0.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-vela/ethos-u-vela_3.9.0.bb deleted file mode 100644 index b145d47a0..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/ethos-u-vela/ethos-u-vela_3.9.0.bb +++ /dev/null @@ -1,28 +0,0 @@ -# Copyright 2023 NXP -DESCRIPTION = "The vela tool is used to compile a TensorFlow Lite for \ -Microcontrollers neural network model into an optimised version that \ -can run on an embedded system containing an Arm Ethos-U NPU" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e" -DEPENDS = "python3-pip-native python3-wheel-native flatbuffers python3-numpy python3-lxml python3-numpy-native" - -SRC_URI = "${VELA_SRC};branch=${SRCBRANCH}" -VELA_SRC ?= "git://github.com/nxp-imx/ethos-u-vela.git;protocol=https" -SRCBRANCH = "lf-6.1.55_2.2.0" -SRCREV = "b8f74c2fcdce8ceb0fe5e2401ae10359a12224e4" - -S = "${WORKDIR}/git" - -inherit setuptools3 - -do_compile[network] = "1" -do_compile:prepend() { - export HTTP_PROXY=${http_proxy} - export HTTPS_PROXY=${https_proxy} - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} -} - -RDEPENDS:${PN} += "python3-flatbuffers python3-numpy python3-lxml" - -COMPATIBLE_MACHINE = "(mx93-nxp-bsp)" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/onnxruntime/onnxruntime_1.16.1.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/onnxruntime/onnxruntime_1.16.1.bb deleted file mode 100644 index 5151c79b7..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/onnxruntime/onnxruntime_1.16.1.bb +++ /dev/null @@ -1,184 +0,0 @@ -# Copyright 2020-2023 NXP -DESCRIPTION = "cross-platform, high performance scoring engine for ML models" -SECTION = "devel" -LICENSE = "MIT & Apache-2.0" -LIC_FILES_CHKSUM_runtime = "file://LICENSE;md5=0f7e3b1308cb5c00b372a6e78835732d" -LIC_FILES_CHKSUM_model = "file://${S}/example-models/squeezenet/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" -LIC_FILES_CHKSUM = "${LIC_FILES_CHKSUM_runtime} ${LIC_FILES_CHKSUM_model}" - -DEPENDS = "libpng zlib" - -inherit setuptools3 - -SRC_URI = "${ONNXRUNTIME_SRC};branch=${SRCBRANCH}" -ONNXRUNTIME_SRC ?= "gitsm://github.com/nxp-imx/onnxruntime-imx.git;protocol=https" -SRCBRANCH = "lf-6.1.55_2.2.0" -SRCREV = "1582e774d7c120a5dfbdbf6e11c8788e710ab93f" - -S = "${WORKDIR}/git" - -inherit cmake python3native - -OECMAKE_SOURCEPATH = "${S}/cmake" -OECMAKE_GENERATOR = "Unix Makefiles" - -# Notes: -# Abseil: -# - FETCHCONTENT_FULLY_DISCONNECTED=OFF and do_configure:prepend() added to allow -# abseil build process (the issue was related to CMake not fetching sources) - -EXTRA_OECMAKE += "\ - -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ - -DCMAKE_BUILD_TYPE=RelWithDebInfo \ - -Donnxruntime_BUILD_UNIT_TESTS=ON \ -" - -PYTHON_DEPENDS = "\ - ${PYTHON_PN} \ - ${PYTHON_PN}-pip-native \ - ${PYTHON_PN}-numpy-native \ - ${PYTHON_PN}-packaging-native\ - ${PYTHON_PN}-pybind11\ - ${PYTHON_PN}-pybind11-native\ -" - -PYTHON_RDEPENDS = "\ - ${PYTHON_PN} \ - ${PYTHON_PN}-numpy \ - ${PYTHON_PN}-protobuf \ - ${PYTHON_PN}-coloredlogs \ - ${PYTHON_PN}-flatbuffers \ - ${PYTHON_PN}-sympy \ -" - -PACKAGECONFIG ?= "crosscompiling sharedlib python" - -PACKAGECONFIG[nsync] = "-Donnxruntime_USE_NSYNC=ON, -Donnxruntime_USE_NSYNC=OFF" -PACKAGECONFIG[prebuilt] = "-Donnxruntime_USE_PREBUILT_PB=ON, -Donnxruntime_USE_PREBUILT_PB=OFF" -PACKAGECONFIG[openmp] = "-Donnxruntime_USE_OPENMP=ON, -Donnxruntime_USE_OPENMP=OFF" -PACKAGECONFIG[trt] = "-Donnxruntime_USE_TRT=ON, -Donnxruntime_USE_TRT=OFF" -PACKAGECONFIG[nuphar] = "-Donnxruntime_USE_NUPHAR=ON, -Donnxruntime_USE_NUPHAR=OFF" -PACKAGECONFIG[brainslice] = "-Donnxruntime_USE_BRAINSLICE=ON, -Donnxruntime_USE_BRAINSLICE=OFF" -PACKAGECONFIG[python] = "-Donnxruntime_ENABLE_PYTHON=ON, -Donnxruntime_ENABLE_PYTHON=OFF, ${PYTHON_DEPENDS}, ${PYTHON_RDEPENDS}" -PACKAGECONFIG[sharedlib] = "-Donnxruntime_BUILD_SHARED_LIB=ON, -Donnxruntime_BUILD_SHARED_LIB=OFF" -PACKAGECONFIG[eigenblas] = "-Donnxruntime_USE_EIGEN_FOR_BLAS=ON, -Donnxruntime_USE_EIGEN_FOR_BLAS=OFF" -PACKAGECONFIG[openblas] = "-Donnxruntime_USE_OPENBLAS=ON, -Donnxruntime_USE_OPENBLAS=OFF" -PACKAGECONFIG[dnnl] = "-Donnxruntime_USE_DNNL=ON, -Donnxruntime_USE_DNNL=OFF" -PACKAGECONFIG[mklml] = "-Donnxruntime_USE_MKLML=ON, -Donnxruntime_USE_MKLML=OFF" -PACKAGECONFIG[gemmlowp] = "-Donnxruntime_USE_GEMMLOWP=ON, -Donnxruntime_USE_GEMMLOWP=OFF" -PACKAGECONFIG[ngraph] = "-Donnxruntime_USE_NGRAPH=ON, -Donnxruntime_USE_NGRAPH=OFF" -PACKAGECONFIG[openvino] = "-Donnxruntime_USE_OPENVINO=ON, -Donnxruntime_USE_OPENVINO=OFF" -PACKAGECONFIG[interop] = "-Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=ON, -Donnxruntime_ENABLE_LANGUAGE_INTEROP_OPS=OFF" -PACKAGECONFIG[dml] = "-Donnxruntime_USE_DML=ON, -Donnxruntime_USE_DML=OFF" -PACKAGECONFIG[telemetry] = "-Donnxruntime_USE_TELEMETRY=ON, -Donnxruntime_USE_TELEMETRY=OFF" -PACKAGECONFIG[armnn-relu] = "-Donnxruntime_ARMNN_RELU_USE_CPU=ON, -Donnxruntime_ARMNN_RELU_USE_CPU=OFF" -PACKAGECONFIG[armnn-bn] = "-Donnxruntime_ARMNN_BN_USE_CPU=ON, -Donnxruntime_ARMNN_BN_USE_CPU=OFF" -PACKAGECONFIG[opschema] = "-Donnxruntime_PYBIND_EXPORT_OPSCHEMA=ON, -Donnxruntime_PYBIND_EXPORT_OPSCHEMA=OFF" -PACKAGECONFIG[nnapi] = "-Donnxruntime_USE_NNAPI_BUILTIN=ON, -Donnxruntime_USE_NNAPI_BUILTIN=OFF" -PACKAGECONFIG[tvm] = "-Donnxruntime_USE_TVM=ON, -Donnxruntime_USE_TVM=OFF" -PACKAGECONFIG[llvm] = "-Donnxruntime_USE_LLVM=ON, -Donnxruntime_USE_LLVM=OFF" -PACKAGECONFIG[microsoft] = "-Donnxruntime_ENABLE_MICROSOFT_INTERNAL=ON, -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF" -PACKAGECONFIG[eigenthreadpool] = "-Donnxruntime_USE_EIGEN_THREADPOOL=ON, -Donnxruntime_USE_EIGEN_THREADPOOL=OFF" -PACKAGECONFIG[tensorrt] = "-Donnxruntime_USE_TENSORRT=ON, -Donnxruntime_USE_TENSORRT=OFF" -PACKAGECONFIG[crosscompiling] = "-Donnxruntime_CROSS_COMPILING=ON, -Donnxruntime_CROSS_COMPILING=OFF " -PACKAGECONFIG[server] = "-Donnxruntime_BUILD_SERVER=ON, -Donnxruntime_BUILD_SERVER=OFF" -PACKAGECONFIG[x86] = "-Donnxruntime_BUILD:x86=ON, -Donnxruntime_BUILD:x86=OFF" -PACKAGECONFIG[fullprotobuf] = "-Donnxruntime_USE_FULL_PROTOBUF=ON, -Donnxruntime_USE_FULL_PROTOBUF=OFF" -PACKAGECONFIG[ops] = "-Donnxruntime_DISABLE_CONTRIB_OPS=ON, -Donnxruntime_DISABLE_CONTRIB_OPS=OFF" -PACKAGECONFIG[staticruntime] = "-Donnxruntime_MSVC_STATIC_RUNTIME=ON, -Donnxruntime_MSVC_STATIC_RUNTIME=OFF" -PACKAGECONFIG[runtests] = "-Donnxruntime_RUN_ONNX_TESTS=ON, -Donnxruntime_RUN_ONNX_TESTS=OFF" -PACKAGECONFIG[reports] = "-Donnxruntime_GENERATE_TEST_REPORTS=ON, -Donnxruntime_GENERATE_TEST_REPORTS=OFF" -PACKAGECONFIG[devmode] = "-Donnxruntime_DEV_MODE=ON, -Donnxruntime_DEV_MODE=OFF" -PACKAGECONFIG[cuda] = "-Donnxruntime_USE_CUDA=ON, -Donnxruntime_USE_CUDA=OFF" -PACKAGECONFIG[automl] = "-Donnxruntime_USE_AUTOML=ON, -Donnxruntime_USE_AUTOML=OFF" -PACKAGECONFIG[jemalloc] = "-Donnxruntime_USE_JEMALLOC=ON, -Donnxruntime_USE_JEMALLOC=OFF" -PACKAGECONFIG[mimalloc] = "-Donnxruntime_USE_MIMALLOC=ON, -Donnxruntime_USE_MIMALLOC=OFF" -PACKAGECONFIG[csharp] = "-Donnxruntime_BUILD_CSHARP=ON, -Donnxruntime_BUILD_CSHARP=OFF" -PACKAGECONFIG[java] = "-Donnxruntime_BUILD_JAVA=ON, -Donnxruntime_BUILD_JAVA=OFF" - -do_configure[network] = "1" -do_configure:prepend() { - export HTTP_PROXY=${http_proxy} - export HTTPS_PROXY=${https_proxy} - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} -} - -do_compile[network] = "1" -do_compile:prepend() { - if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - # required to pull pybind11 - export HTTP_PROXY=${http_proxy} - export HTTPS_PROXY=${https_proxy} - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - fi -} - -SETUPTOOLS_SETUP_PATH = "${B}" - -do_compile:append() { - if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - # Copy 'setup.py' to build dir - cp ${S}/setup.py ${B} - - # Copy path file with path 'docs/python/README.rst' to build dir - mkdir -p ${B}/docs/python && cp ${S}/docs/python/README.rst ${B}/docs/python - - setuptools3_do_compile - - git config --global --add safe.directory ${WORKDIR}/build/pybind11/src/pybind11 - fi -} - -do_install:append() { - CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" - - # Ensure target dir exists - install -d ${D}${bindir}/${BP} - - # Copy squeezenet updated model from imx-onnxruntime repo - if [ -d ${S}/example-models/ ]; then - cp $CP_ARGS ${S}/example-models/squeezenet ${D}${bindir}/${BP}/ - fi - - # If cmake installs 'onnx_test_runner' at bindir level, move to package - if [ -f ${D}${bindir}/onnx_test_runner ]; then - mv ${D}${bindir}/onnx_test_runner ${D}${bindir}/${BP}/ - fi - - # Install onnxruntime_perf_test in main package - install -m 0755 ${B}/onnxruntime_perf_test ${D}${bindir}/${BP} - - # Install test binaries and data in test package - install -d ${D}${bindir}/${BP}/tests - install -m 0744 ${B}/libcustom_op_library.so ${D}${bindir}/${BP}/tests - install -m 0744 ${B}/onnxruntime_global_thread_pools_test ${D}${bindir}/${BP}/tests - install -m 0744 ${B}/onnxruntime_mlas_test ${D}${bindir}/${BP}/tests - install -m 0744 ${B}/onnxruntime_shared_lib_test ${D}${bindir}/${BP}/tests - install -m 0744 ${B}/onnxruntime_test_all ${D}${bindir}/${BP}/tests - cp $CP_ARGS ${B}/testdata ${D}${bindir}/${BP}/tests - - if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - setuptools3_do_install - find ${D}/${PYTHON_SITEPACKAGES_DIR} -type d -name "__pycache__" -exec rm -Rf {} + - git config --global --unset-all safe.directory ${TMPDIR}/.*/${PN}/.*/build/pybind11/src/pybind11 - fi -} - -# Adjust the Python runtime dependency inherited from setuptools3-base.bbclass -# since Python support for this recipe is conditional -RDEPENDS:${PN}:remove:class-target = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'python', '', '${PYTHON_PN}-core', d)}" - -# libonnxruntime_providers_shared.so is being packaged into -dev which is intended -INSANE_SKIP:${PN}-dev += "dev-elf" - -# A separate tests package for the test binaries not appearing in the main package -PACKAGE_BEFORE_PN = "${PN}-tests" -FILES:${PN}-tests = "${bindir}/${BP}/tests/*" - -# libcustom_op_library.so is in bindir, which is intended; -# onnxruntime_shared_lib_test requires the shlib to be in the same directory as testdata to run properly -INSANE_SKIP:${PN}-tests += "libdir" -INSANE_SKIP:${PN}-dbg += "libdir" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-2.12.1.inc b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-2.12.1.inc deleted file mode 100644 index ae33fc4c9..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-2.12.1.inc +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright 2020-2021 NXP - -TENSORFLOW_LITE_SRC ?= "git://github.com/nxp-imx/tensorflow-imx.git;protocol=https" -SRCBRANCH_tf = "lf-6.1.55_2.2.0" -SRCREV_tf = "22641785b73a34cc88d8d5276bc7697013510a16" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.12.1.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.12.1.bb deleted file mode 100644 index 44a7208db..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.12.1.bb +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2020-2023 NXP -DESCRIPTION = "TensorFlow Lite Ethos-u Delegate" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" - -DEPENDS = "tensorflow-lite ethos-u-driver-stack" - -require tensorflow-lite-${PV}.inc - -TENSORFLOW_LITE_ETHOSU_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-ethosu-delegate-imx.git;protocol=https" -SRCBRANCH_ethosu = "lf-6.1.55_2.2.0" -SRCREV_ethosu = "8f4df6a8bed86feb699f77a84e5f5b02839db53f" - -SRCREV_FORMAT = "ethosu_tf" - -SRC_URI = "${TENSORFLOW_LITE_ETHOSU_DELEGATE_SRC};branch=${SRCBRANCH_ethosu};name=ethosu \ - ${TENSORFLOW_LITE_SRC};branch=${SRCBRANCH_tf};name=tf;destsuffix=tfgit \ -" - -S = "${WORKDIR}/git" - -inherit python3native cmake - -EXTRA_OECMAKE = "-DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR}" -EXTRA_OECMAKE += " \ - -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ - -DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${WORKDIR}/tfgit \ - -DTFLITE_LIB_LOC=${STAGING_DIR_HOST}${libdir}/libtensorflow-lite.so \ - ${S} \ -" - -CXXFLAGS += "-fPIC" - -do_configure[network] = "1" -do_configure:prepend() { - export HTTP_PROXY=${http_proxy} - export HTTPS_PROXY=${https_proxy} - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - - # There is no Fortran compiler in the toolchain, but bitbake sets this variable anyway - # with unavailable binary. - export FC="" -} - -do_install() { - # install libraries - install -d ${D}${libdir} - for lib in ${B}/lib*.so* - do - cp --no-preserve=ownership -d $lib ${D}${libdir} - done -} - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -# Output library is unversioned -SOLIBS = ".so" -FILES_SOLIBSDEV = "" - -COMPATIBLE_MACHINE = "(mx93-nxp-bsp)" diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.12.1.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.12.1.bb deleted file mode 100644 index 191ddc0ad..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.12.1.bb +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 2022 NXP -DESCRIPTION = "Host tools required for build of TensorFlow Lite C++ Library unit tests and Evaluation Tools" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4158a261ca7f2525513e31ba9c50ae98" - -require tensorflow-lite-${PV}.inc -SRC_URI = "${TENSORFLOW_LITE_SRC};branch=${SRCBRANCH_tf};name=tf" - -inherit cmake - -S = "${WORKDIR}/git" -OECMAKE_SOURCEPATH = "${S}/tensorflow/lite/tools/cmake/native_tools" - -BBCLASSEXTEND = "native nativesdk" - -EXTRA_OECMAKE = " \ - -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ - -DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \ -" - -CXXFLAGS += "-fPIC" - -do_configure[network] = "1" -do_configure:prepend() { - export HTTP_PROXY=${http_proxy} - export HTTPS_PROXY=${https_proxy} - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} -} \ No newline at end of file diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite/tensorflow-lite.pc.in b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite/tensorflow-lite.pc.in deleted file mode 100644 index 1d3a96419..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite/tensorflow-lite.pc.in +++ /dev/null @@ -1,6 +0,0 @@ - Name: tensorflow lite - Description: tensorflow lite static library - Version: @version@ - Requires: - Libs: -L@libdir@ -ltensorflow-lite -lrt - Cflags: -I@includedir@ diff --git a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite_2.12.1.bb b/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite_2.12.1.bb deleted file mode 100644 index 49b260040..000000000 --- a/meta-digi-dey/dynamic-layers/imx-machine-learning/recipes-libraries/tensorflow-lite/tensorflow-lite_2.12.1.bb +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright 2020-2021 NXP -DESCRIPTION = "TensorFlow Lite C++ Library" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=4158a261ca7f2525513e31ba9c50ae98" - - -DEPENDS = "flatbuffers python3-numpy-native python3-pip-native python3-pybind11-native python3-wheel-native unzip-native \ - python3 tensorflow-protobuf jpeg zlib ${BPN}-host-tools-native" - -require tensorflow-lite-${PV}.inc -SRC_URI = "${TENSORFLOW_LITE_SRC};branch=${SRCBRANCH_tf};name=tf" - -SRC_URI += "https://storage.googleapis.com/download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224_quant.tgz;name=model-mobv1" -SRC_URI[model-mobv1.md5sum] = "36af340c00e60291931cb30ce32d4e86" -SRC_URI[model-mobv1.sha256sum] = "d32432d28673a936b2d6281ab0600c71cf7226dfe4cdcef3012555f691744166" - -S = "${WORKDIR}/git" - -inherit python3native cmake - -EXTRA_OECMAKE = " \ - -DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \ - -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ - -DTFLITE_EVAL_TOOLS=on \ - -DTFLITE_HOST_TOOLS_DIR=${STAGING_BINDIR_NATIVE} \ - -DTFLITE_BUILD_SHARED_LIB=on \ - -DTFLITE_ENABLE_NNAPI=off \ - -DTFLITE_ENABLE_NNAPI_VERBOSE_VALIDATION=on \ - -DTFLITE_ENABLE_RUY=on \ - -DTFLITE_ENABLE_XNNPACK=on \ - -DTFLITE_PYTHON_WRAPPER_BUILD_CMAKE2=on \ - -DTFLITE_ENABLE_EXTERNAL_DELEGATE=on \ - ${S}/tensorflow/lite/ \ -" -EXTRA_OECMAKE_BUILD = "benchmark_model label_image" - -CXXFLAGS += "-fPIC" - -do_configure[network] = "1" -do_configure:prepend() { - export HTTP_PROXY=${http_proxy} - export HTTPS_PROXY=${https_proxy} - export http_proxy=${http_proxy} - export https_proxy=${https_proxy} - - # There is no Fortran compiler in the toolchain, but bitbake sets this variable anyway - # with unavailable binary. - export FC="" -} - - -do_compile:append () { - # build pip package - cd ${B} - CI_BUILD_PYTHON=${PYTHON} BUILD_NUM_JOBS=8 ${S}/tensorflow/lite/tools/pip_package/build_pip_package_with_cmake2.sh ${TARGET_ARCH} -} - -do_install() { - # install libraries - install -d ${D}${libdir} - for lib in ${B}/lib*.so* - do - cp --no-preserve=ownership -d $lib ${D}${libdir} - done - - # install header files - install -d ${D}${includedir}/tensorflow/lite - cd ${S}/tensorflow/lite - cp --parents \ - $(find . -name "*.h*") \ - ${D}${includedir}/tensorflow/lite - - # install version.h from core - install -d ${D}${includedir}/tensorflow/core/public - cp ${S}/tensorflow/core/public/version.h ${D}${includedir}/tensorflow/core/public - - # install examples - install -d ${D}${bindir}/${PN}-${PV}/examples - install -m 0555 ${B}/examples/label_image/label_image ${D}${bindir}/${PN}-${PV}/examples - install -m 0555 ${B}/tools/benchmark/benchmark_model ${D}${bindir}/${PN}-${PV}/examples - install -m 0555 ${B}/tools/evaluation/coco_object_detection_run_eval ${D}${bindir}/${PN}-${PV}/examples - install -m 0555 ${B}/tools/evaluation/imagenet_image_classification_run_eval ${D}${bindir}/${PN}-${PV}/examples - install -m 0555 ${B}/tools/evaluation/inference_diff_run_eval ${D}${bindir}/${PN}-${PV}/examples - - # install label_image data - cp ${S}/tensorflow/lite/examples/label_image/testdata/grace_hopper.bmp ${D}${bindir}/${PN}-${PV}/examples - cp ${S}/tensorflow/lite/java/ovic/src/testdata/labels.txt ${D}${bindir}/${PN}-${PV}/examples - - - # Install python example - cp ${S}/tensorflow/lite/examples/python/label_image.py ${D}${bindir}/${PN}-${PV}/examples - - # Install mobilenet tflite file - cp ${WORKDIR}/mobilenet_*.tflite ${D}${bindir}/${PN}-${PV}/examples - - # Install pip package - install -d ${D}/${PYTHON_SITEPACKAGES_DIR} - ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -vvv --platform linux_${TARGET_ARCH} \ - -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \ - ${B}/tflite_pip/dist/tflite_runtime-*.whl -} - -RDEPENDS:${PN} = " \ - python3 \ - python3-numpy \ - ${RDEPENDS_OPENVX} \ -" -RDEPENDS_OPENVX = "" -RDEPENDS_OPENVX:mx8-nxp-bsp:imxgpu = "libnn-imx nn-imx" -RDEPENDS_OPENVX:mx8mm-nxp-bsp = "" -# The tensorflow-lite implementation for 8ULP uses CPU, and so doesn't -# support OpenVX -RDEPENDS_OPENVX:mx8ulp-nxp-bsp = "" - -# TensorFlow and TensorFlow Lite both exports few files, suppress the error -# SSTATE_ALLOW_OVERLAP_FILES = "${D}${includedir}" -SSTATE_ALLOW_OVERLAP_FILES = "/" - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" - -INSANE_SKIP:${PN} += " \ - already-stripped \ - staticdev \ -" - -FILES:${PN} += "${libdir}/python*"