diff options
-rw-r--r-- | dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch | 34 | ||||
-rw-r--r-- | dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch | 33 | ||||
-rwxr-xr-x | dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest (renamed from recipes-core/mkl-dnn/files/run-ptest) | 0 | ||||
-rw-r--r-- | dynamic-layers/clang-layer/recipes-core/dnn/onednn_1.4.bb (renamed from recipes-core/mkl-dnn/mkl-dnn_1.2.2.bb) | 32 |
4 files changed, 85 insertions, 14 deletions
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch b/dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch new file mode 100644 index 00000000..aee0934a --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 89ebbee73ff0af48eaaec63335b749a176a317bb Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 21 Apr 2020 09:18:09 +0800 | ||
4 | Subject: [PATCH 1/2] src/CMakeLists.txt: fix FindOpenCL.cmake source path | ||
5 | |||
6 | The existing logic doesn't work when DESTDIR is being passed to cmake. | ||
7 | The file is installed in DESTDIR/CMAKE_INSTALL_PREFIX/libdir while we're | ||
8 | trying to copy it from CMAKE_INSTALL_PREFIX/libdir. | ||
9 | |||
10 | Use the file from source tree instead. | ||
11 | |||
12 | Upstream-Status: Submitted | ||
13 | |||
14 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
15 | --- | ||
16 | src/CMakeLists.txt | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
20 | index 88e318923..0c99fefae 100644 | ||
21 | --- a/src/CMakeLists.txt | ||
22 | +++ b/src/CMakeLists.txt | ||
23 | @@ -203,7 +203,7 @@ if(DNNL_GPU_RUNTIME STREQUAL "OCL") | ||
24 | install(FILES | ||
25 | "../cmake/FindOpenCL.cmake" | ||
26 | DESTINATION ${LIB_CONFIG_INSTALL_DIR}) | ||
27 | - install(FILES "${CMAKE_INSTALL_PREFIX}/${LIB_CONFIG_INSTALL_DIR}/FindOpenCL.cmake" | ||
28 | + install(FILES "../cmake/FindOpenCL.cmake" | ||
29 | DESTINATION ${LIB_CONFIG_INSTALL_DIR_COMPAT}) | ||
30 | endif() | ||
31 | |||
32 | -- | ||
33 | 2.25.3 | ||
34 | |||
diff --git a/dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch b/dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch new file mode 100644 index 00000000..02c0f81e --- /dev/null +++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 3693305c9497f940b011e3e8b9d707d4f8075234 Mon Sep 17 00:00:00 2001 | ||
2 | From: Anuj Mittal <anuj.mittal@intel.com> | ||
3 | Date: Tue, 21 Apr 2020 09:19:38 +0800 | ||
4 | Subject: [PATCH 2/2] src/CMakeLists.txt: use value of DESTDIR | ||
5 | |||
6 | Make sure that we're using the value of DESTDIR for the paths that are | ||
7 | being created to look into paths of installed files. Ensure that | ||
8 | cmake_install.cmake actually has $ENV{DESTDIR} which gets expanded if | ||
9 | it's being passed to cmake. | ||
10 | |||
11 | Upstream-Status: Submitted | ||
12 | |||
13 | Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> | ||
14 | --- | ||
15 | src/CMakeLists.txt | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
19 | index 0c99fefae..2f1499d0d 100644 | ||
20 | --- a/src/CMakeLists.txt | ||
21 | +++ b/src/CMakeLists.txt | ||
22 | @@ -137,7 +137,7 @@ install(EXPORT ${LIB_EXPORT_NAME} | ||
23 | |||
24 | # Intel MKL-DNN compat cmake files | ||
25 | install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} | ||
26 | - -DDIR=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake | ||
27 | + -DDIR=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake | ||
28 | -P ${PROJECT_SOURCE_DIR}/cmake/gen_mkldnn_compat_cmakes.cmake)") | ||
29 | |||
30 | # Intel MKL-DNN compat libraries | ||
31 | -- | ||
32 | 2.25.3 | ||
33 | |||
diff --git a/recipes-core/mkl-dnn/files/run-ptest b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest index 82d4df58..82d4df58 100755 --- a/recipes-core/mkl-dnn/files/run-ptest +++ b/dynamic-layers/clang-layer/recipes-core/dnn/files/run-ptest | |||
diff --git a/recipes-core/mkl-dnn/mkl-dnn_1.2.2.bb b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_1.4.bb index 1231fdf0..8ad98c90 100644 --- a/recipes-core/mkl-dnn/mkl-dnn_1.2.2.bb +++ b/dynamic-layers/clang-layer/recipes-core/dnn/onednn_1.4.bb | |||
@@ -1,20 +1,24 @@ | |||
1 | HOMEPAGE = "https://www.oneapi.com" | ||
1 | SUMMARY = "Deep Neural Network Library" | 2 | SUMMARY = "Deep Neural Network Library" |
2 | DESCRIPTION = "This software is a user mode library that accelerates\ | 3 | DESCRIPTION = "This software is a user mode library that accelerates\ |
3 | deep-learning applications and frameworks on Intel architecture." | 4 | deep-learning applications and frameworks on Intel architecture." |
4 | LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0" | 5 | LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0c328b62744f16fbb96f4335c5b65325 \ | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=3c6ff4426dbd618bcfd552ac4a7c1c56 \ |
6 | file://tests/gtests/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ | 7 | file://tests/gtests/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \ |
7 | file://src/cpu/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ | 8 | file://src/cpu/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \ |
8 | file://src/cpu/jit_utils/jitprofiling/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ | 9 | file://src/cpu/jit_utils/jitprofiling/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \ |
9 | file://doc/assets/mathjax/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \ | 10 | file://doc/assets/mathjax/MathJax.js;endline=17;md5=25a014ad78c3d72a0e15d15f1d007c20 \ |
11 | file://src/common/primitive_hashing.hpp;beginline=52;endline=55;md5=f56de33cb6ec02de60006b10e027b300 \ | ||
10 | " | 12 | " |
11 | SECTION = "lib" | 13 | SECTION = "lib" |
12 | 14 | ||
13 | inherit pkgconfig cmake ptest | 15 | inherit pkgconfig cmake ptest |
14 | 16 | ||
15 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
16 | SRCREV = "8e96ef49488c65e0738c552cec5c0563ab92c1af" | 18 | SRCREV = "f7c41dc7b5471ad8bf7905e459bbed27f9094caa" |
17 | SRC_URI = "git://github.com/intel/mkl-dnn.git;branch=rls-v1.2 \ | 19 | SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=rls-v1.4 \ |
20 | file://0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch \ | ||
21 | file://0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch \ | ||
18 | file://run-ptest \ | 22 | file://run-ptest \ |
19 | " | 23 | " |
20 | 24 | ||
@@ -25,23 +29,23 @@ CVE_PRODUCT = "intel:math_kernel_library" | |||
25 | COMPATIBLE_HOST = '(x86_64).*-linux' | 29 | COMPATIBLE_HOST = '(x86_64).*-linux' |
26 | COMPATIBLE_HOST_libc-musl = 'null' | 30 | COMPATIBLE_HOST_libc-musl = 'null' |
27 | 31 | ||
28 | EXTRA_OECMAKE += "-DDNNL_LIBRARY_TYPE=SHARED" | 32 | EXTRA_OECMAKE += " \ |
29 | EXTRA_OECMAKE += "-DDNNL_THREADING=OMP" | 33 | -DDNNL_LIBRARY_TYPE=SHARED \ |
30 | EXTRA_OECMAKE += "-DWITH_EXAMPLE=ON" | 34 | -DDNNL_BUILD_EXAMPLES=ON \ |
31 | EXTRA_OECMAKE += "-DWITH_TEST=ON" | 35 | -DDNNL_BUILD_TESTS=ON \ |
32 | EXTRA_OECMAKE += "-DARCH_OPT_FLAGS=''" | 36 | -DDNNL_CPU_RUNTIME=OMP \ |
33 | EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=ON" | 37 | -DDNNL_ARCH_OPT_FLAGS="" \ |
38 | " | ||
39 | |||
40 | PACKAGECONFIG ??= "" | ||
41 | PACKAGECONFIG[gpu] = "-DDNNL_GPU_RUNTIME=OCL, , opencl-icd-loader, intel-compute-runtime" | ||
34 | 42 | ||
35 | do_install_append () { | 43 | do_install_append () { |
36 | install -d ${D}${bindir}/mkl-dnn | ||
37 | install -d ${D}${bindir}/mkl-dnn/tests | ||
38 | install -d ${D}${bindir}/mkl-dnn/tests/benchdnn | ||
39 | install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs | 44 | install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs |
40 | install -m 0755 ${B}/tests/benchdnn/benchdnn ${D}${bindir}/mkl-dnn/tests/benchdnn | 45 | install -m 0755 ${B}/tests/benchdnn/benchdnn ${D}${bindir}/mkl-dnn/tests/benchdnn |
41 | cp -r ${B}/tests/benchdnn/inputs/* ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs | 46 | cp -r ${B}/tests/benchdnn/inputs/* ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs |
42 | } | 47 | } |
43 | 48 | ||
44 | |||
45 | do_install_ptest () { | 49 | do_install_ptest () { |
46 | install -d ${D}${PTEST_PATH}/tests | 50 | install -d ${D}${PTEST_PATH}/tests |
47 | install -m 0755 ${B}/tests/api-c ${D}${PTEST_PATH}/tests | 51 | install -m 0755 ${B}/tests/api-c ${D}${PTEST_PATH}/tests |