aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/FindXsmm.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/FindXsmm.cmake')
-rw-r--r--cmake/FindXsmm.cmake25
1 files changed, 25 insertions, 0 deletions
diff --git a/cmake/FindXsmm.cmake b/cmake/FindXsmm.cmake
new file mode 100644
index 000000000..809d6f414
--- /dev/null
+++ b/cmake/FindXsmm.cmake
@@ -0,0 +1,25 @@
+# libxsmm support.
+# libxsmm provides matrix multiplication kernels optimized for
+# the latest Intel architectures.
+# Download the library from https://github.com/hfp/libxsmm
+# Compile with make BLAS=0
+
+if (LIBXSMM)
+ set(XSMM_FIND_QUIETLY TRUE)
+ set(XSMM_INCLUDES ${LIBXSMM}/include)
+ set(XSMM_LIBRARIES ${LIBXSMM}/lib)
+endif (LIBXSMM)
+
+find_path(LIBXSMM
+ NAMES
+ libxsmm.h
+ PATHS
+ $ENV{XSMMDIR}/include
+ ${INCLUDE_INSTALL_DIR}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(XSMM DEFAULT_MSG
+ LIBXSMM)
+
+mark_as_advanced(LIBXSMM)