Commit 556fda0a authored by Christian Convey's avatar Christian Convey Committed by Robert Kimball

Revert "Adds more control for building MKL-DNN. (#322)" (#336)

This reverts commit 39383029.

It looks like the commit actually suppressed parallel makes
of MKL-DNN, at least in the case where ngraph itself was being
built with parallel make.  It also introduced problems with
make jobserver warnings.
parent 8aba2ada
...@@ -17,34 +17,6 @@ include(ExternalProject) ...@@ -17,34 +17,6 @@ include(ExternalProject)
# Fetch and install MKL-DNN # Fetch and install MKL-DNN
#---------------------------------------------------------------------------------------------------------- #----------------------------------------------------------------------------------------------------------
set(MKLDNN_BUILD_COMMAND_EXTRA_FLAGS ""
CACHE STRING "Additional flags to supply to '${CMAKE_MAKE_PROGRAM}' when building MKLDNN."
)
set(MKLDNN_CMAKE_EXTRA_FLAGS ""
CACHE STRING "Additional flags to supply to 'cmake' when building the MKLDNN build."
)
# CMake is a terrible language when it comes to lists and strings. Here's the behavior we *want*:
# 1. CMake's user enters a space-separated list of additional command-line argments to be supplied
# to the 'make' invocation that builds MKL-DNN.
#
# 2. When that 'make' invocation occurs, each of thoise command-line arguments is a separate token
# on the command-line of the 'make' invocation.
#
# To avoid CMake grouping all of those command-line arguments together into a single, quote-
# delimited string on the 'make' command-line, we need to temporarily convert the user-specified,
# space-separated string into a CMake semicolon-separated list.
separate_arguments(MKLDNN_BUILD_COMMAND_EXTRA_FLAGS_LIST UNIX_COMMAND
"${MKLDNN_BUILD_COMMAND_EXTRA_FLAGS}"
)
separate_arguments(MKLDNN_CMAKE_EXTRA_FLAGS_LIST UNIX_COMMAND
"${MKLDNN_CMAKE_EXTRA_FLAGS}"
)
#----------------------------------------------------------------------------------------------------------
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(MKLDNN_GIT_REPO_URL https://github.com/01org/mkl-dnn) set(MKLDNN_GIT_REPO_URL https://github.com/01org/mkl-dnn)
...@@ -60,10 +32,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ...@@ -60,10 +32,7 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
UPDATE_COMMAND "" UPDATE_COMMAND ""
# Uncomment below with any in-flight MKL-DNN patches # Uncomment below with any in-flight MKL-DNN patches
# PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch # PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch
CMAKE_ARGS CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
-DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
${MKLDNN_CMAKE_EXTRA_FLAGS_LIST}
BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}" ${MKLDNN_BUILD_COMMAND_EXTRA_FLAGS_LIST}
) )
else() else()
ExternalProject_Add( ExternalProject_Add(
...@@ -73,11 +42,8 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") ...@@ -73,11 +42,8 @@ if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
UPDATE_COMMAND "" UPDATE_COMMAND ""
# Uncomment below with any in-flight MKL-DNN patches # Uncomment below with any in-flight MKL-DNN patches
# PATCH_COMMAND patch -p1 < ${CMAKE_SOURCE_DIR}/third-party/patches/mkldnn-cmake-openmp.patch # 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" BUILD_BYPRODUCTS "${MKLDNN_INSTALL_DIR}/include/mkldnn.hpp"
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${MKLDNN_INSTALL_DIR}
${MKLDNN_CMAKE_EXTRA_FLAGS_LIST}
BUILD_COMMAND "${CMAKE_MAKE_PROGRAM}" ${MKLDNN_BUILD_COMMAND_EXTRA_FLAGS_LIST}
) )
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment