diff --git a/conf/layer.conf b/conf/layer.conf index 4d2189d..b725981 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -8,5 +8,5 @@ BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ BBFILE_COLLECTIONS += "meta-freescale-ml" BBFILE_PATTERN_meta-freescale-ml := "^${LAYERDIR}/" BBFILE_PRIORITY_meta-freescale-ml = "8" -LAYERSERIES_COMPAT_meta-freescale-ml = "kirkstone langdale mickledore" +LAYERSERIES_COMPAT_meta-freescale-ml = "mickledore nanbield scarthgap" LAYERDEPENDS_meta-freescale-ml = "freescale-layer meta-python" diff --git a/recipes-devtools/flatbuffers/flatbuffers_23.%.bbappend b/recipes-devtools/flatbuffers/flatbuffers_23.%.bbappend new file mode 100644 index 0000000..b7c5e09 --- /dev/null +++ b/recipes-devtools/flatbuffers/flatbuffers_23.%.bbappend @@ -0,0 +1,11 @@ +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/recipes-devtools/flatbuffers/flatbuffers_23.5.26.bb b/recipes-devtools/flatbuffers/flatbuffers_23.5.26.bb new file mode 100644 index 0000000..98cdb36 --- /dev/null +++ b/recipes-devtools/flatbuffers/flatbuffers_23.5.26.bb @@ -0,0 +1,34 @@ +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;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCREV = "7d6d99c6befa635780a4e944d37ebfd58e68a108" + +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/recipes-devtools/flatbuffers/python3-flatbuffers_23.5.26.bb b/recipes-devtools/flatbuffers/python3-flatbuffers_23.5.26.bb new file mode 100644 index 0000000..7640174 --- /dev/null +++ b/recipes-devtools/flatbuffers/python3-flatbuffers_23.5.26.bb @@ -0,0 +1,14 @@ +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;md5=3b83ef96387f14655fc854ddc3c6bd57" + +SRCREV = "7d6d99c6befa635780a4e944d37ebfd58e68a108" +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/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch b/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch deleted file mode 100644 index fc72861..0000000 --- a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-Makefile.am-include-descriptor.cc-when-building-libp.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 321709837f412e2f590e36e3fe33571bb40036a7 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Thu, 27 Jun 2019 13:27:18 +0000 -Subject: [PATCH] Makefile.am: include descriptor.pb.cc when building libprotoc.so - -* otherwise plugin.pb.o has undefined symbol scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto - and build with gold fails with: - core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot-native/usr/bin/i686-oe-linux/../../libexec/i686-oe-linux/gcc/i686-oe-linux/9.1.0/ld.bfd: ./.libs/libprotoc.so: undefined reference to `descriptor_table_google_2fprotobuf_2fdescriptor_2eproto' - core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot-native/usr/bin/i686-oe-linux/../../libexec/i686-oe-linux/gcc/i686-oe-linux/9.1.0/ld.bfd: ./.libs/libprotoc.so: undefined reference to `scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto' - -Upstream-Status: Pending -Signed-off-by: Martin Jansa ---- - src/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/Makefile.am b/src/Makefile.am -index be18ba761..57e3daec1 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -313,6 +313,7 @@ libprotoc_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libprotoc.map - EXTRA_libprotoc_la_DEPENDENCIES = libprotoc.map - endif - libprotoc_la_SOURCES = \ -+ google/protobuf/descriptor.pb.cc \ - google/protobuf/compiler/code_generator.cc \ - google/protobuf/compiler/command_line_interface.cc \ - google/protobuf/compiler/plugin.cc \ diff --git a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch b/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch deleted file mode 100644 index 0a2e5e2..0000000 --- a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch +++ /dev/null @@ -1,56 +0,0 @@ -From a28e15092a298e0c73c6fc1ded0913275cf27cb0 Mon Sep 17 00:00:00 2001 -From: Martin Jansa -Date: Fri, 28 Jun 2019 13:50:52 +0000 -Subject: [PATCH] examples/Makefile: respect CXX,LDFLAGS variables, fix build - with gold - -* move pkg-config call to separate variable, so that the final version - of the whole command so it's shown in log.do_compile_ptest_base -* add ../src/google/protobuf/.libs/timestamp.pb.o when linking - add_person_cpp otherwise it fails to link with gold: - i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` - /tmp/cccjSJQs.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: error: undefined reference to 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' - /tmp/cccjSJQs.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_deps: error: undefined reference to 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' - collect2: error: ld returned 1 exit status - Makefile:43: recipe for target 'add_person_cpp' failed - -* and the same with list_people_cpp this time with pkg-config already through the variable: - i686-oe-linux-g++ -m32 -march=core2 -mtune=core2 -msse3 -mfpmath=sse --sysroot=core2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -pthread -Icore2-32-oe-linux/protobuf/3.8.0-r0/git/src -Lcore2-32-oe-linux/protobuf/3.8.0-r0/git/src/.libs -Lcore2-32-oe-linux/protobuf/3.8.0-r0/recipe-sysroot/usr/lib -lprotobuf list_people.cc addressbook.pb.cc -o list_people_cpp - /tmp/ccpaI5Su.o:addressbook.pb.cc:scc_info_Person_addressbook_2eproto: error: undefined reference to 'scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto' - /tmp/ccpaI5Su.o:addressbook.pb.cc:descriptor_table_addressbook_2eproto_deps: error: undefined reference to 'descriptor_table_google_2fprotobuf_2ftimestamp_2eproto' - collect2: error: ld returned 1 exit status - Makefile:49: recipe for target 'list_people_cpp' failed - -Upstream-Status: Pending -Signed-off-by: Martin Jansa ---- - examples/Makefile | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/examples/Makefile b/examples/Makefile -index 4ad605641..31d887639 100644 ---- a/examples/Makefile -+++ b/examples/Makefile -@@ -2,6 +2,8 @@ - - .PHONY: all cpp java python clean - -+PROTOBUF := $(shell pkg-config --cflags --libs protobuf) -+ - all: cpp java python - - cpp: add_person_cpp list_people_cpp -@@ -41,11 +43,11 @@ protoc_middleman_dart: addressbook.proto - - add_person_cpp: add_person.cc protoc_middleman - pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ add_person.cc addressbook.pb.cc -o add_person_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) add_person.cc addressbook.pb.cc -o add_person_cpp - - list_people_cpp: list_people.cc protoc_middleman - pkg-config --cflags protobuf # fails if protobuf is not installed -- c++ list_people.cc addressbook.pb.cc -o list_people_cpp `pkg-config --cflags --libs protobuf` -+ $(CXX) $(CXXFLAGS) $(LDFLAGS) ../src/google/protobuf/.libs/timestamp.pb.o $(PROTOBUF) list_people.cc addressbook.pb.cc -o list_people_cpp - - add_person_dart: add_person.dart protoc_middleman_dart - diff --git a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-protobuf-fix-configure-error.patch b/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-protobuf-fix-configure-error.patch deleted file mode 100644 index a2f7a4b..0000000 --- a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/0001-protobuf-fix-configure-error.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 52959e8e01e39139d18f752e97283e45b4b7a426 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Wed, 18 Jul 2018 17:52:34 +0800 -Subject: [PATCH] protobuf: fix configure error - -fix below error: -gnu-configize: 'configure.ac' or 'configure.in' is required - -third_party/googletest is git submodule of protobuf. Above error -caused by missing submodule googletest. - -Upstream-Status: Inappropriate [oe-specific] - -Signed-off-by: Changqing Li ---- - configure.ac | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index aec10cf..7fbe57d 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -214,7 +214,6 @@ AX_CXX_COMPILE_STDCXX([11], [noext], [mandatory]) - # too. - export CFLAGS - export CXXFLAGS --AC_CONFIG_SUBDIRS([third_party/googletest]) - - AC_CONFIG_FILES([Makefile src/Makefile benchmarks/Makefile conformance/Makefile protobuf.pc protobuf-lite.pc]) - AC_OUTPUT --- -2.7.4 - diff --git a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/run-ptest b/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/run-ptest deleted file mode 100644 index b3b2278..0000000 --- a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf/run-ptest +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -TEST_FILE="/tmp/test.data" - -RETVAL=0 -# Test every writing test application -for write_exe_full_path in ${DIR}/add_person_*; do - if [ -x "${write_exe_full_path}" ]; then - write_exe=`basename ${write_exe_full_path}` - echo "Generating new test file using ${write_exe}..." - printf "1234\nname\nname@example.com\n" | ${write_exe_full_path} "${TEST_FILE}" - RETVAL=$? - [ $RETVAL -eq 0 ] || exit $RETVAL - - # Test every reading test application - for read_exe_full_path in ${DIR}/list_people_*; do - read_exe=`basename ${read_exe_full_path}` - echo "Test: Write with ${write_exe}; Read with ${read_exe}..." - if [ -x "${read_exe_full_path}" ]; then - ${read_exe_full_path} "${TEST_FILE}" - RETVAL=$? - [ $RETVAL -eq 0 ] || exit $RETVAL - fi - done - - # Cleanup... - if [ -e "${TEST_FILE}" ]; then - rm "${TEST_FILE}" - fi - fi -done - -if [ $RETVAL -eq 0 ] ; then - echo "PASS: protobuf" -else - echo "FAIL: protobuf" -fi - diff --git a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf_3.9.2.bb b/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf_3.9.2.bb deleted file mode 100644 index 5f915ab..0000000 --- a/recipes-devtools/tensorflow-protobuf/tensorflow-protobuf_3.9.2.bb +++ /dev/null @@ -1,50 +0,0 @@ -# Copyright 2021 NXP -SUMMARY = "Protocol Buffers - structured data serialisation mechanism" -DESCRIPTION = "Protocol Buffers are a way of encoding structured data in an \ -efficient yet extensible format. Google uses Protocol Buffers for almost \ -all of its internal RPC protocols and file formats." -HOMEPAGE = "https://github.com/google/protobuf" -SECTION = "console/tools" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" - -DEPENDS = "zlib" -DEPENDS:append:class-target = " tensorflow-protobuf-native" - -SRCREV = "52b2447247f535663ac1c292e088b4b27d2910ef" - -SRC_URI = "git://github.com/google/protobuf.git;branch=3.9.x;protocol=https \ - file://run-ptest \ - file://0001-protobuf-fix-configure-error.patch \ - file://0001-Makefile.am-include-descriptor.cc-when-building-libp.patch \ - file://0001-examples-Makefile-respect-CXX-LDFLAGS-variables-fix-.patch \ -" -S = "${WORKDIR}/git" - -inherit autotools-brokensep pkgconfig - -EXTRA_OECONF += "--with-protoc=echo --includedir=${includedir}/tensorflow-protobuf " - -do_install:append() { - # Remove the symlinks for the shared libraries to avoid conflict with other protobuf versions - rm ${D}${libdir}/*.so - rm -r ${D}${libdir}/pkgconfig -} - -PACKAGE_BEFORE_PN = "${PN}-compiler ${PN}-lite" -FILES:${PN}-compiler = "${bindir} ${libdir}/libprotoc${SOLIBS}" -FILES:${PN}-lite = "${libdir}/libprotobuf-lite${SOLIBS}" - -RDEPENDS:${PN}-compiler = "${PN}" -RDEPENDS:${PN}-dev += "${PN}-compiler" - -MIPS_INSTRUCTION_SET = "mips" - -BBCLASSEXTEND = "native nativesdk" - -LDFLAGS:append:arm = " -latomic" -LDFLAGS:append:mips = " -latomic" -LDFLAGS:append:powerpc = " -latomic" -LDFLAGS:append:mipsel = " -latomic" - -INSANE_SKIP:${PN} = "dev-so" diff --git a/recipes-fsl/packagegroups/packagegroup-fsl-ml.bb b/recipes-fsl/packagegroups/packagegroup-fsl-ml.bb index 10c8fa2..ec70790 100644 --- a/recipes-fsl/packagegroups/packagegroup-fsl-ml.bb +++ b/recipes-fsl/packagegroups/packagegroup-fsl-ml.bb @@ -5,13 +5,12 @@ DESCRIPTION = "Add packages for AI/ML build" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" -PACKAGE_ARCH = "${TUNE_PKGARCH}" +PACKAGE_ARCH = "${MACHINE_SOCARCH}" inherit packagegroup ML_NNSTREAMER_PKGS_LIST = " \ nnstreamer \ - nnstreamer-deepview-rt \ nnstreamer-protobuf \ nnstreamer-python3 \ nnstreamer-query \ @@ -25,23 +24,21 @@ ML_NNSTREAMER_PKGS:mx9-nxp-bsp = "${ML_NNSTREAMER_PKGS_LIST}" # i.MX8MP uses nnshark - other i.MX8/9 use raw gstshark ML_GST_PROFILER = "" -#ML_GST_PROFILER:mx8-nxp-bsp = "gst-shark" -#ML_GST_PROFILER:mx8mp-nxp-bsp = "nnshark" -#ML_GST_PROFILER:mx9-nxp-bsp = "gst-shark" +ML_GST_PROFILER:mx8-nxp-bsp = "gst-shark" +ML_GST_PROFILER:mx8mp-nxp-bsp = "nnshark" +ML_GST_PROFILER:mx9-nxp-bsp = "gst-shark" # These packages don't require any acceleration ML_PKGS = "" ML_PKGS:mx8-nxp-bsp = " \ - deepview-rt-examples \ onnxruntime-tests \ + pytorch \ tensorflow-lite \ - torchvision \ " ML_PKGS:mx9-nxp-bsp = " \ - deepview-rt-examples \ onnxruntime-tests \ + pytorch \ tensorflow-lite \ - torchvision \ " # These packages require acceleration, which currently maps to # all SOCs with GPU except for 8M Mini @@ -65,6 +62,12 @@ ETHOS_U_PKGS:mx93-nxp-bsp = " \ eiq-examples \ " +# Neutron package +NEUTRON_PKGS = "" +NEUTRON_PKGS:mx95-nxp-bsp = " \ + neutron \ + tensorflow-lite-neutron-delegate \ +" RDEPENDS:${PN} = " \ ${ML_PKGS} \ @@ -72,4 +75,5 @@ RDEPENDS:${PN} = " \ ${ML_NNSTREAMER_PKGS} \ ${ML_GST_PROFILER} \ ${ETHOS_U_PKGS} \ + ${NEUTRON_PKGS} \ " diff --git a/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bb b/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bb deleted file mode 100644 index 8ec21f9..0000000 --- a/recipes-libraries/arm-compute-library/arm-compute-library_22.05.bb +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright 2019-2023 NXP -SUMMARY = "The ARM Computer Vision and Machine Learning library" -DESCRIPTION = "The ARM Computer Vision and Machine Learning library is a set of functions optimised for both ARM CPUs and GPUs." -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f3c5879801d3cffc4ac2399f2b8e8ec5 \ - file://include/half/LICENSE.txt;md5=fe7e5a4795c76b317919afd2d3da5983" - -SRC_URI = "${ARM_COMPUTELIBRARY_SRC};branch=${SRCBRANCH}" -ARM_COMPUTELIBRARY_SRC ?= "git://github.com/nxp-imx/arm-computelibrary-imx.git;protocol=https" -SRCBRANCH = "lf-6.1.1_1.0.0" -SRCREV = "e9658b24c2dfac18961b0b098173732f39f4a31b" - -S = "${WORKDIR}/git" - -inherit scons - -# recipe uses older scons which does not support MAXLINELENGTH, so need to clear variable inherited in scons class -SCONS_MAXLINELENGTH = "" - -PACKAGECONFIG ?= "cppthreads examples" - -PACKAGECONFIG[Werror] = "Werror=1,Werror=0" -PACKAGECONFIG[tests] = "benchmark_tests=1 validation_tests=1,benchmark_tests=0 validation_tests=0" -PACKAGECONFIG[opencl] = "opencl=1,opencl=0,opencl-headers opencl-icd-loader" -PACKAGECONFIG[embed] = "embed_kernels=1,embed_kernels=0" -PACKAGECONFIG[debug] = "debug=1,debug=0" -PACKAGECONFIG[cppthreads] = "cppthreads=1,cppthreads=0" -PACKAGECONFIG[examples] = "examples=1,examples=0" - -EXTRA_OESCONS = " \ - build=cross_compile \ - os=linux \ - toolchain_prefix=' ' \ - extra_cxx_flags='-fPIC' \ - ${PACKAGECONFIG_CONFARGS} \ -" -EXTRA_OESCONS:append:aarch64 = " arch=arm64-v8a neon=1" - -TARGET_CC_ARCH += "${LDFLAGS}" - -# Override scons_do_compile which includes unknown variables PREFIX and prefix -do_compile() { - ${STAGING_BINDIR_NATIVE}/scons --directory=${S} ${PARALLEL_MAKE} ${EXTRA_OESCONS} || \ - die "scons build execution failed." -} - -do_install() { - CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" - install -d ${D}${includedir} - cp $CP_ARGS ${S}/arm_compute ${D}${includedir} - cp $CP_ARGS support ${D}${includedir} - cp $CP_ARGS include/half ${D}${includedir} - - # install libraries - install -d ${D}${libdir} - install -m 0755 ${S}/build/libarm_compute*.so ${D}${libdir} - install -m 0755 ${S}/build/libarm_compute*.a ${D}${libdir} - - # install examples - if ${@bb.utils.contains('PACKAGECONFIG', 'examples', 'true', 'false', d)}; then - install -d ${D}${bindir}/${PN}-${PV}/examples - for example in ${S}/build/examples/*; do - if [ -d "$example" ]; then - continue - fi - case "$example" in - (*.o|*.a) continue;; - esac - install -m 0555 $example ${D}${bindir}/${PN}-${PV}/examples - done - if [ -d "${S}/build/examples/gemm_tuner" ]; then - install -d ${D}${bindir}/${PN}-${PV}/examples/gemm_tuner - for example in ${S}/build/examples/gemm_tuner/*; do - if [ -d "$example" ]; then - continue - fi - case "$example" in - (*.o|*.a) continue;; - esac - install -m 0555 $example ${D}${bindir}/${PN}-${PV}/examples/gemm_tuner - done - fi - fi - - # install tests - if ${@bb.utils.contains('PACKAGECONFIG', 'tests', 'true', 'false', d)}; then - install -d ${D}${bindir}/${PN}-${PV}/tests - for test in ${S}/build/tests/*; do - if [ -d "$test" ]; then - continue - fi - case "$test" in - (*.o|*.a) continue;; - esac - install -m 0555 $test ${D}${bindir}/${PN}-${PV}/tests - done - if [ -d "${S}/build/tests/gemm_tuner" ]; then - install -d ${D}${bindir}/${PN}-${PV}/tests/gemm_tuner - for test in ${S}/build/tests/gemm_tuner/*; do - if [ -d "$test" ]; then - continue - fi - case "$test" in - (*.o|*.a) continue;; - esac - install -m 0555 $test ${D}${bindir}/${PN}-${PV}/tests/gemm_tuner - done - fi - fi -} - -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -SOLIBS = ".so" -FILES_SOLIBSDEV = "" - -RDEPENDS:${PN} = "bash" - -COMPATIBLE_MACHINE = "(mx8-nxp-bsp|mx9-nxp-bsp)" diff --git a/recipes-libraries/deepview-rt/deepview-rt-examples_1.6.1.bb b/recipes-libraries/deepview-rt/deepview-rt-examples_1.6.1.bb deleted file mode 100644 index 3e7a9df..0000000 --- a/recipes-libraries/deepview-rt/deepview-rt-examples_1.6.1.bb +++ /dev/null @@ -1,33 +0,0 @@ -DESCRIPTION = "DeepViewRT examples" -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=ea25d099982d035af85d193c88a1b479" - -DEPENDS = "deepview-rt" - -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "540cb3aaa22ef96ee44a59bbedb004b9" -SRC_URI[sha256sum] = "333f145d7e742f2cbe08276e9eb5831973ff6520200353b2fe710b1255e63c01" -S = "${WORKDIR}/${BPN}-${PV}" - -inherit fsl-eula-unpack pkgconfig - -EXTRA_OEMAKE += "SDK_SYSROOT=${RECIPE_SYSROOT}" - -do_install () { - install -d ${D}${bindir}/${BPN} - - cp -fr ${S}/labelimg/labelimg ${D}${bindir}/${BPN} - cp -fr ${S}/detect_ssd/detect_ssd ${D}${bindir}/${BPN} - cp -fr ${S}/python-examples ${D}${bindir}/${BPN} - - chown -R root:root "${D}" -} - -INSANE_SKIP:${PN} += "rpaths dev-deps ldflags" -CLEANBROKEN = "1" - -RDEPENDS:${PN} = "deepview-rt python3-core" - -BBCLASSEXTEND = "nativesdk" - -COMPATIBLE_MACHINE = "(mx8-nxp-bsp|mx9-nxp-bsp)" diff --git a/recipes-libraries/deepview-rt/deepview-rt_2.4.46.1-aarch64.bb b/recipes-libraries/deepview-rt/deepview-rt_2.4.46.1-aarch64.bb deleted file mode 100644 index ec22eec..0000000 --- a/recipes-libraries/deepview-rt/deepview-rt_2.4.46.1-aarch64.bb +++ /dev/null @@ -1,57 +0,0 @@ -DESCRIPTION = "This package includes the updated and experimental ModelRunner for TensorFlow Lite and ARM NN. Also in this repository is a pre-release of DeepViewRT with support for the OpenVX backend." -LICENSE = "Proprietary" -LIC_FILES_CHKSUM = "file://COPYING;md5=ea25d099982d035af85d193c88a1b479" - -DEPENDS = "python3 python3-pip-native" - -SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" -SRC_URI[md5sum] = "a4782e44df2254d30f7c6b0a45c4102e" -SRC_URI[sha256sum] = "40d6c12bbe5fc29a257a1717684ec650bd390eb1565c5bca82ec56e3ffbcf918" -S = "${WORKDIR}/${BPN}-${PV}" - -inherit fsl-eula-unpack python3native - -PACKAGECONFIG ?= "${PACKAGECONFIG_OPENVX}" -PACKAGECONFIG_OPENVX = "" -PACKAGECONFIG_OPENVX:mx8-nxp-bsp:imxgpu = "openvx" -PACKAGECONFIG_OPENVX:mx8mm-nxp-bsp = "" -# The tensorflow-lite implementation for 8ULP uses CPU, and so doesn't -# support OpenVX -PACKAGECONFIG_OPENVX:mx8ulp-nxp-bsp = "" - -PACKAGECONFIG[openvx] = ",,,libopenvx-imx" - -do_install () { - install -d ${D}${bindir} - install -d ${D}${libdir} - install -d ${D}${includedir} - install -d ${D}/${PYTHON_SITEPACKAGES_DIR} - - cp -r ${S}/modelrunner/bin/* ${D}${bindir} - cp -rP ${S}/modelrunner/lib/* ${D}${libdir} - cp -rP ${S}/${BPN}/lib/* ${D}${libdir} - cp -r ${S}/${BPN}/include/* ${D}${includedir} - if ${@bb.utils.contains('PACKAGECONFIG', 'openvx', 'false', 'true', d)} ; then - rm ${D}${libdir}/deepview-rt-openvx.so - fi - - ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v \ - -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \ - ${S}/whl/deepview_rt-*.whl - - chown -R root:root "${D}" -} - -INHIBIT_PACKAGE_STRIP = "1" -INHIBIT_PACKAGE_DEBUG_SPLIT = "1" -INHIBIT_SYSROOT_STRIP = "1" - -FILES_SOLIBSDEV = "" - -FILES:${PN} += "${libdir}/*" -RDEPENDS:${PN} = "onnxruntime tensorflow-lite" -INSANE_SKIP:${PN} += "dev-so dev-deps ldflags" - -BBCLASSEXTEND = "nativesdk" - -COMPATIBLE_MACHINE = "(mx8-nxp-bsp|mx9-nxp-bsp)" diff --git a/recipes-libraries/eiq-examples/eiq-examples_git.bb b/recipes-libraries/eiq-examples/eiq-examples_git.bb index 127a685..d882360 100644 --- a/recipes-libraries/eiq-examples/eiq-examples_git.bb +++ b/recipes-libraries/eiq-examples/eiq-examples_git.bb @@ -5,8 +5,8 @@ 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.1_1.0.0" -SRCREV = "798519ee033fb7a5aef989a793afe16f400d6479" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "2f44f5715d2c14aca4d746526612d372fd2d0403" S = "${WORKDIR}/git" diff --git a/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bb b/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_24.05.bb similarity index 92% rename from recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bb rename to recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_24.05.bb index 38bedc1..3ef4c76 100644 --- a/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_22.08.bb +++ b/recipes-libraries/ethos-u-driver-stack/ethos-u-driver-stack_24.05.bb @@ -10,8 +10,8 @@ DEPENDS = "flatbuffers python3-pybind11 python3-pybind11-native" SRC_URI = "${ETHOS_U_SRC};branch=${SRCBRANCH}" ETHOS_U_SRC ?= "git://github.com/nxp-imx/ethos-u-driver-stack-imx.git;protocol=https" -SRCBRANCH = "lf-6.1.1_1.0.0" -SRCREV = "ca1a424bcd00758e0b50043ac7f8a3ff214e9ed8" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "a80c51d77c91f1a8266afc5d8056fb981de4b504" S = "${WORKDIR}/git" diff --git a/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_22.08.bb b/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_24.05.bb similarity index 87% rename from recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_22.08.bb rename to recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_24.05.bb index 3c35e00..edafbab 100644 --- a/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_22.08.bb +++ b/recipes-libraries/ethos-u-driver-stack/ethos-u-firmware_24.05.bb @@ -9,14 +9,15 @@ LIC_FILES_CHKSUM = "\ SRC_URI = "${ETHOS_U_FIRMWARE_SRC};branch=${SRCBRANCH}" ETHOS_U_FIRMWARE_SRC ?= "git://github.com/nxp-imx/ethos-u-firmware.git;protocol=https" -SRCBRANCH = "lf-6.1.1_1.0.0" -SRCREV = "c80a413664f650c366fc4721474a3fe1d1503eb5" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "3dbedc11bd2a4ba56af9fbe9d285b5bf13f1a088" S = "${WORKDIR}/git" ETHOS_U_FIRMWARE = "ethosu_firmware" ETHOS_U_FIRMWARE:imx93-9x9-lpddr4-qsb = "ethosu_firmware_9x9" ETHOS_U_FIRMWARE:imx93-11x11-lpddr4x-evk = "ethosu_firmware_11x11" +ETHOS_U_FIRMWARE:imx93-14x14-lpddr4x-evk = "ethosu_firmware_14x14" do_install () { install -d ${D}${nonarch_base_libdir}/firmware diff --git a/recipes-libraries/ethos-u-vela/ethos-u-vela_3.6.0.bb b/recipes-libraries/ethos-u-vela/ethos-u-vela_3.12.0.bb similarity index 75% rename from recipes-libraries/ethos-u-vela/ethos-u-vela_3.6.0.bb rename to recipes-libraries/ethos-u-vela/ethos-u-vela_3.12.0.bb index a9ebd15..1f9209b 100644 --- a/recipes-libraries/ethos-u-vela/ethos-u-vela_3.6.0.bb +++ b/recipes-libraries/ethos-u-vela/ethos-u-vela_3.12.0.bb @@ -1,15 +1,15 @@ -# Copyright 2022 NXP +# Copyright 2023-2024 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" +DEPENDS = "python3-pip-native python3-wheel-native flatbuffers python3-numpy python3-lxml python3-numpy-native python3-setuptools-scm-native" SRC_URI = "${VELA_SRC};branch=${SRCBRANCH}" VELA_SRC ?= "git://github.com/nxp-imx/ethos-u-vela.git;protocol=https" -SRCBRANCH = "lf-6.1.1_1.0.0" -SRCREV = "8b138a2e6880e31bd199764db9c5177c46bd5579" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "135efab5b1a30b08d4dcc075cb8bed2fadc28407" S = "${WORKDIR}/git" @@ -23,6 +23,6 @@ do_compile:prepend() { export https_proxy=${https_proxy} } -RDEPENDS:${PN} += "flatbuffers python3-numpy python3-lxml python3-pkg-resources" +RDEPENDS:${PN} += "python3-flatbuffers python3-numpy python3-lxml" COMPATIBLE_MACHINE = "(mx93-nxp-bsp)" diff --git a/recipes-libraries/neutron/neutron_1.0.0.bb b/recipes-libraries/neutron/neutron_1.0.0.bb new file mode 100644 index 0000000..2225de3 --- /dev/null +++ b/recipes-libraries/neutron/neutron_1.0.0.bb @@ -0,0 +1,43 @@ +SUMMARY = "The firmware, library and converter for i.MX Neutron NPU" +DESCRIPTION = "The firmware library and converter for i.MX Neutron NPU" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca53281cc0caa7e320d4945a896fb837" + +SRC_URI = "${NEUTRON_SRC};branch=${SRCBRANCH}" +NEUTRON_SRC ?= "git://github.com/nxp-imx/neutron.git;protocol=https" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "1c32f65741c827aabf2ab3edb03227fd25c7cfca" + +S = "${WORKDIR}/git" + +NEUTRON_TARGET = "" +NEUTRON_TARGET:mx95-nxp-bsp= "imx95" + +do_install () { + # install firmware + install -d ${D}${nonarch_base_libdir}/firmware + install -m 0644 ${S}/${NEUTRON_TARGET}/firmware/* ${D}${nonarch_base_libdir}/firmware/ + + # install header files + install -d ${D}${includedir}/neutron + cp ${S}/${NEUTRON_TARGET}/include/* ${D}${includedir}/neutron + + # install libraries + install -d ${D}${libdir} + cp --no-preserve=ownership -d ${S}/${NEUTRON_TARGET}/library/* ${D}${libdir} +} + +# The packaged binaries have been stripped of debug info, so disable +# operations accordingly. +INHIBIT_PACKAGE_DEBUG_SPLIT = "1" +INHIBIT_PACKAGE_STRIP = "1" +INHIBIT_SYSROOT_STRIP = "1" + +# Library file is unversioned +SOLIBS = ".so" +FILES_SOLIBSDEV = "" + +FILES:${PN} += "${nonarch_base_libdir}/firmware/*" +INSANE_SKIP:${PN} = "arch" + +COMPATIBLE_MACHINE = "(mx95-nxp-bsp)" diff --git a/recipes-libraries/nn-imx/nn-imx_1.3.0.bb b/recipes-libraries/nn-imx/nn-imx_1.3.0.bb deleted file mode 100644 index acfda1a..0000000 --- a/recipes-libraries/nn-imx/nn-imx_1.3.0.bb +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2020-2023 NXP -DESCRIPTION = "i.MX Neural Networks Accelerator Plugin" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=bba6cdb9c2b03c849ed4975ed9ed90dc" -DEPENDS = "imx-gpu-viv" - -SRC_URI = "${NN_IMX_SRC};branch=${SRCBRANCH}" -NN_IMX_SRC ?= "git://github.com/nxp-imx/nn-imx.git;protocol=https" -SRCBRANCH = "imx_1.3.0" -SRCREV = "da5357bb1e8bd2be4c5b50b3e8abe440102dc4b4" - -S = "${WORKDIR}/git" - -EXTRA_OEMAKE += "SDKTARGETSYSROOT=${STAGING_DIR_HOST} \ - AQROOT=`pwd` \ -" -TARGET_CC_ARCH += "${LDFLAGS}" - -do_install () { - install -d ${D}${libdir} - install -d ${D}${includedir}/OVXLIB - install -d ${D}${includedir}/nnrt - cp -d ${S}/*.so* ${D}${libdir} - cp -r ${S}/include/OVXLIB/* ${D}/${includedir}/OVXLIB - cp -r ${S}/include/nnrt/* ${D}/${includedir}/nnrt -} - -# libneuralnetworks.so is dynamically loaded and thus needed in the -# main package -FILES:${PN}-dev:remove = "${libdir}/lib*.so" -FILES:${PN} += "${libdir}/libneuralnetworks${SOLIBSDEV}" -FILES:${PN}-dev += " \ - ${libdir}/libnnrt${SOLIBSDEV} \ - ${libdir}/libovxlib${SOLIBSDEV} \ -" -INSANE_SKIP:${PN} += "dev-so" - -# Works for i.MX 8 with GPU except for 8M Mini -COMPATIBLE_MACHINE = "(^$)" -COMPATIBLE_MACHINE:imxgpu = "(mx8-nxp-bsp)" -COMPATIBLE_MACHINE:mx8mm-nxp-bsp = "(^$)" diff --git a/recipes-libraries/onnxruntime/onnxruntime-native_1.10.0.bb b/recipes-libraries/onnxruntime/onnxruntime-native_1.10.0.bb deleted file mode 100644 index 57a4a23..0000000 --- a/recipes-libraries/onnxruntime/onnxruntime-native_1.10.0.bb +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2021 NXP -DESCRIPTION = "Parts of ONNX Runtime that needs to be compiled for native system" -SECTION = "devel" -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=37b5762e07f0af8c74ce80a8bda4266b" - -# For ONNX Runtime v0.3.0 we need only 'protoc' to be compiled for native system -# 3.16.0 -GIT_protobuf = "git://github.com/google/protobuf.git;branch=main;name=protobuf;protocol=https" -SRCREV_protobuf = "2dc747c574b68a808ea4699d26942c8132fe2b09" - -SRC_URI = "\ - ${GIT_protobuf} \ -" - -SRCREV_FORMAT = "protobuf" - -S = "${WORKDIR}/git" - -inherit cmake -inherit native - -OECMAKE_SOURCEPATH = "${S}/cmake" - -EXTRA_OECMAKE += "\ - -Dprotobuf_BUILD_TESTS=OFF \ - -Dprotobuf_BUILD_EXAMPLES=OFF \ - -Dprotobuf_BUILD_SHARED_LIBS=OFF \ -" - -do_install() { - install -d ${D}/${bindir}/${PN} - install -m 0755 ${B}/protoc ${D}/${bindir}/${PN} -} diff --git a/recipes-libraries/onnxruntime/onnxruntime_1.10.0.bb b/recipes-libraries/onnxruntime/onnxruntime_1.17.1.bb similarity index 64% rename from recipes-libraries/onnxruntime/onnxruntime_1.10.0.bb rename to recipes-libraries/onnxruntime/onnxruntime_1.17.1.bb index bef39ad..ef4b3df 100644 --- a/recipes-libraries/onnxruntime/onnxruntime_1.10.0.bb +++ b/recipes-libraries/onnxruntime/onnxruntime_1.17.1.bb @@ -1,27 +1,19 @@ -# Copyright 2020-2022 NXP +# 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://${WORKDIR}/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" +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 ${BPN}-native" +DEPENDS = "libpng zlib" +inherit setuptools3 + +SRC_URI = "${ONNXRUNTIME_SRC};branch=${SRCBRANCH}" ONNXRUNTIME_SRC ?= "gitsm://github.com/nxp-imx/onnxruntime-imx.git;protocol=https" -SRCBRANCH_runtime = "lf-6.1.1_1.0.0" -SRC_URI = " \ - ${ONNXRUNTIME_SRC};branch=${SRCBRANCH_runtime};name=runtime \ - https://github.com/onnx/models/raw/${SRCREV_model}/LICENSE;name=model-license \ - https://github.com/onnx/models/raw/${SRCREV_model}/vision/classification/squeezenet/model/squeezenet1.0-9.tar.gz;name=model-squeezenet \ -" -SRC_URI[model-license.md5sum] = "3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI[model-license.sha256sum] = "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30" -SRC_URI[model-squeezenet.md5sum] = "92e240a948f9bbc92534d752eb465317" -SRC_URI[model-squeezenet.sha256sum] = "f4c9a2906a949f089bee5ef1bf9ea1c0dc1b49d5abeb1874fff3d206751d0f3b" -SRCREV_runtime = "66e3e9a93840ed1e55dc2d7e894c0ae26fb0e51e" -SRCREV_model = "6ab957a2fe61f34a76c670946f7cbd806d2cacca" -SRCREV_FORMAT = "runtime_model" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "3616ba2f9cd2b7b882252a95e171f0c0c0f1826f" S = "${WORKDIR}/git" @@ -31,30 +23,36 @@ OECMAKE_SOURCEPATH = "${S}/cmake" OECMAKE_GENERATOR = "Unix Makefiles" # Notes: -# Protobuff/Protoc: -# - protobuf is essetially built twice for native and target system -# - DONNX_CUSTOM_PROTOC_EXECUTABLE - use native protoc -# - onnxruntime_USE_PREBUILT_PB=OFF - we still need protobuf compiled from target system; although we already have native version -# Eigen: -# - the git operation within CMake fails, so we treat it as 'pre-installed' although it's fetched during fetch phase -# - the eigen_SOURCE_PATH needs to match 'destsuffix' in SRC_URI for eigen +# 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 += "\ --DONNX_CUSTOM_PROTOC_EXECUTABLE=${STAGING_BINDIR_NATIVE}/${PN}-native/protoc \ --DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ + -DCMAKE_BUILD_TYPE=RelWithDebInfo \ + -Donnxruntime_BUILD_UNIT_TESTS=ON \ " -PYTHON_DEPENDS = "${PYTHON_PN} ${PYTHON_PN}-native ${PYTHON_PN}-pip-native ${PYTHON_PN}-wheel-native ${PYTHON_PN}-setuptools-native ${PYTHON_PN}-numpy-native" -PYTHON_RDEPENDS = "${PYTHON_PN} ${PYTHON_PN}-numpy ${PYTHON_PN}-protobuf ${PYTHON_PN}-flatbuffers" +PYTHON_DEPENDS = "\ + ${PYTHON_PN} \ + ${PYTHON_PN}-pip-native \ + ${PYTHON_PN}-numpy \ + ${PYTHON_PN}-numpy-native \ + ${PYTHON_PN}-packaging-native\ + ${PYTHON_PN}-pybind11\ + ${PYTHON_PN}-pybind11-native\ +" -PACKAGECONFIG_VSI_NPU = "" -PACKAGECONFIG_VSI_NPU:mx8-nxp-bsp:imxgpu = "vsi_npu" -PACKAGECONFIG_VSI_NPU:mx8mm-nxp-bsp = "" -# The tensorflow-lite implementation for 8ULP uses CPU, and so doesn't -# support OpenVX -PACKAGECONFIG_VSI_NPU:mx8ulp-nxp-bsp = "" +PYTHON_RDEPENDS = "\ + ${PYTHON_PN} \ + ${PYTHON_PN}-numpy \ + ${PYTHON_PN}-protobuf \ + ${PYTHON_PN}-coloredlogs \ + ${PYTHON_PN}-flatbuffers \ + ${PYTHON_PN}-sympy \ +" -PACKAGECONFIG ?= "openmp reports sharedlib eigenblas nnapi python ${PACKAGECONFIG_VSI_NPU}" +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" @@ -98,7 +96,14 @@ PACKAGECONFIG[jemalloc] = "-Donnxruntime_USE_JEMALLOC=ON, -Donnxruntime_USE_JEMA 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" -PACKAGECONFIG[vsi_npu] = "-Donnxruntime_USE_VSI_NPU=ON -Donnxruntime_OVXLIB_INCLUDE=${STAGING_INCDIR}/OVXLIB, -Donnxruntime_USE_VSI_NPU=OFF, nn-imx" + +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() { @@ -111,10 +116,18 @@ do_compile:prepend() { fi } +SETUPTOOLS_SETUP_PATH = "${B}" + do_compile:append() { if ${@bb.utils.contains('PACKAGECONFIG', 'python', 'true', 'false', d)}; then - cd ${WORKDIR}/build - ${PYTHON} ${S}/setup.py bdist_wheel + # 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 } @@ -122,32 +135,51 @@ do_compile:append() { do_install:append() { CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" - # copy extracted squeezenet tarball and add Apache2 license - cp $CP_ARGS ${WORKDIR}/squeezenet ${D}${bindir}/${BP} - install -m 0644 ${WORKDIR}/LICENSE ${D}${bindir}/${BP}/squeezenet + # 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 - export PIP_DISABLE_PIP_VERSION_CHECK=1 - export PIP_NO_CACHE_DIR=1 - install -d ${D}/${PYTHON_SITEPACKAGES_DIR} - ${STAGING_BINDIR_NATIVE}/pip3 install -v \ - -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-deps \ - ${WORKDIR}/build/dist/onnxruntime-*.whl + 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 +# 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/*" -FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" # 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" - -RDEPENDS:${PN}-tests += "arm-compute-library" diff --git a/recipes-libraries/pytorch/pytorch_git.bb b/recipes-libraries/pytorch/pytorch_git.bb index d2220a4..9269ac3 100644 --- a/recipes-libraries/pytorch/pytorch_git.bb +++ b/recipes-libraries/pytorch/pytorch_git.bb @@ -1,44 +1,28 @@ -# Copyright 2020-2021 NXP +# Copyright 2020-2024 NXP SUMMARY = "Tensors and Dynamic neural networks in Python with strong GPU acceleration" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=9c57cfb31165de565a47b65b896391c2" -DEPENDS = "python3 python3-pip-native python3-wheel-native" -RDEPENDS:${PN} += "python3-core python3-numpy python3-future python3-typing-extensions" +PV = "2.0.0" -PV = "1.9.1.post2" -PYV = "cp310" +DEPENDS = "python3 python3-pip-native python3-wheel-native" +RDEPENDS:${PN} += "python3-core python3-numpy python3-future python3-typing-extensions python3-pillow numactl libjpeg-turbo lcms openjpeg" PYTORCH_SRC ?= "git://github.com/nxp-imx/pytorch-release.git;protocol=https" -SRCBRANCH = "lf-6.1.1_1.0.0" -SRCREV = "ef997d8f79877295e69e5cf34b524eea603c1fae" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "012e780225f891b90747592e254b2399d6ec07fb" SRC_URI = " \ ${PYTORCH_SRC};branch=${SRCBRANCH} \ " + inherit python3native S = "${WORKDIR}/git" do_install(){ - install -d ${D}/${PYTHON_SITEPACKAGES_DIR} install -d ${D}${bindir} install -d ${D}${bindir}/${PN}/examples install -m 0555 ${S}/examples/* ${D}${bindir}/${PN}/examples - install -m 0555 ${S}/src/build.sh ${D}${bindir}/${PN}/ - - ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v --platform linux_${TARGET_ARCH} \ - -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \ - ${S}/whl/torch-${PV}-${PYV}*.whl - - for app in `ls ${D}${PYTHON_SITEPACKAGES_DIR}/bin/*`; do - sed -i 's,^#!.*,#!/usr/bin/python3,g' $app - mv $app ${D}${bindir} - done - - rm -fr ${D}${PYTHON_SITEPACKAGES_DIR}/bin - rm -fr ${D}${PYTHON_SITEPACKAGES_DIR}/torch/bin/test_cpp_rpc } - -FILES:${PN} += "${libdir}/python*" diff --git a/recipes-libraries/pytorch/torchvision_git.bb b/recipes-libraries/pytorch/torchvision_git.bb deleted file mode 100644 index 164394a..0000000 --- a/recipes-libraries/pytorch/torchvision_git.bb +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2020-2021 NXP -SUMMARY = "The torchvision package consists of popular datasets, model architectures, and common image transformations for computer vision." -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=9c57cfb31165de565a47b65b896391c2" - -DEPENDS = "python3 python3-pip-native python3-wheel-native" -RDEPENDS:${PN} += "pytorch python3-numpy python3-future python3-pillow libjpeg-turbo" - -PV = "0.10.0" -PYV = "cp310" - -PYTORCH_SRC ?= "git://github.com/nxp-imx/pytorch-release.git;protocol=https" -SRCBRANCH = "lf-6.1.1_1.0.0" -SRCREV = "ef997d8f79877295e69e5cf34b524eea603c1fae" - -SRC_URI = " \ - ${PYTORCH_SRC};branch=${SRCBRANCH} \ -" -inherit python3native - -S = "${WORKDIR}/git" - -do_install(){ - install -d ${D}/${PYTHON_SITEPACKAGES_DIR} - - ${STAGING_BINDIR_NATIVE}/pip3 install --disable-pip-version-check -v --platform linux_${TARGET_ARCH} \ - -t ${D}/${PYTHON_SITEPACKAGES_DIR} --no-cache-dir --no-deps \ - ${S}/whl/torchvision-${PV}-${PYV}*.whl - rm -fr ${D}${PYTHON_SITEPACKAGES_DIR}/bin -} - -FILES:${PN} += "${libdir}/python*" diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite-2.10.0.inc b/recipes-libraries/tensorflow-lite/tensorflow-lite-2.16.2.inc similarity index 55% rename from recipes-libraries/tensorflow-lite/tensorflow-lite-2.10.0.inc rename to recipes-libraries/tensorflow-lite/tensorflow-lite-2.16.2.inc index 007d1ac..381ffac 100644 --- a/recipes-libraries/tensorflow-lite/tensorflow-lite-2.10.0.inc +++ b/recipes-libraries/tensorflow-lite/tensorflow-lite-2.16.2.inc @@ -1,5 +1,5 @@ # Copyright 2020-2021 NXP TENSORFLOW_LITE_SRC ?= "git://github.com/nxp-imx/tensorflow-imx.git;protocol=https" -SRCBRANCH_tf = "lf-6.1.1_1.0.0" -SRCREV_tf = "6cac366ef5b7e632305c2413875ce2d3b72c03dd" +SRCBRANCH_tf = "lf-6.6.52_2.2.0" +SRCREV_tf = "032564c4cbbc08a942553796f6365c412fc9863c" diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.10.0.bb b/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.16.2.bb similarity index 89% rename from recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.10.0.bb rename to recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.16.2.bb index a0de103..5532815 100644 --- a/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.10.0.bb +++ b/recipes-libraries/tensorflow-lite/tensorflow-lite-ethosu-delegate_2.16.2.bb @@ -8,8 +8,8 @@ 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.1_1.0.0" -SRCREV_ethosu = "4bd28d3e64d26f4d5b5ee358036b2d06f3322a57" +SRCBRANCH_ethosu = "lf-6.6.52_2.2.0" +SRCREV_ethosu = "d23886fa1fb5dc9cb2aac00f4bd85d550d33fcdf" SRCREV_FORMAT = "ethosu_tf" @@ -25,7 +25,7 @@ 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}/usr/lib/libtensorflow-lite.so \ + -DTFLITE_LIB_LOC=${STAGING_DIR_HOST}${libdir}/libtensorflow-lite.so \ ${S} \ " diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.10.0.bb b/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.16.2.bb similarity index 99% rename from recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.10.0.bb rename to recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.16.2.bb index 95001dd..191ddc0 100644 --- a/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.10.0.bb +++ b/recipes-libraries/tensorflow-lite/tensorflow-lite-host-tools_2.16.2.bb @@ -26,5 +26,4 @@ do_configure:prepend() { export HTTPS_PROXY=${https_proxy} export http_proxy=${http_proxy} export https_proxy=${https_proxy} -} - +} \ No newline at end of file diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite-neutron-delegate_2.16.2.bb b/recipes-libraries/tensorflow-lite/tensorflow-lite-neutron-delegate_2.16.2.bb new file mode 100644 index 0000000..62e601c --- /dev/null +++ b/recipes-libraries/tensorflow-lite/tensorflow-lite-neutron-delegate_2.16.2.bb @@ -0,0 +1,61 @@ +# Copyright 2023-2024 NXP +DESCRIPTION = "TensorFlow Lite Neutron Delegate" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327" + +DEPENDS = "tensorflow-lite neutron" + +require tensorflow-lite-${PV}.inc + +NEUTRON_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-neutron-delegate.git;protocol=https" +SRCBRANCH_neutron = "lf-6.6.52_2.2.0" +SRCREV_neutron = "ee5e77ae2582b24e14b0d74acdf8a1c111842005" + +SRCREV_FORMAT = "neutron_tf" + +SRC_URI = "${NEUTRON_DELEGATE_SRC};branch=${SRCBRANCH_neutron};name=neutron \ + ${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 = "(mx95-nxp-bsp)" diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate/0001-Findtim-vx.cmake-Fix-LIBDIR-for-multilib-environment.patch b/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate/0001-Findtim-vx.cmake-Fix-LIBDIR-for-multilib-environment.patch index c5d5b64..f113e4c 100644 --- a/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate/0001-Findtim-vx.cmake-Fix-LIBDIR-for-multilib-environment.patch +++ b/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate/0001-Findtim-vx.cmake-Fix-LIBDIR-for-multilib-environment.patch @@ -9,17 +9,18 @@ Signed-off-by: Cristinel Panfir 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/Findtim-vx.cmake b/cmake/modules/Findtim-vx.cmake -index 6037156..41053f1 100644 +index d0240e8..8a69d02 100644 --- a/cmake/modules/Findtim-vx.cmake +++ b/cmake/modules/Findtim-vx.cmake -@@ -36,6 +36,6 @@ if((NOT DEFINED TIM_VX_INSTALL)) +@@ -53,7 +53,7 @@ if((NOT DEFINED TIM_VX_INSTALL)) else() message("=== Building with TIM_VX_LIBRIRIES from ${TIM_VX_INSTALL} ===") include_directories(${TIM_VX_INSTALL}/include) - set(LIBDIR lib) + set(LIBDIR ${CMAKE_INSTALL_LIBDIR}) list(APPEND VX_DELEGATE_DEPENDENCIES ${TIM_VX_INSTALL}/${LIBDIR}/libtim-vx.so) - endif() + if(${TIM_VX_ENABLE_NODE_TRACE}) + list(APPEND VX_DELEGATE_DEPENDENCIES ${TIM_VX_INSTALL}/${LIBDIR}/libjsoncpp.so) -- 2.25.1 diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate_2.10.0.bb b/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate_2.16.2.bb similarity index 92% rename from recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate_2.10.0.bb rename to recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate_2.16.2.bb index c070c77..4afeb15 100644 --- a/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate_2.10.0.bb +++ b/recipes-libraries/tensorflow-lite/tensorflow-lite-vx-delegate_2.16.2.bb @@ -8,8 +8,8 @@ DEPENDS = "tensorflow-lite tim-vx" require tensorflow-lite-${PV}.inc TENSORFLOW_LITE_VX_DELEGATE_SRC ?= "git://github.com/nxp-imx/tflite-vx-delegate-imx.git;protocol=https" -SRCBRANCH_vx = "lf-6.1.1_1.0.0" -SRCREV_vx = "ae9a193a3801ae7b027df65e5ecd97724c64af12" +SRCBRANCH_vx = "lf-6.6.52_2.2.0" +SRCREV_vx = "4277fd719fc1849c3d448d77ac01af1a84dd3bf3" SRCREV_FORMAT = "vx_tf" @@ -27,7 +27,7 @@ EXTRA_OECMAKE += " \ -DFETCHCONTENT_FULLY_DISCONNECTED=OFF \ -DTIM_VX_INSTALL=${STAGING_DIR_HOST}/usr \ -DFETCHCONTENT_SOURCE_DIR_TENSORFLOW=${WORKDIR}/tfgit \ - -DTFLITE_LIB_LOC=${STAGING_DIR_HOST}/usr/lib/libtensorflow-lite.so \ + -DTFLITE_LIB_LOC=${STAGING_DIR_HOST}${libdir}/libtensorflow-lite.so \ ${S} \ " diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite_2.10.0.bb b/recipes-libraries/tensorflow-lite/tensorflow-lite_2.16.2.bb similarity index 77% rename from recipes-libraries/tensorflow-lite/tensorflow-lite_2.10.0.bb rename to recipes-libraries/tensorflow-lite/tensorflow-lite_2.16.2.bb index 218672c..52966d9 100644 --- a/recipes-libraries/tensorflow-lite/tensorflow-lite_2.10.0.bb +++ b/recipes-libraries/tensorflow-lite/tensorflow-lite_2.16.2.bb @@ -1,27 +1,28 @@ -# Copyright 2020-2021 NXP +# Copyright 2020-2021, 2024 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" + python3 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 -PACKAGECONFIG ??= "${PACKAGECONFIG_ETHOSU}" -PACKAGECONFIG_ETHOSU = "" -PACKAGECONFIG_ETHOSU:mx93-nxp-bsp = "ethosu" +PACKAGECONFIG ??= "python-example ${PACKAGECONFIG_GPU_DELEGATE}" +PACKAGECONFIG_GPU_DELEGATE = "" +PACKAGECONFIG_GPU_DELEGATE:mx95-nxp-bsp = "gpu-delegate" -PACKAGECONFIG[ethosu] = "-DTFLITE_ENABLE_ETHOSU=on,-DTFLITE_ENABLE_ETHOSU=off,ethos-u-driver-stack" +PACKAGECONFIG[gpu-delegate] = "-DTFLITE_ENABLE_GPU=on,-DTFLITE_ENABLE_GPU=off" +PACKAGECONFIG[python-example] = ",,,python3-pillow" EXTRA_OECMAKE = " \ -DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \ @@ -41,6 +42,7 @@ EXTRA_OECMAKE_BUILD = "benchmark_model label_image" CXXFLAGS += "-fPIC" + do_configure[network] = "1" do_configure:prepend() { export HTTP_PROXY=${http_proxy} @@ -79,6 +81,14 @@ do_install() { install -d ${D}${includedir}/tensorflow/core/public cp ${S}/tensorflow/core/public/version.h ${D}${includedir}/tensorflow/core/public + # install ctstring_internal.h from core + install -d ${D}${includedir}/tensorflow/core/platform + cp ${S}/tensorflow/core/platform/ctstring_internal.h ${D}${includedir}/tensorflow/core/platform + + # install ctstring_internal.h from tsl + install -d ${D}${includedir}/tsl/platform + cp ${S}/third_party/xla/third_party/tsl/tsl/platform/ctstring_internal.h ${D}${includedir}/tsl/platform + # install examples install -d ${D}${bindir}/${PN}-${PV}/examples install -m 0555 ${B}/examples/label_image/label_image ${D}${bindir}/${PN}-${PV}/examples @@ -93,7 +103,9 @@ do_install() { # Install python example - cp ${S}/tensorflow/lite/examples/python/label_image.py ${D}${bindir}/${PN}-${PV}/examples + if ${@bb.utils.contains('PACKAGECONFIG', 'python-example', 'true', 'false', d)}; then + cp ${S}/tensorflow/lite/examples/python/label_image.py ${D}${bindir}/${PN}-${PV}/examples + fi # Install mobilenet tflite file cp ${WORKDIR}/mobilenet_*.tflite ${D}${bindir}/${PN}-${PV}/examples @@ -105,17 +117,17 @@ do_install() { ${B}/tflite_pip/dist/tflite_runtime-*.whl } +PACKAGE_ARCH = "${MACHINE_SOCARCH}" + RDEPENDS:${PN} = " \ python3 \ python3-numpy \ - ${RDEPENDS_OPENVX} \ + ${RDEPENDS_OPENCL} \ " -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 = "" +RDEPENDS_OPENCL = "opencl-icd-loader-dev" +RDEPENDS_OPENCL:mx8mm-nxp-bsp = "" + +INSANE_SKIP:${PN} += "dev-deps" # TensorFlow and TensorFlow Lite both exports few files, suppress the error # SSTATE_ALLOW_OVERLAP_FILES = "${D}${includedir}" diff --git a/recipes-libraries/tensorflow-lite/tensorflow-lite_2.%.bbappend b/recipes-libraries/tensorflow-lite/tensorflow-lite_2.16.2.bbappend similarity index 100% rename from recipes-libraries/tensorflow-lite/tensorflow-lite_2.%.bbappend rename to recipes-libraries/tensorflow-lite/tensorflow-lite_2.16.2.bbappend diff --git a/recipes-libraries/tim-vx/tim-vx_1.1.42.bb b/recipes-libraries/tim-vx/tim-vx_1.2.2.bb similarity index 74% rename from recipes-libraries/tim-vx/tim-vx_1.1.42.bb rename to recipes-libraries/tim-vx/tim-vx_1.2.2.bb index 7470557..13b0920 100644 --- a/recipes-libraries/tim-vx/tim-vx_1.1.42.bb +++ b/recipes-libraries/tim-vx/tim-vx_1.2.2.bb @@ -3,14 +3,14 @@ DESCRIPTION = "TIM-VX is a software integration module provided by VeriSilicon \ to facilitate deployment of Neural-Networks on OpenVX enabled ML accelerators. It serves as \ the backend binding for runtime frameworks such as Android NN, Tensorflow-Lite, MLIR, TVM and more." LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ededf2503f5d147ae718276dfd28801f" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a223f028c6a73fd2bd9223b79a38dcf6" -DEPENDS = "imx-gpu-viv nn-imx" +DEPENDS = "imx-gpu-viv" -TIM_VX_SRC ?= "git://github.com/nxp-imx/tim-vx-imx.git;protocol=https" -SRCBRANCH = "lf-6.1.1_1.0.0" -SRCREV = "f66e297e4bd4e4ef810f4fd527ff49559c01438d" SRC_URI = "${TIM_VX_SRC};branch=${SRCBRANCH}" +TIM_VX_SRC ?= "git://github.com/nxp-imx/tim-vx-imx.git;protocol=https" +SRCBRANCH = "lf-6.6.52_2.2.0" +SRCREV = "8c5bf6150903e14275b5c6b6b63a7035ce60dde1" S = "${WORKDIR}/git" @@ -20,8 +20,7 @@ EXTRA_OECMAKE = " \ -DCONFIG=YOCTO \ -DCMAKE_SYSROOT=${PKG_CONFIG_SYSROOT_DIR} \ -DTIM_VX_ENABLE_TEST=off \ - -DTIM_VX_USE_EXTERNAL_OVXLIB=on \ - -DOVXLIB_INC=${PKG_CONFIG_SYSROOT_DIR}/usr/include/OVXLIB \ + -DTIM_VX_USE_EXTERNAL_OVXLIB=off \ " # Output library is unversioned diff --git a/recipes-libraries/tvm/tvm_0.7.0.bb b/recipes-libraries/tvm/tvm_0.7.0.bb index c704181..5b24442 100644 --- a/recipes-libraries/tvm/tvm_0.7.0.bb +++ b/recipes-libraries/tvm/tvm_0.7.0.bb @@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=e313a9b6eda820e35716d9529001537f \ DEPENDS = "tim-vx" RDEPENDS:${PN} = "tim-vx python3-decorator python3-numpy python3-attrs python3-psutil python3" -SRCBRANCH = "lf-6.1.1_1.0.0" +SRCBRANCH = "lf-6.6.52_2.2.0" TVM_SRC ?= "git://github.com/nxp-imx/eiq-tvm-imx.git;protocol=https" SRC_URI = "${TVM_SRC};branch=${SRCBRANCH}\ git://github.com/dmlc/dlpack;protocol=https;nobranch=1;destsuffix=${S}/3rdparty/dlpack;name=dlpack \ @@ -25,12 +25,14 @@ SRC_URI = "${TVM_SRC};branch=${SRCBRANCH}\ file://tvm_runtime.pc.in \ " -SRCREV = "c8fc7971a23cb2da3154eb19e41d546ad9e77e65" +SRCREV = "4f710ec5796ac0eb0b0a23d3c808ca68e13173f6" SRCREV_dlpack = "3ec04430e89a6834e5a1b99471f415fa939bf642" SRCREV_dmlc-core = "6c401e242c59a1f4c913918246591bb13fd714e7" SRCREV_rang = "cabe04d6d6b05356fa8f9741704924788f0dd762" SRCREV_vta-hw = "87ce9acfae550d1a487746e9d06c2e250076e54c" +SRCREV_FORMAT = "default_dlpack_dmlc-core_rang_vta-hw" + S = "${WORKDIR}/git" SETUPTOOLS_SETUP_PATH = "${S}/python" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0_%.imx.bbappend b/recipes-multimedia/gstreamer/gstreamer1.0_%.imx.bbappend new file mode 100644 index 0000000..7e5f503 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0_%.imx.bbappend @@ -0,0 +1,2 @@ +PACKAGECONFIG:append:mx8-nxp-bsp = " tracer-hooks" +PACKAGECONFIG:append:mx9-nxp-bsp = " tracer-hooks" diff --git a/recipes-nnstreamer/nnshark/nnshark_2023.11.imx.bb b/recipes-nnstreamer/nnshark/nnshark_2023.11.imx.bb new file mode 100644 index 0000000..d167632 --- /dev/null +++ b/recipes-nnstreamer/nnshark/nnshark_2023.11.imx.bb @@ -0,0 +1,40 @@ +SUMMARY = "A GStreamer NNstreamer pipelines real-time profiling plugin" +HOMEPAGE = "https://github.com/nnstreamer/nnshark" + +LICENSE = "GPL-2.0-only & LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=e1caa368743492879002ad032445fa97 \ + file://COPYING.LESSER;md5=66c40c88533cd228b5b85936709801c8" +DEPENDS = "\ + gtk-doc-native \ + gstreamer1.0 \ + gstreamer1.0-plugins-base \ + gstreamer1.0-plugins-bad \ + libgpuperfcnt \ + perf \ +" + +NNSHARK_SRC ?= "gitsm://github.com/nxp-imx/nnshark.git;protocol=https" +SRCBRANCH ?= "2023.11.imx" +SRC_URI = "${NNSHARK_SRC};branch=${SRCBRANCH}" +SRCREV = "4ed66906b889e66a6458a1d2692790f64bf1c556" + +S = "${WORKDIR}/git" + +inherit pkgconfig autotools-brokensep + +EXTRA_OECONF = " \ + --disable-graphviz \ + --disable-gtk-doc \ +" + + +do_configure:prepend() { + sh autogen.sh --noconfigure +} + +FILES:${PN} += "\ + ${libdir}/gstreamer-1.0/libgstsharktracers.so \ + ${libdir}/gstreamer-1.0/libgstsharktracers.la \ +" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" diff --git a/recipes-nnstreamer/nnstreamer-edge/nnstreamer-edge_0.1.0.bb b/recipes-nnstreamer/nnstreamer-edge/nnstreamer-edge_0.2.4.bb similarity index 85% rename from recipes-nnstreamer/nnstreamer-edge/nnstreamer-edge_0.1.0.bb rename to recipes-nnstreamer/nnstreamer-edge/nnstreamer-edge_0.2.4.bb index b797ccc..3f11c3b 100644 --- a/recipes-nnstreamer/nnstreamer-edge/nnstreamer-edge_0.1.0.bb +++ b/recipes-nnstreamer/nnstreamer-edge/nnstreamer-edge_0.2.4.bb @@ -8,8 +8,8 @@ DEPENDS = "\ " NNS_EDGE_SRC ?= "git://github.com/nnstreamer/nnstreamer-edge.git;protocol=https" -SRCBRANCH = "lts/0.1.0.b" -SRCREV = "2efc10afd1161a025fa3848aca487fb9a665f3c0" +SRCBRANCH = "lts/0.2.4.b" +SRCREV = "2bf50d57f0f8d856ae38cf82b0a0f3746f46a08a" SRC_URI = "${NNS_EDGE_SRC};branch=${SRCBRANCH}" S = "${WORKDIR}/git" diff --git a/recipes-nnstreamer/nnstreamer/nnstreamer/0001-AIR-11938-tensor-filter-use-memcpy-ethosu-delegate.patch b/recipes-nnstreamer/nnstreamer/nnstreamer/0001-AIR-11938-tensor-filter-use-memcpy-ethosu-delegate.patch new file mode 100644 index 0000000..d52b697 --- /dev/null +++ b/recipes-nnstreamer/nnstreamer/nnstreamer/0001-AIR-11938-tensor-filter-use-memcpy-ethosu-delegate.patch @@ -0,0 +1,61 @@ +From baa131798d24b6b23f6891978e0e69de8a5954d1 Mon Sep 17 00:00:00 2001 +From: Nicolas +Date: Fri, 6 Sep 2024 17:02:43 +0200 +Subject: [PATCH] AIR-11938: tensor-filter-use-memcpy-ethosu-delegate + +Upstream-Status: Inappropriate [i.MX specific] + +Signed-off-by: Nicolas +--- + .../tensor_filter/tensor_filter_tensorflow_lite.cc | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc +index 78b7df33..040bc29e 100644 +--- a/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc ++++ b/ext/nnstreamer/tensor_filter/tensor_filter_tensorflow_lite.cc +@@ -218,6 +218,7 @@ class TFLiteInterpreter + char *model_path; + bool is_cached_after_first_invoke; /**< To cache again after first invoke */ + bool is_xnnpack_delegated; /**< To check if XNNPACK delegate is used */ ++ bool is_ethosu_delegated; + char *ext_delegate_path; /**< path to external delegate lib */ + GHashTable *ext_delegate_kv_table; /**< external delegate key values options */ + +@@ -301,6 +302,7 @@ TFLiteInterpreter::TFLiteInterpreter () + + is_cached_after_first_invoke = false; + is_xnnpack_delegated = false; ++ is_ethosu_delegated = false; + } + + /** +@@ -335,7 +337,7 @@ TFLiteInterpreter::invoke (const GstTensorMemory *input, GstTensorMemory *output + * Therefore tensor data is to be manually copied from/to input/output + * GStreamer buffers memory whose address changes at every round. + */ +- if (is_xnnpack_delegated) { ++ if (is_xnnpack_delegated || is_ethosu_delegated) { + for (unsigned int i = 0; i < inputTensorMeta.num_tensors; ++i) { + tensor_ptr = inputTensorPtr[i]; + g_assert (tensor_ptr->bytes == input[i].size); +@@ -364,7 +366,7 @@ TFLiteInterpreter::invoke (const GstTensorMemory *input, GstTensorMemory *output + * After the very first invoke, the output buffer address may change. + * To handle the case, memcpy the output buffer directly. + */ +- if (is_xnnpack_delegated || !is_cached_after_first_invoke) { ++ if (is_xnnpack_delegated || is_ethosu_delegated || !is_cached_after_first_invoke) { + for (unsigned int i = 0; i < outputTensorMeta.num_tensors; ++i) { + tensor_ptr = outputTensorPtr[i]; + g_assert (tensor_ptr->bytes == output[i].size); +@@ -523,7 +525,9 @@ TFLiteInterpreter::loadModel (int num_threads, tflite_delegate_e delegate_e) + TfLiteExternalDelegateOptions options; + + options = TfLiteExternalDelegateOptionsDefault (ext_delegate_path); +- ++ if (strcmp(ext_delegate_path, "libethosu_delegate.so") == 0){ ++ is_ethosu_delegated = true; ++ } + /* Add optional key values to delegate configuration */ + if (ext_delegate_kv_table) { + GHashTable *table = ext_delegate_kv_table; diff --git a/recipes-nnstreamer/nnstreamer/nnstreamer/0001-PATCH-increase-to-cpp17-version.patch b/recipes-nnstreamer/nnstreamer/nnstreamer/0001-PATCH-increase-to-cpp17-version.patch new file mode 100644 index 0000000..6d98870 --- /dev/null +++ b/recipes-nnstreamer/nnstreamer/nnstreamer/0001-PATCH-increase-to-cpp17-version.patch @@ -0,0 +1,26 @@ +From 4e5cd19246966c61bfa6ef3d203a048e0dcbb7f3 Mon Sep 17 00:00:00 2001 +From: Nicolas +Date: Thu, 2 May 2024 10:33:32 +0200 +Subject: [PATCH] [PATCH] increase to cpp17 version + +Upstream-Status: Pending +Signed-off-by: Tom Hochstein +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index de26b948..fdd4267a 100644 +--- a/meson.build ++++ b/meson.build +@@ -9,7 +9,7 @@ project('nnstreamer', 'c', 'cpp', + 'werror=true', + 'warning_level=2', + 'c_std=gnu89', +- 'cpp_std=c++14' ++ 'cpp_std=c++17' + ] + ) + +-- +2.25.1 diff --git a/recipes-nnstreamer/nnstreamer/nnstreamer_2.2.0.bb b/recipes-nnstreamer/nnstreamer/nnstreamer_2.4.0.bb similarity index 85% rename from recipes-nnstreamer/nnstreamer/nnstreamer_2.2.0.bb rename to recipes-nnstreamer/nnstreamer/nnstreamer_2.4.0.bb index f2a7969..5c41a4f 100644 --- a/recipes-nnstreamer/nnstreamer/nnstreamer_2.2.0.bb +++ b/recipes-nnstreamer/nnstreamer/nnstreamer_2.4.0.bb @@ -18,10 +18,11 @@ DEPENDS = "\ libpng \ " -SRCREV = "f82789170b8f2696e50cbc5027b74b767f5e9415" -SRC_URI = "\ - git://github.com/nnstreamer/nnstreamer.git;branch=main;protocol=https \ -" +SRCREV = "807060954acfdb6cec130559d00eef1af61457cf" +SRC_URI = "git://github.com/nnstreamer/nnstreamer.git;branch=lts/2.4.0.b;protocol=https \ + file://0001-PATCH-increase-to-cpp17-version.patch \ + file://0001-AIR-11938-tensor-filter-use-memcpy-ethosu-delegate.patch \ + " # Use git instead of quilt as patch tool to support patches with binary content PATCHTOOL = "git" @@ -32,16 +33,11 @@ inherit meson pkgconfig PACKAGECONFIG ??= "protobuf python3 query ${PACKAGECONFIG_SOC}" PACKAGECONFIG_SOC ??= "" -PACKAGECONFIG_SOC:mx8-nxp-bsp:imxgpu ??= "deepview-rt tensorflow-lite" -PACKAGECONFIG_SOC:mx8mp-nxp-bsp ??= "deepview-rt tensorflow-lite tvm" -PACKAGECONFIG_SOC:mx9-nxp-bsp ??= "deepview-rt tensorflow-lite" -PACKAGECONFIG[deepview-rt] = "\ - -Ddeepview-rt-support=enabled, \ - -Ddeepview-rt-support=disabled, \ - deepview-rt, \ - ,,\ -" + +PACKAGECONFIG_SOC:mx8-nxp-bsp:imxgpu ??= "tensorflow-lite" +PACKAGECONFIG_SOC:mx8mp-nxp-bsp ??= "tensorflow-lite tvm" +PACKAGECONFIG_SOC:mx9-nxp-bsp ??= "tensorflow-lite" PACKAGECONFIG[flatbuf] = "\ -Dflatbuf-support=enabled, \ @@ -110,8 +106,6 @@ do_install:append() { PACKAGES =+ "\ ${PN}-unittest \ - ${@bb.utils.contains('PACKAGECONFIG', 'armnn','${PN}-armnn', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'deepview-rt','${PN}-deepview-rt', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'flatbuf','${PN}-flatbuf', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'flatbuf grpc','${PN}-grpc-flatbuf', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'grpc','${PN}-grpc', '', d)} \ @@ -128,8 +122,6 @@ RDEPENDS:${PN} = "\ " RDEPENDS:${PN}-unittest = "gstreamer1.0-plugins-good nnstreamer ssat \ - ${@bb.utils.contains('PACKAGECONFIG', 'armnn','${PN}-armnn', '', d)} \ - ${@bb.utils.contains('PACKAGECONFIG', 'deepview-rt','${PN}-deepview-rt', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'flatbuf','${PN}-flatbuf', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'flatbuf grpc','${PN}-grpc-flatbuf', '', d)} \ ${@bb.utils.contains('PACKAGECONFIG', 'grpc','${PN}-grpc', '', d)} \ @@ -148,14 +140,6 @@ FILES:${PN} += "\ ${sysconfdir}/nnstreamer.ini \ " -FILES:${PN}-armnn = "\ - ${libdir}/nnstreamer/filters/libnnstreamer_filter_armnn.so \ -" - -FILES:${PN}-deepview-rt = "\ - ${libdir}/nnstreamer/filters/libnnstreamer_filter_deepview-rt.so \ -" - FILES:${PN}-dev = "\ ${includedir}/nnstreamer/* \ ${libdir}/*.a \