summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2020-04-07 14:26:00 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2020-04-10 03:29:22 (GMT)
commitec5c324ae8f1e7b3da574267d4533c758a3ecfcf (patch)
tree2e5d95c85a16fe780121051cba994eb56eb8e1e6
parente0a8e6e48ff741c3a1eff39876c4185fc5d22601 (diff)
downloadmeta-intel-ec5c324ae8f1e7b3da574267d4533c758a3ecfcf.tar.gz
ngraph: upgrade 0.22.1 -> 2.29.0-rc0
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--recipes-devtools/ngraph/ngraph/0001-install-cmake-modules-correctly.patch54
-rw-r--r--recipes-devtools/ngraph/ngraph/0001-ngraph-compile-for-DLDT-R2.patch141
-rw-r--r--recipes-devtools/ngraph/ngraph_0.22.1.bb23
-rw-r--r--recipes-devtools/ngraph/ngraph_0.29.0-rc0.bb34
4 files changed, 88 insertions, 164 deletions
diff --git a/recipes-devtools/ngraph/ngraph/0001-install-cmake-modules-correctly.patch b/recipes-devtools/ngraph/ngraph/0001-install-cmake-modules-correctly.patch
new file mode 100644
index 0000000..c8e5095
--- /dev/null
+++ b/recipes-devtools/ngraph/ngraph/0001-install-cmake-modules-correctly.patch
@@ -0,0 +1,54 @@
1From a03058ed605345cce9d7f0cd98f7c3696c3d7c51 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Tue, 7 Apr 2020 13:44:37 +0800
4Subject: [PATCH] fix installation of cmake modules
5
6Make sure that cmake files are installed correctly and don't install
7license files.
8
9Upstream-Status: Pending
10
11Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
12---
13 CMakeLists.txt | 14 ++++----------
14 1 file changed, 4 insertions(+), 10 deletions(-)
15
16diff --git a/CMakeLists.txt b/CMakeLists.txt
17index 604daa0e45..b60a013b86 100644
18--- a/CMakeLists.txt
19+++ b/CMakeLists.txt
20@@ -667,12 +667,12 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE)
21 install(EXPORT ngraphTargets
22 FILE ngraphTargets.cmake
23 NAMESPACE ngraph::
24- DESTINATION cmake
25+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph
26 COMPONENT ngraph)
27
28 configure_package_config_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/share/ngraphConfig.cmake.in
29 ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake
30- INSTALL_DESTINATION cmake)
31+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph)
32
33 write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion.cmake
34 VERSION ${NGRAPH_VERSION}
35@@ -680,14 +680,8 @@ if (NGRAPH_EXPORT_TARGETS_ENABLE)
36
37 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfig.cmake
38 ${CMAKE_CURRENT_BINARY_DIR}/ngraphConfigVersion.cmake
39- DESTINATION cmake
40+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ngraph
41 COMPONENT ngraph)
42 endif()
43
44-install(DIRECTORY
45- ${CMAKE_CURRENT_SOURCE_DIR}/licenses
46- DESTINATION "."
47- COMPONENT ngraph
48-)
49-install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION "." COMPONENT ngraph)
50-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION DESTINATION "." COMPONENT ngraph)
51+install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/ngraph COMPONENT ngraph)
52--
532.25.2
54
diff --git a/recipes-devtools/ngraph/ngraph/0001-ngraph-compile-for-DLDT-R2.patch b/recipes-devtools/ngraph/ngraph/0001-ngraph-compile-for-DLDT-R2.patch
deleted file mode 100644
index fcc2a84..0000000
--- a/recipes-devtools/ngraph/ngraph/0001-ngraph-compile-for-DLDT-R2.patch
+++ /dev/null
@@ -1,141 +0,0 @@
1From 73e9f605f8ce28c3ef9461c3a85d7dfe7814b867 Mon Sep 17 00:00:00 2001
2From: Erin Park <erin.park@intel.com>
3Date: Wed, 11 Sep 2019 11:15:13 +0800
4Subject: [PATCH] ngraph compile for DLDT R2
5
6Upstream-Status: Pending [Taken from Clear Linux with changes to install
7binaries/headers to generic locations]
8Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
9---
10 src/CMakeLists.txt | 8 ++++--
11 src/ngraph.cmake | 54 +++++++++++++++++++++++++++++++++++++++
12 src/ngraph/CMakeLists.txt | 21 +++++++++++----
13 3 files changed, 76 insertions(+), 7 deletions(-)
14 create mode 100644 src/ngraph.cmake
15
16diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
17index c791436d7..c18473572 100644
18--- a/src/CMakeLists.txt
19+++ b/src/CMakeLists.txt
20@@ -14,14 +14,18 @@
21 # limitations under the License.
22 # ******************************************************************************
23
24+cmake_minimum_required(VERSION 3.7.2 FATAL_ERROR)
25+
26+project(ngraph)
27+
28+include(ngraph.cmake)
29+
30 add_definitions(-DIN_NGRAPH_LIBRARY)
31
32 include_directories(ngraph)
33
34 add_subdirectory(resource)
35
36-add_subdirectory(ngraph)
37-
38 if (NGRAPH_TOOLS_ENABLE)
39 add_subdirectory(tools)
40 message(STATUS "tools enabled")
41diff --git a/src/ngraph.cmake b/src/ngraph.cmake
42new file mode 100644
43index 000000000..a0060e08e
44--- /dev/null
45+++ b/src/ngraph.cmake
46@@ -0,0 +1,54 @@
47+# ******************************************************************************
48+# Copyright 2017-2019 Intel Corporation
49+#
50+# Licensed under the Apache License, Version 2.0 (the "License");
51+# you may not use this file except in compliance with the License.
52+# You may obtain a copy of the License at
53+#
54+# http://www.apache.org/licenses/LICENSE-2.0
55+#
56+# Unless required by applicable law or agreed to in writing, software
57+# distributed under the License is distributed on an "AS IS" BASIS,
58+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59+# See the License for the specific language governing permissions and
60+# limitations under the License.
61+# ******************************************************************************
62+
63+set (CMAKE_CXX_STANDARD 11)
64+set (CMAKE_CXX_STANDARD_REQUIRED ON)
65+if (NOT("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel"))
66+ set (CMAKE_CXX_FLAGS "-std=c11 ${CMAKE_CXX_FLAGS}")
67+endif()
68+if (WIN32)
69+ add_definitions(-DNOMINMAX)
70+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W0 /EHsc /MP")
71+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
72+ set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
73+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4308")
74+endif()
75+
76+set(NGRAPH_TOOLS_ENABLE FALSE)
77+set(NGRAPH_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ngraph")
78+include_directories("${CMAKE_CURRENT_SOURCE_DIR}"
79+ "${NGRAPH_SOURCE_DIR}")
80+
81+add_definitions(-DPROJECT_ROOT_DIR="${NGRAPH_SOURCE_DIR}")
82+
83+set(NGRAPH_INSTALL_LIB "${CMAKE_INSTALL_PREFIX}")
84+
85+if (HAS_MAYBE_UNINITIALIZED)
86+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
87+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-uninitialized")
88+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-uninitialized")
89+ else()
90+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-maybe-uninitialized -Wno-return-type")
91+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-maybe-uninitialized -Wno-return-type")
92+ endif()
93+endif()
94+# WA for GCC 7.0
95+if (UNIX)
96+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-return-type")
97+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-return-type")
98+endif()
99+add_subdirectory(${NGRAPH_SOURCE_DIR})
100+
101diff --git a/src/ngraph/CMakeLists.txt b/src/ngraph/CMakeLists.txt
102index 2a9b84549..781855941 100644
103--- a/src/ngraph/CMakeLists.txt
104+++ b/src/ngraph/CMakeLists.txt
105@@ -574,17 +574,28 @@ endif()
106 #-----------------------------------------------------------------------------------------------
107
108 # nGraph
109-install(FILES ${CMAKE_BINARY_DIR}/VERSION DESTINATION ${CMAKE_INSTALL_PREFIX})
110-install(TARGETS ngraph DESTINATION ${NGRAPH_INSTALL_LIB}) # libngraph.so
111+#install(FILES ${CMAKE_BINARY_DIR}/VERSION DESTINATION ${CMAKE_INSTALL_PREFIX})
112+#install(TARGETS ngraph DESTINATION ${NGRAPH_INSTALL_LIB}) # libngraph.so
113+#install(DIRECTORY
114+# ${CMAKE_CURRENT_SOURCE_DIR}/
115+# DESTINATION "${NGRAPH_INSTALL_INCLUDE}/ngraph"
116+# FILES_MATCHING
117+# PATTERN "*.hpp"
118+# PATTERN "*.h"
119+#)
120+#install(FILES ${CMAKE_BINARY_DIR}/src/ngraph/version.hpp
121+# DESTINATION "${NGRAPH_INSTALL_INCLUDE}/ngraph")
122+
123+install(TARGETS ngraph DESTINATION ${CMAKE_INSTALL_LIBDIR}) # libngraph.so
124 install(DIRECTORY
125 ${CMAKE_CURRENT_SOURCE_DIR}/
126- DESTINATION "${NGRAPH_INSTALL_INCLUDE}/ngraph"
127+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ngraph"
128 FILES_MATCHING
129 PATTERN "*.hpp"
130 PATTERN "*.h"
131 )
132-install(FILES ${CMAKE_BINARY_DIR}/src/ngraph/version.hpp
133- DESTINATION "${NGRAPH_INSTALL_INCLUDE}/ngraph")
134+install(FILES ${CMAKE_BINARY_DIR}/ngraph/version.hpp
135+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ngraph)
136
137 set(CPACK_GENERATOR "DEB")
138 set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
139--
1402.21.0
141
diff --git a/recipes-devtools/ngraph/ngraph_0.22.1.bb b/recipes-devtools/ngraph/ngraph_0.22.1.bb
deleted file mode 100644
index fa6427b..0000000
--- a/recipes-devtools/ngraph/ngraph_0.22.1.bb
+++ /dev/null
@@ -1,23 +0,0 @@
1SUMMARY = "nGraph Compiler Stack"
2DESCRIPTION = "nGraph Compiler aims to accelerate developing AI workloads using \
3any deep learning framework and deploying to a variety of \
4hardware targets."
5HOMEPAGE = "https://www.ngraph.ai"
6
7SRC_URI = "git://github.com/NervanaSystems/ngraph.git;protocol=https;branch=r0.22 \
8 file://0001-ngraph-compile-for-DLDT-R2.patch;striplevel=2 \
9 "
10
11SRCREV = "6818cc5fae57a46d8558c9fd112e04c57a35e0fa"
12
13LICENSE = "Apache-2.0"
14LIC_FILES_CHKSUM = "file://../LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
15
16S = "${WORKDIR}/git/src"
17
18inherit cmake
19
20OECMAKE_GENERATOR = "Unix Makefiles"
21
22FILES_${PN}-dev = "${includedir}"
23FILES_${PN} += "${libdir}/libngraph.so"
diff --git a/recipes-devtools/ngraph/ngraph_0.29.0-rc0.bb b/recipes-devtools/ngraph/ngraph_0.29.0-rc0.bb
new file mode 100644
index 0000000..e017068
--- /dev/null
+++ b/recipes-devtools/ngraph/ngraph_0.29.0-rc0.bb
@@ -0,0 +1,34 @@
1SUMMARY = "nGraph Compiler Stack"
2DESCRIPTION = "nGraph Compiler aims to accelerate developing AI workloads using \
3any deep learning framework and deploying to a variety of \
4hardware targets."
5HOMEPAGE = "https://www.ngraph.ai"
6
7SRC_URI = "git://github.com/NervanaSystems/ngraph.git;protocol=https \
8 file://0001-install-cmake-modules-correctly.patch \
9 "
10
11SRCREV = "b8419c354e5fc70805f1501d7dfff533ac790bec"
12
13LICENSE = "Apache-2.0"
14LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
15
16S = "${WORKDIR}/git"
17
18inherit cmake
19
20OECMAKE_GENERATOR = "Unix Makefiles"
21
22EXTRA_OECMAKE += " \
23 -DNGRAPH_CPU_ENABLE=FALSE \
24 -DNGRAPH_UNIT_TEST_ENABLE=FALSE \
25 -DNGRAPH_TEST_UTIL_ENABLE=FALSE \
26 -DNGRAPH_INTERPRETER_ENABLE=FALSE \
27 -DNGRAPH_JSON_ENABLE=FALSE \
28 -DNGRAPH_NATIVE_ARCH_ENABLE=FALSE \
29 -DNGRAPH_TOOLS_ENABLE=FALSE \
30 -DNGRAPH_NOP_ENABLE=FALSE \
31 -DNGRAPH_GENERIC_CPU_ENABLE=FALSE \
32 -DNGRAPH_LIB_VERSIONING_ENABLE=TRUE \
33 -DNGRAPH_CURRENT_RELEASE_TAG=0.29.0-rc0 \
34 "