diff options
author | Brad King <brad.king@kitware.com> | 2023-05-03 12:56:52 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-05-03 12:57:07 (GMT) |
commit | 52dde6f012ebba2aeb8b30c0a196b49b70116cf2 (patch) | |
tree | 680980d2296421a148957fbf4af3f1e546aaa85f | |
parent | 26ca1026c794f858b65dc487013febd6cd7b3632 (diff) | |
parent | 272fe88ac62356f43316dcd6a3513eef9ae665b9 (diff) | |
download | CMake-52dde6f012ebba2aeb8b30c0a196b49b70116cf2.zip CMake-52dde6f012ebba2aeb8b30c0a196b49b70116cf2.tar.gz CMake-52dde6f012ebba2aeb8b30c0a196b49b70116cf2.tar.bz2 |
Merge topic 'add-aocl-blas-vendor'
272fe88ac6 Find{BLAS,LAPACK}: Add AOCL BLIS/libFLAME
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8450
-rw-r--r-- | Modules/FindBLAS.cmake | 37 | ||||
-rw-r--r-- | Modules/FindLAPACK.cmake | 23 |
2 files changed, 60 insertions, 0 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 19bef94..39a1163 100644 --- a/Modules/FindBLAS.cmake +++ b/Modules/FindBLAS.cmake @@ -93,6 +93,11 @@ BLAS/LAPACK Vendors ``ACML``, ``ACML_MP``, ``ACML_GPU`` AMD Core Math Library +``AOCL``, ``AOCL_mt`` + .. versionadded:: 3.27 + + AMD Optimizing CPU Libraries + ``Apple``, ``NAS`` Apple BLAS (Accelerate), and Apple NAS (vecLib) @@ -848,6 +853,38 @@ if(BLA_VENDOR STREQUAL "FLAME" OR BLA_VENDOR STREQUAL "All") unset(_blas_flame_lib) endif() +# AOCL's blis library? (https://developer.amd.com/amd-aocl/) +if(BLA_VENDOR MATCHES "AOCL" OR BLA_VENDOR STREQUAL "All") + set(_blas_aocl_lib "blis") + + if(_blas_sizeof_integer EQUAL 8) + set(_blas_aocl_subdir "ILP64") + else() + set(_blas_aocl_subdir "LP64") + endif() + + # Check for multi-threaded support + if(BLA_VENDOR MATCHES "_mt") + string(APPEND _blas_aocl_lib "-mt") + endif() + + if(NOT BLAS_LIBRARIES) + check_blas_libraries( + BLAS_LIBRARIES + BLAS + sgemm + "" + "${_blas_aocl_lib}" + "" + "" + "${_blas_aocl_subdir}" + ) + endif() + + unset(_blas_aocl_lib) + unset(_blas_aocl_subdir) +endif() + # BLAS in the ATLAS library? (http://math-atlas.sourceforge.net/) if(BLA_VENDOR STREQUAL "ATLAS" OR BLA_VENDOR STREQUAL "All") if(NOT BLAS_LIBRARIES) diff --git a/Modules/FindLAPACK.cmake b/Modules/FindLAPACK.cmake index 17117bd..4d3ab5a 100644 --- a/Modules/FindLAPACK.cmake +++ b/Modules/FindLAPACK.cmake @@ -561,6 +561,29 @@ if(NOT LAPACK_NOT_FOUND_MESSAGE) endif() endif() + # AOCL? (https://developer.amd.com/amd-aocl/) + if(NOT LAPACK_LIBRARIES + AND (BLA_VENDOR MATCHES "AOCL" OR BLA_VENDOR STREQUAL "All")) + if(_lapack_sizeof_integer EQUAL 8) + set(_lapack_aocl_subdir "ILP64") + else() + set(_lapack_aocl_subdir "LP64") + endif() + + check_lapack_libraries( + LAPACK_LIBRARIES + LAPACK + cheev + "" + "flame" + "-fopenmp" + "" + "${_lapack_aocl_subdir}" + "${BLAS_LIBRARIES}" + ) + unset(_lapack_aocl_subdir) + endif() + # LAPACK in SCSL library? (SGI/Cray Scientific Library) if(NOT LAPACK_LIBRARIES AND (BLA_VENDOR MATCHES "SCSL" OR BLA_VENDOR STREQUAL "All")) |