mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-05 05:04:45 +02:00
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>
This commit is contained in:
parent
28c9337302
commit
53c87950e8
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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
|
Loading…
Reference in New Issue
Block a user