Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 51e6707

Browse files
committed
mkl-dnn: add new package.
mkl-dnn is a math kernel library for deep neural network operations, optimized for Intel processors. Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
1 parent 13171c9 commit 51e6707

2 files changed

Lines changed: 85 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
From 6d3ebb1241459ca360a83b8f68b781b34e1b3877 Mon Sep 17 00:00:00 2001
2+
From: Ismo Puustinen <ismo.puustinen@intel.com>
3+
Date: Wed, 17 May 2017 16:37:38 +0300
4+
Subject: [PATCH] build: add soname to library.
5+
6+
Create library with a proper soname. Also fix a typo in PROJECT_VERSION
7+
definition.
8+
9+
Upstream-status: Submitted [https://github.com/01org/mkl-dnn/pull/60]
10+
11+
Signed-off-by: Ismo Puustinen <ismo.puustinen@intel.com>
12+
13+
---
14+
CMakeLists.txt | 7 ++++++-
15+
src/CMakeLists.txt | 2 ++
16+
2 files changed, 8 insertions(+), 1 deletion(-)
17+
18+
diff --git a/CMakeLists.txt b/CMakeLists.txt
19+
index b9a92cb..e28a1a7 100644
20+
--- a/CMakeLists.txt
21+
+++ b/CMakeLists.txt
22+
@@ -16,9 +16,14 @@
23+
24+
cmake_minimum_required(VERSION 2.8)
25+
26+
+# version handling is done with old style
27+
+if(POLICY CMP0048)
28+
+ cmake_policy(SET CMP0048 OLD)
29+
+endif()
30+
+
31+
set(PROJECT_NAME "Intel(R) MKL-DNN")
32+
set(PROJECT_FULL_NAME "Intel(R) Math Kernel Library for Deep Neural Networks (Intel(R) MKL-DNN)")
33+
-set(PROJECT_VERSION, "0.7")
34+
+set(PROJECT_VERSION "0.7")
35+
36+
set(LIB_NAME mkldnn)
37+
38+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
39+
index fa804f4..c559533 100644
40+
--- a/src/CMakeLists.txt
41+
+++ b/src/CMakeLists.txt
42+
@@ -35,6 +35,8 @@ add_library(${TARGET_NAME} SHARED ${HEADERS} ${SOURCES})
43+
target_link_libraries(${TARGET_NAME} ${${TARGET_NAME}_LINKER_LIBS})
44+
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 11)
45+
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
46+
+set_property(TARGET ${TARGET_NAME} PROPERTY VERSION "${PROJECT_VERSION}.0")
47+
+set_property(TARGET ${TARGET_NAME} PROPERTY SOVERSION "0")
48+
49+
install(TARGETS ${TARGET_NAME} DESTINATION lib)
50+
install(FILES ${HEADERS} DESTINATION include)
51+
--
52+
2.9.4
53+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
DESCRIPTION = "Intel(R) Math Kernel Library for Deep Neural Networks"
2+
HOMEPAGE = "https://01.org/mkl-dnn"
3+
LICENSE = "Apache-2.0 & BSD-3-Clause"
4+
SECTION = "libs"
5+
DEPENDS = ""
6+
7+
inherit cmake
8+
9+
PN_MKLML = "mklml_lnx_2018.0.20170425"
10+
11+
SRC_URI = " \
12+
https://github.com/01org/${PN}/archive/v${PV}.tar.gz \
13+
https://github.com/01org/${PN}/releases/download/v${PV}/${PN_MKLML}.tgz;name=mklml \
14+
file://0001-build-add-soname-to-library.patch \
15+
"
16+
17+
SRC_URI[md5sum] = "f3ff5ea16bc9a37a0db34fa75fd8a2b7"
18+
SRC_URI[sha256sum] = "72fb2a533996d1218b7dfb9e11acf8a6d4a95bf28e277194dfea5648ecfa47c0"
19+
20+
SRC_URI[mklml.md5sum] = "5aecff839e853a9bb74cb34dd93c1f5d"
21+
SRC_URI[mklml.sha256sum] = "3cc2501fb209e1fd0960a5f61c919438f9619c68a644dcebf0fdf69b07460c57"
22+
23+
LIC_FILES_CHKSUM = " \
24+
file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e \
25+
file://${WORKDIR}/${PN_MKLML}/license.txt;md5=67e50fd1d690e2951c06c4be76dda021 \
26+
"
27+
28+
do_configure_prepend() {
29+
install -d ${S}/external
30+
rm -f ${S}/external/${PN_MKLML}
31+
ln -s ${WORKDIR}/${PN_MKLML} ${S}/external/${PN_MKLML}
32+
}

0 commit comments

Comments
 (0)