Skip to content

Commit 24b2ed9

Browse files
authored
[CMake] Allow passing libxsmm / dnn root to use local builds (#1047)
This allows us to set CMake variables to use an existing libxsmm build: -DLIBXSMMROOT -DLIBXSMM_DNNROOT Use full paths to make it easier for CMake to find it.
1 parent b7b92fa commit 24b2ed9

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

cmake/modules/xsmm-dnn.cmake

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,8 @@ if (NOT LIBXSMMROOT)
33
message(FATAL_ERROR "LIBXSMM is a hard dependency for LIBXSMM-DNN")
44
endif()
55

6-
# Use LIBXSMM_DNN (make PREFIX=/path/to/libxsmm-dnn) given by LIBXSMM_DNNROOT
7-
set(LIBXSMM_DNNROOT $ENV{LIBXSMM_DNNROOT})
8-
# Fetch LIBXSMM_DNN (even if LIBXSMM_DNNROOT is present)
9-
set(LIBXSMM_DNNFETCH $ENV{LIBXSMM_DNNFETCH})
10-
11-
if(LIBXSMM_DNNROOT AND NOT LIBXSMM_DNNFETCH)
6+
# Make to pass full path to LIBXSMM_DNNROOT
7+
if(EXISTS ${LIBXSMM_DNNROOT})
128
message(STATUS "Found LIBXSMM_DNN (${LIBXSMM_DNNROOT})")
139
else()
1410
message(STATUS "Fetching LIBXSMM_DNN")

cmake/modules/xsmm.cmake

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
# Use LIBXSMM (make PREFIX=/path/to/libxsmm) given by LIBXSMMROOT
2-
set(LIBXSMMROOT $ENV{LIBXSMMROOT})
3-
# Fetch LIBXSMM (even if LIBXSMMROOT is present)
4-
set(LIBXSMMFETCH $ENV{LIBXSMMFETCH})
5-
6-
if(LIBXSMMROOT AND NOT LIBXSMMFETCH)
1+
# Make to pass full path to LIBXSMMROOT
2+
if(EXISTS ${LIBXSMMROOT})
73
message(STATUS "Found LIBXSMM (${LIBXSMMROOT})")
84
file(GLOB XSMM_SRCS LIST_DIRECTORIES false CONFIGURE_DEPENDS ${LIBXSMMROOT}/include/libxsmm/*.c)
95
list(REMOVE_ITEM XSMM_SRCS ${LIBXSMMROOT}/include/libxsmm/libxsmm_generator_gemm_driver.c)

0 commit comments

Comments
 (0)