All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: afd@ti.com
Cc: Denys Dmytriyenko <denys@konsulko.com>,
	Ryan Eatmon <reatmon@ti.com>, Chirag Shilwant <c-shilwant@ti.com>,
	meta-arago@lists.yoctoproject.org
Subject: Re: [meta-arago][scarthgap/master][PATCH 2/4] meta-arago-extras: Add recipe for Arm NN
Date: Wed, 5 Feb 2025 15:12:48 -0500	[thread overview]
Message-ID: <20250205201248.GO21608@denix.org> (raw)
In-Reply-To: <20250203185953.269693-3-afd@ti.com>

On Mon, Feb 03, 2025 at 12:59:51PM -0600, Andrew Davis via lists.yoctoproject.org wrote:
> Arm NN is a performant machine learning inference engine for Linux,
> accelerating ML on Arm Cortex-A CPUs.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>  ...01-Fix-type-casting-for-32bit-builds.patch | 40 +++++++++++
>  .../recipes-devtools/armnn/armnn_24.11.bb     | 70 +++++++++++++++++++
>  2 files changed, 110 insertions(+)
>  create mode 100644 meta-arago-extras/recipes-devtools/armnn/armnn/0001-Fix-type-casting-for-32bit-builds.patch
>  create mode 100644 meta-arago-extras/recipes-devtools/armnn/armnn_24.11.bb

...

> diff --git a/meta-arago-extras/recipes-devtools/armnn/armnn_24.11.bb b/meta-arago-extras/recipes-devtools/armnn/armnn_24.11.bb
> new file mode 100644
> index 00000000..e965382a
> --- /dev/null
> +++ b/meta-arago-extras/recipes-devtools/armnn/armnn_24.11.bb
> @@ -0,0 +1,70 @@
> +SUMMARY = "ARM Neural Network SDK"
> +DESCRIPTION = "Linux software and tools to enable machine learning workloads on power-efficient devices"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=3e14a924c16f7d828b8335a59da64074"
> +
> +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"

This is the default - why do you need to set it explicitly?


> +BRANCH = "branches/armnn_24_11"
> +SRC_URI = "git://github.com/ARM-software/armnn.git;branch=${BRANCH};protocol=https"
> +SRC_URI += "file://0001-Fix-type-casting-for-32bit-builds.patch"
> +
> +# v24.11
> +SRCREV = "3ed70c005559d409feff2c578a1a39cf8fec8804"
> +
> +S = "${WORKDIR}/git"
> +
> +inherit cmake
> +inherit pkgconfig
> +
> +DEPENDS = " \
> +    boost \
> +    protobuf \
> +    xxd-native \
> +    arm-compute-library \
> +"
> +
> +RDEPENDS:${PN} = " \
> +    arm-compute-library \
> +    protobuf \
> +    boost \

All these are listed in the DEPENDS and will be carried over to RDEPENDS 
automatically, no need to list them explicitly, unless shlib logic is 
completely screwed, in which case you better mention that in the commit log.


> +"
> +
> +PACKAGECONFIG += "unit-tests tests ref"
> +PACKAGECONFIG += "${@bb.utils.contains('TARGET_ARCH', 'aarch64', 'neon', '', d)}"
> +PACKAGECONFIG += "${@bb.utils.contains('TARGET_ARCH', 'arm', 'neon', '', d)}"
> +
> +PACKAGECONFIG[neon] = "-DARMCOMPUTENEON=1, -DARMCOMPUTENEON=0"
> +PACKAGECONFIG[unit-tests] = "-DBUILD_UNIT_TESTS=1, -DBUILD_UNIT_TESTS=0"
> +PACKAGECONFIG[tests] = "-DBUILD_TESTS=1, -DBUILD_TESTS=0"
> +PACKAGECONFIG[ref] = "-DARMNNREF=1, -DARMNNREF=0"
> +
> +EXTRA_OECMAKE += " \
> +    -DHALF_INCLUDE=${STAGING_DIR_TARGET} \
> +"
> +
> +do_install:append() {
> +    CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
> +
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'tests', 'true', 'false', d)}; then
> +        install -d ${D}${bindir}/${P}
> +        find ${B}/tests -maxdepth 1 -type f -executable -exec cp $CP_ARGS {} ${D}${bindir}/${P} \;
> +    fi
> +
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'unit-tests', 'true', 'false', d)}; then
> +        install -d ${D}${bindir}/${P}
> +        cp $CP_ARGS ${B}/UnitTests ${D}${bindir}/${P}
> +    fi
> +
> +    if ${@bb.utils.contains('PACKAGECONFIG', 'tensorflow-lite', 'false', 'true', d)}; then
> +        rm -rf ${D}${includedir}/armnnTfLiteParser
> +    fi
> +}
> +
> +CXXFLAGS += "-Wno-error=array-bounds -Wno-error=deprecated-declarations -Wno-error=nonnull"
> +
> +FILES:${PN} += "${libdir}/*"
> +FILES:${PN}-dev += "${includedir}/* ${libdir}/cmake/armnn/* ${libdir}/pkgconfig/*.pc ${bindir}/*"
> +
> +INSANE_SKIP:${PN} = "dev-so"
> +INSANE_SKIP:${PN}-dev += "buildpaths"
> -- 
> 2.39.2


  reply	other threads:[~2025-02-05 20:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 18:59 [meta-arago][scarthgap/master][PATCH 0/4] Add ML frameworks Andrew Davis
2025-02-03 18:59 ` [meta-arago][scarthgap/master][PATCH 1/4] meta-arago-extras: Add recipe for arm-compute-library Andrew Davis
2025-02-05 20:07   ` Denys Dmytriyenko
2025-02-05 20:27     ` Andrew Davis
2025-02-03 18:59 ` [meta-arago][scarthgap/master][PATCH 2/4] meta-arago-extras: Add recipe for Arm NN Andrew Davis
2025-02-05 20:12   ` Denys Dmytriyenko [this message]
2025-02-05 20:55     ` Andrew Davis
2025-02-03 18:59 ` [meta-arago][scarthgap/master][PATCH 3/4] meta-arago-extras: Add recipe for ONNX Andrew Davis
2025-02-03 18:59 ` [meta-arago][scarthgap/master][PATCH 4/4] meta-arago-extras: Add recipe for ONNX Runtime Andrew Davis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250205201248.GO21608@denix.org \
    --to=denis@denix.org \
    --cc=afd@ti.com \
    --cc=c-shilwant@ti.com \
    --cc=denys@konsulko.com \
    --cc=meta-arago@lists.yoctoproject.org \
    --cc=reatmon@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.