aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2020-04-20 15:27:26 +0800
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-21 22:07:37 +0800
commit4162501e85481827f2ef65afe86a29cdd89cb57e (patch)
tree8ab4b96e0ea058a84c7e3c80df04c468447913ed
parent77a0e289d5df928a5d5c9c659c850e7b46505711 (diff)
downloadmeta-intel-4162501e85481827f2ef65afe86a29cdd89cb57e.tar.gz
meta-intel-4162501e85481827f2ef65afe86a29cdd89cb57e.tar.bz2
meta-intel-4162501e85481827f2ef65afe86a29cdd89cb57e.zip
mkl-dnn: upgrade 1.2.2 -> 1.4
The name of project has changed to oneDNN. Enable GPU engine to be built by default which would need clang layer to be included. Also include two minor fixes to install logic that have been submitted for review upstream. Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--dynamic-layers/clang-layer/recipes-core/dnn/files/0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch34
-rw-r--r--dynamic-layers/clang-layer/recipes-core/dnn/files/0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch33
-rwxr-xr-xdynamic-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 @@
+From 89ebbee73ff0af48eaaec63335b749a176a317bb Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 21 Apr 2020 09:18:09 +0800
+Subject: [PATCH 1/2] src/CMakeLists.txt: fix FindOpenCL.cmake source path
+
+The existing logic doesn't work when DESTDIR is being passed to cmake.
+The file is installed in DESTDIR/CMAKE_INSTALL_PREFIX/libdir while we're
+trying to copy it from CMAKE_INSTALL_PREFIX/libdir.
+
+Use the file from source tree instead.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 88e318923..0c99fefae 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -203,7 +203,7 @@ if(DNNL_GPU_RUNTIME STREQUAL "OCL")
+ install(FILES
+ "../cmake/FindOpenCL.cmake"
+ DESTINATION ${LIB_CONFIG_INSTALL_DIR})
+- install(FILES "${CMAKE_INSTALL_PREFIX}/${LIB_CONFIG_INSTALL_DIR}/FindOpenCL.cmake"
++ install(FILES "../cmake/FindOpenCL.cmake"
+ DESTINATION ${LIB_CONFIG_INSTALL_DIR_COMPAT})
+ endif()
+
+--
+2.25.3
+
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 @@
+From 3693305c9497f940b011e3e8b9d707d4f8075234 Mon Sep 17 00:00:00 2001
+From: Anuj Mittal <anuj.mittal@intel.com>
+Date: Tue, 21 Apr 2020 09:19:38 +0800
+Subject: [PATCH 2/2] src/CMakeLists.txt: use value of DESTDIR
+
+Make sure that we're using the value of DESTDIR for the paths that are
+being created to look into paths of installed files. Ensure that
+cmake_install.cmake actually has $ENV{DESTDIR} which gets expanded if
+it's being passed to cmake.
+
+Upstream-Status: Submitted
+
+Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
+---
+ src/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index 0c99fefae..2f1499d0d 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -137,7 +137,7 @@ install(EXPORT ${LIB_EXPORT_NAME}
+
+ # Intel MKL-DNN compat cmake files
+ install(CODE "execute_process(COMMAND ${CMAKE_COMMAND}
+- -DDIR=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake
++ -DDIR=\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake
+ -P ${PROJECT_SOURCE_DIR}/cmake/gen_mkldnn_compat_cmakes.cmake)")
+
+ # Intel MKL-DNN compat libraries
+--
+2.25.3
+
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 @@
+HOMEPAGE = "https://www.oneapi.com"
SUMMARY = "Deep Neural Network Library"
DESCRIPTION = "This software is a user mode library that accelerates\
deep-learning applications and frameworks on Intel architecture."
LICENSE = "Apache-2.0 & BSD-3-Clause & BSL-1.0"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=0c328b62744f16fbb96f4335c5b65325 \
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3c6ff4426dbd618bcfd552ac4a7c1c56 \
file://tests/gtests/gtest/LICENSE;md5=cbbd27594afd089daa160d3a16dd515a \
file://src/cpu/xbyak/COPYRIGHT;md5=3b9bf048d063d54cdb28964db558bcc7 \
file://src/cpu/jit_utils/jitprofiling/LICENSE.BSD;md5=e671ff178b24a95a382ba670503c66fb \
- file://doc/assets/mathjax/LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57 \
+ file://doc/assets/mathjax/MathJax.js;endline=17;md5=25a014ad78c3d72a0e15d15f1d007c20 \
+ file://src/common/primitive_hashing.hpp;beginline=52;endline=55;md5=f56de33cb6ec02de60006b10e027b300 \
"
SECTION = "lib"
inherit pkgconfig cmake ptest
S = "${WORKDIR}/git"
-SRCREV = "8e96ef49488c65e0738c552cec5c0563ab92c1af"
-SRC_URI = "git://github.com/intel/mkl-dnn.git;branch=rls-v1.2 \
+SRCREV = "f7c41dc7b5471ad8bf7905e459bbed27f9094caa"
+SRC_URI = "git://github.com/oneapi-src/oneDNN.git;branch=rls-v1.4 \
+ file://0001-src-CMakeLists.txt-fix-FindOpenCL.cmake-source-path.patch \
+ file://0002-src-CMakeLists.txt-use-value-of-DESTDIR.patch \
file://run-ptest \
"
@@ -25,23 +29,23 @@ CVE_PRODUCT = "intel:math_kernel_library"
COMPATIBLE_HOST = '(x86_64).*-linux'
COMPATIBLE_HOST_libc-musl = 'null'
-EXTRA_OECMAKE += "-DDNNL_LIBRARY_TYPE=SHARED"
-EXTRA_OECMAKE += "-DDNNL_THREADING=OMP"
-EXTRA_OECMAKE += "-DWITH_EXAMPLE=ON"
-EXTRA_OECMAKE += "-DWITH_TEST=ON"
-EXTRA_OECMAKE += "-DARCH_OPT_FLAGS=''"
-EXTRA_OECMAKE += "-DCMAKE_SKIP_RPATH=ON"
+EXTRA_OECMAKE += " \
+ -DDNNL_LIBRARY_TYPE=SHARED \
+ -DDNNL_BUILD_EXAMPLES=ON \
+ -DDNNL_BUILD_TESTS=ON \
+ -DDNNL_CPU_RUNTIME=OMP \
+ -DDNNL_ARCH_OPT_FLAGS="" \
+ "
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[gpu] = "-DDNNL_GPU_RUNTIME=OCL, , opencl-icd-loader, intel-compute-runtime"
do_install_append () {
- install -d ${D}${bindir}/mkl-dnn
- install -d ${D}${bindir}/mkl-dnn/tests
- install -d ${D}${bindir}/mkl-dnn/tests/benchdnn
install -d ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
install -m 0755 ${B}/tests/benchdnn/benchdnn ${D}${bindir}/mkl-dnn/tests/benchdnn
cp -r ${B}/tests/benchdnn/inputs/* ${D}${bindir}/mkl-dnn/tests/benchdnn/inputs
}
-
do_install_ptest () {
install -d ${D}${PTEST_PATH}/tests
install -m 0755 ${B}/tests/api-c ${D}${PTEST_PATH}/tests