diff options
author | Cordell Bloor <Cordell.Bloor@amd.com> | 2022-11-16 17:37:51 -0700 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-02 10:56:15 -0400 |
commit | 272fe88ac62356f43316dcd6a3513eef9ae665b9 (patch) | |
tree | d82c3ae3d99a751d4ef8bceac02ca0c24d8b5956 /Modules/FindBLAS.cmake | |
parent | 2488d6dbf7481087fa9ee4a0c77c5e3b0a503387 (diff) | |
download | cmake-272fe88ac62356f43316dcd6a3513eef9ae665b9.tar.gz |
Find{BLAS,LAPACK}: Add AOCL BLIS/libFLAME
The AMD Optimizing CPU Libraries (AOCL) provide forks of BLIS and
libFLAME that are optimized for AMD "Zen" core architectures.
Closes: #23605
Diffstat (limited to 'Modules/FindBLAS.cmake')
-rw-r--r-- | Modules/FindBLAS.cmake | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Modules/FindBLAS.cmake b/Modules/FindBLAS.cmake index 19bef9471c..39a1163533 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) |