summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaveen Saini <naveen.kumar.saini@intel.com>2023-11-30 13:20:07 +0800
committerKhem Raj <raj.khem@gmail.com>2023-11-29 22:25:05 -0800
commit6fbe5001895a132644665fafa8b1676507023b90 (patch)
treec7e7c02b359d93716652500e04c015830464fed9
parentd5f16f18c3b45b9549edf65a0921883d22503274 (diff)
downloadmeta-openembedded-6fbe5001895a132644665fafa8b1676507023b90.tar.gz
tbb: enable NUMA/Hybrid CPU support
oneTBB relies on HWLOC* to identify the underlying topology of the system to optimize thread scheduling and memory allocation. Ref: https://oneapi-src.github.io/oneTBB/GSG/next_steps.html#hybrid-cpu-and-numa-support Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch33
-rw-r--r--meta-oe/recipes-support/tbb/tbb_2021.11.0.bb12
2 files changed, 44 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch b/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch
new file mode 100644
index 0000000000..640b131703
--- /dev/null
+++ b/meta-oe/recipes-support/tbb/tbb/0001-hwloc_detection.cmake-remove-cross-compiation-check.patch
@@ -0,0 +1,33 @@
1From 7ffc1eba8596544d6e3af0fd5f4004fff6d56f84 Mon Sep 17 00:00:00 2001
2From: Naveen Saini <naveen.kumar.saini@intel.com>
3Date: Wed, 29 Nov 2023 15:48:57 +0800
4Subject: [PATCH] hwloc_detection.cmake: remove cross-compiation check
5
6This check is preventing pkgconfig to
7search for hwloc under cross-compilation.
8
9pkgconfig able to find hwloc pkg from sysroot.
10
11Upstream-Status: Inappropriate
12
13Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
14---
15 cmake/hwloc_detection.cmake | 2 --
16 1 file changed, 2 deletions(-)
17
18diff --git a/cmake/hwloc_detection.cmake b/cmake/hwloc_detection.cmake
19index 47233b17..5a7e84c3 100644
20--- a/cmake/hwloc_detection.cmake
21+++ b/cmake/hwloc_detection.cmake
22@@ -46,8 +46,6 @@ endforeach()
23 unset(HWLOC_TARGET_NAME)
24
25 if (NOT HWLOC_TARGET_EXPLICITLY_DEFINED AND
26- # No hwloc auto detection for cross compilation
27- NOT CMAKE_CROSSCOMPILING AND
28 NOT TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH
29 )
30 find_package(PkgConfig QUIET)
31--
322.37.3
33
diff --git a/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb b/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb
index 1a1d9988bc..f834726bd6 100644
--- a/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb
+++ b/meta-oe/recipes-support/tbb/tbb_2021.11.0.bb
@@ -8,22 +8,25 @@ LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327" 8LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=86d3f3a95c324c9479bd8986968f4327"
9 9
10DEPENDS:append:libc-musl = " libucontext" 10DEPENDS:append:libc-musl = " libucontext"
11DEPENDS:append:class-target = " hwloc"
11 12
12PE = "1" 13PE = "1"
13 14
14BRANCH = "onetbb_2021" 15BRANCH = "onetbb_2021"
15SRCREV = "8b829acc65569019edb896c5150d427f288e8aba" 16SRCREV = "8b829acc65569019edb896c5150d427f288e8aba"
16SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \ 17SRC_URI = "git://github.com/oneapi-src/oneTBB.git;protocol=https;branch=${BRANCH} \
18 file://0001-hwloc_detection.cmake-remove-cross-compiation-check.patch \
17" 19"
18S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"
19 21
20inherit cmake 22inherit cmake pkgconfig
21 23
22# test build fails, error: 'mallinfo mallinfo()' is deprecated 24# test build fails, error: 'mallinfo mallinfo()' is deprecated
23EXTRA_OECMAKE += " \ 25EXTRA_OECMAKE += " \
24 -DTBB_TEST=OFF \ 26 -DTBB_TEST=OFF \
25 -DCMAKE_BUILD_TYPE=Release \ 27 -DCMAKE_BUILD_TYPE=Release \
26 " 28 "
29
27# Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi) 30# Hard-float 'd' ABI can't be used for a target that doesn't support the D instruction set extension (ignoring target-abi)
28# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules 31# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: /tmp/lto-llvm-264bc2.o: can't link soft-float modules with double-float modules
29# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o 32# tmp-glibc/work/riscv64-oe-linux/tbb/1_2021.7.0-r0/recipe-sysroot-native/usr/bin/riscv64-oe-linux/riscv64-oe-linux-ld: failed to merge target specific data of file /tmp/lto-llvm-264bc2.o
@@ -49,4 +52,11 @@ LDFLAGS:append:libc-musl = " -lucontext"
49# The latest version of oneTBB does not support PPC 52# The latest version of oneTBB does not support PPC
50COMPATIBLE_MACHINE:powerpc = "(!.*ppc).*" 53COMPATIBLE_MACHINE:powerpc = "(!.*ppc).*"
51 54
55
56do_install:append:class-target() {
57 # fix for qa check buildpaths
58 sed -i "s#${RECIPE_SYSROOT}##g" ${D}${libdir}/cmake/TBB/TBBTargets.cmake
59}
60
61
52BBCLASSEXTEND = "native nativesdk" 62BBCLASSEXTEND = "native nativesdk"