forked from libxsmm/tpp-mlir
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow disabling of OneDNN and OpenMP (libxsmm#725)
Makes sure libraries are not build/included in tools and tests not run if the libraries are disabled.
- Loading branch information
Showing
11 changed files
with
57 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
include (ExternalProject) | ||
option(USE_OneDNN "Use OneDNN" ON) | ||
|
||
set(DNNL_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/dnnl/src/dnnl/src) | ||
set(DNNL_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/dnnl/install) | ||
set(DNNL_LIB_DIR ${DNNL_INSTALL}/${CMAKE_INSTALL_LIBDIR}) | ||
set(DNNL_INCLUDE_DIR ${DNNL_INSTALL}/include) | ||
if(USE_OneDNN) | ||
include (ExternalProject) | ||
|
||
ExternalProject_Add(project_dnnl | ||
PREFIX dnnl | ||
GIT_REPOSITORY https://github.com/oneapi-src/onednn.git | ||
GIT_TAG 03691d7898b5a4fd1f471c8e30c97d394a5fdec2 | ||
SOURCE_DIR ${DNNL_SOURCE} | ||
INSTALL_DIR ${DNNL_INSTALL} | ||
GIT_PROGRESS true | ||
USES_TERMINAL_BUILD true | ||
CMAKE_ARGS -DDNNL_BUILD_TESTS=OFF -DDNNL_ENABLE_CONCURRENT_EXEC=ON -DDNNL_BUILD_EXAMPLES=OFF | ||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${DNNL_INSTALL} | ||
) | ||
set(DNNL_SOURCE ${CMAKE_CURRENT_BINARY_DIR}/dnnl/src/dnnl/src) | ||
set(DNNL_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/dnnl/install) | ||
set(DNNL_LIB_DIR ${DNNL_INSTALL}/${CMAKE_INSTALL_LIBDIR}) | ||
set(DNNL_INCLUDE_DIR ${DNNL_INSTALL}/include) | ||
message (STATUS "ONE-DNN Include dir: ${DNNL_INCLUDE_DIR}") | ||
|
||
include_directories(${DNNL_INCLUDE_DIR}) | ||
link_directories(${DNNL_LIB_DIR}) | ||
ExternalProject_Add(project_dnnl | ||
PREFIX dnnl | ||
GIT_REPOSITORY https://github.com/oneapi-src/onednn.git | ||
GIT_TAG 03691d7898b5a4fd1f471c8e30c97d394a5fdec2 | ||
SOURCE_DIR ${DNNL_SOURCE} | ||
INSTALL_DIR ${DNNL_INSTALL} | ||
GIT_PROGRESS true | ||
USES_TERMINAL_BUILD true | ||
CMAKE_ARGS -DDNNL_BUILD_TESTS=OFF -DDNNL_ENABLE_CONCURRENT_EXEC=ON -DDNNL_BUILD_EXAMPLES=OFF | ||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${DNNL_INSTALL} | ||
) | ||
|
||
include_directories(${DNNL_INCLUDE_DIR}) | ||
link_directories(${DNNL_LIB_DIR}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
add_subdirectory(Xsmm) | ||
add_subdirectory(OneDnnl) | ||
|
||
if(USE_OneDNN) | ||
add_subdirectory(OneDnnl) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
if not config.use_onednn or "ON" not in config.use_onednn: | ||
config.unsupported = True |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
if not config.use_openmp or "ON" not in config.use_openmp: | ||
config.unsupported = True |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters