On 2/5/25 2:07 PM, Denys Dmytriyenko wrote:
On Mon, Feb 03, 2025 at 12:59:50PM -0600, Andrew Davis via 
lists.yoctoproject.org wrote:
The Compute Library is a collection of low-level machine learning
functions optimized for Arm. This will be used for ARMNN and
other machine learning applications and frameworks.

Signed-off-by: Andrew Davis <[email protected]>
---
  ...-indention-in-cmake-generator-script.patch | 130 ++++++++++++
  ...ENABLE_NEON-in-code-for-checking-NEO.patch | 114 ++++++++++
  ...ENABLE_SVE-in-code-for-checking-SVE-.patch | 197 ++++++++++++++++++
  ...rce-files-at-library-definition-time.patch | 167 +++++++++++++++
  ...ptions-for-SVE-SVE2-and-BF16-support.patch | 112 ++++++++++
  ...SVE2-support-to-be-disabled-in-CMake.patch |  91 ++++++++
  .../0007-Allow-ARMv7-builds-using-CMake.patch |  86 ++++++++
  ...ymbol-error-when-building-TensorInfo.patch |  46 ++++
  .../arm-compute-library_24.12.bb              |  89 ++++++++
  9 files changed, 1032 insertions(+)
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0001-fix-Fix-indention-in-cmake-generator-script.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0002-Use-ARM_COMPUTE_ENABLE_NEON-in-code-for-checking-NEO.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0003-Use-ARM_COMPUTE_ENABLE_SVE-in-code-for-checking-SVE-.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0004-Add-source-files-at-library-definition-time.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0005-Add-CMake-options-for-SVE-SVE2-and-BF16-support.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0006-Allow-SVE-and-SVE2-support-to-be-disabled-in-CMake.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0007-Allow-ARMv7-builds-using-CMake.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library/0008-Fix-undefined-symbol-error-when-building-TensorInfo.patch
  create mode 100644 
meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library_24.12.bb

diff --git 
a/meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library_24.12.bb
 
b/meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library_24.12.bb
new file mode 100644
index 00000000..383b02fb
--- /dev/null
+++ 
b/meta-arago-extras/recipes-devtools/arm-compute-library/arm-compute-library_24.12.bb
@@ -0,0 +1,89 @@
+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://LICENSES/MIT.txt;md5=35f8944fae972976691f3483b0ac9dba"
+
+SRC_URI = " \
+    
git://github.com/ARM-software/ComputeLibrary.git;branch=main;protocol=https \
+    file://0001-fix-Fix-indention-in-cmake-generator-script.patch \
+    file://0002-Use-ARM_COMPUTE_ENABLE_NEON-in-code-for-checking-NEO.patch \
+    file://0003-Use-ARM_COMPUTE_ENABLE_SVE-in-code-for-checking-SVE-.patch \
+    file://0004-Add-source-files-at-library-definition-time.patch \
+    file://0005-Add-CMake-options-for-SVE-SVE2-and-BF16-support.patch \
+    file://0006-Allow-SVE-and-SVE2-support-to-be-disabled-in-CMake.patch \
+    file://0007-Allow-ARMv7-builds-using-CMake.patch \
+    file://0008-Fix-undefined-symbol-error-when-building-TensorInfo.patch \
+"
+SRCREV = "32bcced2af7feea6969dd1d22e58d0718dc488e3"
+
+S = "${WORKDIR}/git"
+
+# Only compatible with armv7, armv7ve, and aarch64
+COMPATIBLE_MACHINE = "(^$)"
+COMPATIBLE_MACHINE:aarch64 = "(.*)"
+COMPATIBLE_MACHINE:armv7a = 
"${@bb.utils.contains("TUNE_FEATURES","neon","(.*)","(^$)",d)}"
+COMPATIBLE_MACHINE:armv7ve = 
"${@bb.utils.contains("TUNE_FEATURES","neon","(.*)","(^$)",d)}"

Seems excessive...

Will this work:

COMPATIBLE_MACHINE = "(armv7a|aarch64)"

If you do want to specifically check for "neon" being enabled, you can still
skip armv7ve, as armv7a check will also apply to armv7ve...


I do need to check for NEON specifically like this as there
are armv7a and armv7ve machines with it disabled, and this
will not work for them.

As for skipping the check armv7ve it does seem like that would
work, but I see them checked individually all over core layers
for some reason, so wanted to follow that. For a random example:

https://git.openembedded.org/openembedded-core/tree/meta/recipes-extended/ghostscript/ghostscript_10.04.0.bb#n47


+
+inherit cmake
+
+PACKAGECONFIG ??= "examples tests cppthreads openmp"
+
+PACKAGECONFIG[Werror] = "-DARM_COMPUTE_WERROR=ON,-DARM_COMPUTE_WERROR=OFF"
+PACKAGECONFIG[examples] = 
"-DARM_COMPUTE_BUILD_EXAMPLES=ON,-DARM_COMPUTE_BUILD_EXAMPLES=OFF"
+PACKAGECONFIG[tests] = 
"-DARM_COMPUTE_BUILD_TESTING=ON,-DARM_COMPUTE_BUILD_TESTING=OFF"
+PACKAGECONFIG[cppthreads] = 
"-DARM_COMPUTE_CPPTHREADS=ON,-DARM_COMPUTE_CPPTHREADS=OFF"
+PACKAGECONFIG[openmp] = "-DARM_COMPUTE_OPENMP=ON,-DARM_COMPUTE_OPENMP=OFF"
+
+EXTRA_OECMAKE:append:aarch64 = " \
+       -DARM_COMPUTE_ARCH=armv8-a \
+       -DENABLE_NEON=ON \
+       -DENABLE_SVE=OFF \
+       -DENABLE_SVE2=OFF \
+"
+EXTRA_OECMAKE:append:arm = " \

And here, the override should probably be armv7a, not arm? I know you set
COMPATIBLE_MACHINE above to prevent armv4/v5/v6 from even coming here, but
still...


Maybe, but that seems overly constraining then, for instance if this
package gains support for additional ARM versions like armv6, then I
would have to change this back to just arm, instead of just relaxing
the COMPATIBLE_MACHINE lines above.

Andrew


+       -DARM_COMPUTE_ARCH=armv7-a \
+       -DENABLE_NEON=ON \
+       -DENABLE_SVE=OFF \
+       -DENABLE_SVE2=OFF \
+       -DARM_COMPUTE_ENABLE_BF16=OFF \
+       -DARM_COMPUTE_ENABLE_FIXED_FORMAT_KERNELS=OFF \
+"
+
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#15823): 
https://lists.yoctoproject.org/g/meta-arago/message/15823
Mute This Topic: https://lists.yoctoproject.org/mt/110977541/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-arago/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to