Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
10522f64
Commit
10522f64
authored
Feb 12, 2019
by
Sang Ik Lee
Committed by
Robert Kimball
Feb 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify mkl-dnn patch. (#2418)
parent
66b05785
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
57 deletions
+16
-57
external_mkldnn.cmake
cmake/external_mkldnn.cmake
+3
-5
mkldnn.patch
cmake/mkldnn.patch
+13
-6
mkldnn_no_so_link.patch
cmake/mkldnn_no_so_link.patch
+0
-46
No files found.
cmake/external_mkldnn.cmake
View file @
10522f64
...
...
@@ -95,11 +95,7 @@ target_link_libraries(libmkl INTERFACE ${MKL_LIBS})
set
(
MKLDNN_GIT_REPO_URL https://github.com/intel/mkl-dnn
)
set
(
MKLDNN_GIT_TAG
"b9ce57a"
)
if
(
NGRAPH_LIB_VERSIONING_ENABLE
)
set
(
MKLDNN_PATCH_FILE mkldnn.patch
)
else
()
set
(
MKLDNN_PATCH_FILE mkldnn_no_so_link.patch
)
endif
()
set
(
MKLDNN_PATCH_FILE mkldnn.patch
)
set
(
MKLDNN_LIBS
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn/lib/libmkldnn
${
CMAKE_SHARED_LIBRARY_SUFFIX
}
)
if
(
WIN32
)
...
...
@@ -128,6 +124,7 @@ if (WIN32)
-DCMAKE_INSTALL_PREFIX=
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn
-DMKLDNN_ENABLE_CONCURRENT_EXEC=ON
-DMKLROOT=
${
MKL_ROOT
}
-DMKLDNN_LIB_VERSIONING_ENABLE=
${
NGRAPH_LIB_VERSIONING_ENABLE
}
TMP_DIR
"
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn/tmp"
STAMP_DIR
"
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn/stamp"
DOWNLOAD_DIR
"
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn/download"
...
...
@@ -162,6 +159,7 @@ else()
-DCMAKE_INSTALL_PREFIX=
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn
-DMKLDNN_ENABLE_CONCURRENT_EXEC=ON
-DMKLROOT=
${
MKL_ROOT
}
-DMKLDNN_LIB_VERSIONING_ENABLE=
${
NGRAPH_LIB_VERSIONING_ENABLE
}
"-DARCH_OPT_FLAGS=-march=
${
NGRAPH_TARGET_ARCH
}
-mtune=
${
NGRAPH_TARGET_ARCH
}
"
TMP_DIR
"
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn/tmp"
STAMP_DIR
"
${
EXTERNAL_PROJECTS_ROOT
}
/mkldnn/stamp"
...
...
cmake/mkldnn.patch
View file @
10522f64
diff --git a/cmake/OpenMP.cmake b/cmake/OpenMP.cmake
index f9c3620e..
ed1ad6c2
100644
index f9c3620e..
ccfefe4f
100644
--- a/cmake/OpenMP.cmake
+++ b/cmake/OpenMP.cmake
@@ -30,14 +30,1
9
@@ if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
@@ -30,14 +30,1
8
@@ if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# But we still want to build the library.
set(_omp_severity "WARNING")
else()
...
...
@@ -21,15 +21,14 @@ index f9c3620e..ed1ad6c2 100644
+ if (OpenMP_CXX_FOUND)
+ set(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS ${OpenMP_CXX_FLAGS})
+ endif()
+
if (NOT APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 83ed499a..
3dc4fcf4
100644
index 83ed499a..
05721370
100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -98,
6 +98,10
@@ else()
@@ -98,
10 +98,16
@@ else()
set(CTESTCONFIG_PATH "${CTESTCONFIG_PATH}\;${CMAKE_CURRENT_BINARY_DIR}" PARENT_SCOPE)
endif()
target_link_libraries(${TARGET_NAME} ${${TARGET_NAME}_LINKER_LIBS} ${EXTRA_LIBS})
...
...
@@ -39,4 +38,12 @@ index 83ed499a..3dc4fcf4 100644
+endif()
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
set_property(TARGET ${TARGET_NAME} PROPERTY VERSION "${PROJECT_VERSION}.0")
-set_property(TARGET ${TARGET_NAME} PROPERTY VERSION "${PROJECT_VERSION}.0")
-set_property(TARGET ${TARGET_NAME} PROPERTY SOVERSION "0")
+if(MKLDNN_LIB_VERSIONING_ENABLE)
+ set_property(TARGET ${TARGET_NAME} PROPERTY VERSION "${PROJECT_VERSION}.0")
+ set_property(TARGET ${TARGET_NAME} PROPERTY SOVERSION "0")
+endif()
if(MINGW)
# We need to install *.dll into bin/ and *.a into lib/.
cmake/mkldnn_no_so_link.patch
deleted
100644 → 0
View file @
66b05785
diff --git a/cmake/OpenMP.cmake b/cmake/OpenMP.cmake
index f9c3620e..ed1ad6c2 100644
--- a/cmake/OpenMP.cmake
+++ b/cmake/OpenMP.cmake
@@ -30,14 +30,19 @@ if (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
# But we still want to build the library.
set(_omp_severity "WARNING")
else()
- set(_omp_severity "FATAL_ERROR")
+ set(_omp_severity "WARNING")
endif()
macro(forbid_link_compiler_omp_rt)
if (NOT WIN32)
- set_if(OpenMP_C_FOUND CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS ${OpenMP_C_FLAGS})
- set_if(OpenMP_CXX_FOUND CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS ${OpenMP_CXX_FLAGS})
+ if (OpenMP_C_FOUND)
+ set(CMAKE_C_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS ${OpenMP_C_FLAGS})
+ endif()
+ if (OpenMP_CXX_FOUND)
+ set(CMAKE_CXX_CREATE_SHARED_LIBRARY_FORBIDDEN_FLAGS ${OpenMP_CXX_FLAGS})
+ endif()
+
if (NOT APPLE)
set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 83ed499..d7f4ea0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -98,10 +98,12 @@ else()
set(CTESTCONFIG_PATH "${CTESTCONFIG_PATH}\;${CMAKE_CURRENT_BINARY_DIR}" PARENT_SCOPE)
endif()
target_link_libraries(${TARGET_NAME} ${${TARGET_NAME}_LINKER_LIBS} ${EXTRA_LIBS})
+if(NOT APPLE)
+ set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY LINK_FLAGS " -Wl,--rpath,$ORIGIN")
+ set_target_properties(${TARGET_NAME} PROPERTIES INSTALL_RPATH "$ORIGIN")
+endif()
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD 11)
set_property(TARGET ${TARGET_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
-set_property(TARGET ${TARGET_NAME} PROPERTY VERSION "${PROJECT_VERSION}.0")
-set_property(TARGET ${TARGET_NAME} PROPERTY SOVERSION "0")
if(MINGW)
# We need to install *.dll into bin/ and *.a into lib/.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment