summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorOlly Perks <olly.perks@arm.com>2020-03-19 10:36:07 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-09 15:55:04 (GMT)
commit14ffa6e90ec8550e9b77843d6fb008802ad6b164 (patch)
treeed3e7fe065233c6597d0a5b36a2c8530fd11954b /Modules
parent953292921652377ae03bf7413ed115e03c7bd83b (diff)
downloadCMake-14ffa6e90ec8550e9b77843d6fb008802ad6b164.zip
CMake-14ffa6e90ec8550e9b77843d6fb008802ad6b164.tar.gz
CMake-14ffa6e90ec8550e9b77843d6fb008802ad6b164.tar.bz2
Find{BLAS,LAPACK}: Add support for ArmPL targets
Add support for the Arm Performance Libraries (ArmPL) which provide an implementation of BLAS, LAPACK and FFTW for use on Arm Linux systems: https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindBLAS.cmake34
-rw-r--r--Modules/FindLAPACK.cmake34
2 files changed, 68 insertions, 0 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake
index 9b6d09c..caed7ef 100644
--- a/Modules/FindBLAS.cmake
+++ b/Modules/FindBLAS.cmake
@@ -48,6 +48,10 @@ The following variables may be set to influence this module's behavior:
* ``ACML_GPU``
* ``Apple``
* ``NAS``
+ * ``Arm``
+ * ``Arm_mp``
+ * ``Arm_ilp64``
+ * ``Arm_ilp64_mp``
* ``Generic``
``BLA_F95``
@@ -550,6 +554,36 @@ if(BLA_VENDOR STREQUAL "OpenBLAS" OR BLA_VENDOR STREQUAL "All")
endif()
endif()
+# ArmPL blas library? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries)
+if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All")
+
+ # Check for 64bit Integer support
+ if(BLA_VENDOR MATCHES "_ilp64")
+ set(BLAS_armpl_LIB "armpl_ilp64")
+ else()
+ set(BLAS_armpl_LIB "armpl_lp64")
+ endif()
+
+ # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp
+ if(BLA_VENDOR MATCHES "_mp")
+ set(BLAS_armpl_LIB "${BLAS_armpl_LIB}_mp")
+ endif()
+
+ if(NOT BLAS_LIBRARIES)
+ check_blas_libraries(
+ BLAS_LIBRARIES
+ BLAS
+ sgemm
+ ""
+ "${BLAS_armpl_LIB}"
+ ""
+ ""
+ ""
+ )
+ endif()
+
+endif()
+
# FLAME's blis library? (https://github.com/flame/blis)
if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All")
if(NOT BLAS_LIBRARIES)
diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake
index c962976..e5bd58d 100644
--- a/Modules/FindLAPACK.cmake
+++ b/Modules/FindLAPACK.cmake
@@ -38,6 +38,10 @@ The following variables may be set to influence this module's behavior:
* ``ACML``
* ``Apple``
* ``NAS``
+ * ``Arm``
+ * ``Arm_mp``
+ * ``Arm_ilp64``
+ * ``Arm_ilp64_mp``
* ``Generic``
``BLA_F95``
@@ -359,6 +363,36 @@ if(BLAS_FOUND)
endif()
endif()
+ # ArmPL? (https://developer.arm.com/tools-and-software/server-and-hpc/compile/arm-compiler-for-linux/arm-performance-libraries)
+ if(BLA_VENDOR MATCHES "Arm" OR BLA_VENDOR STREQUAL "All")
+
+ # Check for 64bit Integer support
+ if(BLA_VENDOR MATCHES "_ilp64")
+ set(LAPACK_armpl_LIB "armpl_ilp64")
+ else()
+ set(LAPACK_armpl_LIB "armpl_lp64")
+ endif()
+
+ # Check for OpenMP support, VIA BLA_VENDOR of Arm_mp or Arm_ipl64_mp
+ if(BLA_VENDOR MATCHES "_mp")
+ set(LAPACK_armpl_LIB "${LAPACK_armpl_LIB}_mp")
+ endif()
+
+ if(NOT LAPACK_LIBRARIES)
+ check_lapack_libraries(
+ LAPACK_LIBRARIES
+ LAPACK
+ cheev
+ ""
+ "${LAPACK_armpl_LIB}"
+ ""
+ ""
+ ""
+ "${BLAS_LIBRARIES}"
+ )
+ endif()
+ endif()
+
# FLAME's blis library? (https://github.com/flame/blis)
if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All")
if(NOT LAPACK_LIBRARIES)