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
5ee76d9d
Commit
5ee76d9d
authored
Sep 27, 2017
by
Jaikrishnan Menon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMake: Update MKL-DNN tag and remove upstreamed patch
parent
cdb079b8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
42 deletions
+6
-42
external_mkldnn.cmake
cmake/external_mkldnn.cmake
+6
-4
mkldnn-cmake-openmp.patch
third-party/patches/mkldnn-cmake-openmp.patch
+0
-38
No files found.
cmake/external_mkldnn.cmake
View file @
5ee76d9d
...
...
@@ -27,18 +27,20 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
ExternalProject_Add
(
ext_mkldnn
GIT_REPOSITORY
${
MKLDNN_GIT_REPO_URL
}
GIT_TAG
"
v0.10
"
GIT_TAG
"
144e0db
"
UPDATE_COMMAND
""
PATCH_COMMAND patch -p1 <
${
CMAKE_SOURCE_DIR
}
/third-party/patches/mkldnn-cmake-openmp.patch
# Uncomment below with any in-flight MKL-DNN patches
# PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
MKLDNN_INSTALL_DIR
}
)
else
()
ExternalProject_Add
(
ext_mkldnn
GIT_REPOSITORY
${
MKLDNN_GIT_REPO_URL
}
GIT_TAG
"
v0.10
"
GIT_TAG
"
144e0db
"
UPDATE_COMMAND
""
PATCH_COMMAND patch -p1 <
${
CMAKE_SOURCE_DIR
}
/third-party/patches/mkldnn-cmake-openmp.patch
# Uncomment below with any in-flight MKL-DNN patches
# PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=
${
MKLDNN_INSTALL_DIR
}
BUILD_BYPRODUCTS
"
${
MKLDNN_INSTALL_DIR
}
/include/mkldnn.hpp"
)
...
...
third-party/patches/mkldnn-cmake-openmp.patch
deleted
100644 → 0
View file @
cdb079b8
From 6ca95a7c6802eef486ef1d47ad76094eb1164a7c Mon Sep 17 00:00:00 2001
From: Jaikrishnan Menon <jaikrishnan.menon@intel.com>
Date: Fri, 8 Sep 2017 15:01:59 -0700
Subject: [PATCH] CMake: Detect the right OpenMP flags on the host platform
instead of hardcoding '-fopenmp'
---
CMakeLists.txt | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1e19215..3cb71bd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -81,8 +81,18 @@ if(WIN32)
add_definitions(/Qpar)
endif()
elseif(UNIX OR APPLE)
- set(OPENMP_FLAGS "-fopenmp")
- set(CMAKE_CCXX_FLAGS "${CMAKE_CCXX_FLAGS} ${OPENMP_FLAGS} ${CCXX_WARN_FLAGS} -DMKLDNN_DLL -DMKLDNN_DLL_EXPORTS -fvisibility=internal")
+ # Discover the right OpenMP flags
+ set(OPENMP_FLAGS "")
+ find_package(OpenMP)
+ if(OpenMP_C_FOUND)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
+ endif()
+ if(OpenMP_CXX_FOUND)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
+ set(OPENMP_FLAGS "${OpenMP_CXX_FLAGS}")
+ endif()
+
+ set(CMAKE_CCXX_FLAGS "${CMAKE_CCXX_FLAGS} ${CCXX_WARN_FLAGS} -DMKLDNN_DLL -DMKLDNN_DLL_EXPORTS -fvisibility=internal")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_CCXX_FLAGS} -std=c99")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CCXX_FLAGS} -std=c++11 -fvisibility-inlines-hidden")
set(CCXX_WARN_FLAGS "-Wall -Werror -Wno-unknown-pragmas")
--
1.9.1
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