mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-01-18 17:31:19 +01:00
committed by
Rasmus Munk Larsen
parent
a73501cc76
commit
01a919d13f
@@ -34,6 +34,11 @@ if (POLICY CMP0177)
|
|||||||
cmake_policy(SET CMP0177 NEW)
|
cmake_policy(SET CMP0177 NEW)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# Respect <PackageName>_ROOT variables.
|
||||||
|
if (POLICY CMP0074)
|
||||||
|
cmake_policy(SET CMP0074 NEW)
|
||||||
|
endif ()
|
||||||
|
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# CMake Project.
|
# CMake Project.
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
@@ -306,7 +311,6 @@ if (EIGEN_IS_BUILDING_)
|
|||||||
set(CMAKE_INCLUDE_CURRENT_DIR OFF)
|
set(CMAKE_INCLUDE_CURRENT_DIR OFF)
|
||||||
|
|
||||||
find_package(StandardMathLibrary)
|
find_package(StandardMathLibrary)
|
||||||
cmake_policy(SET CMP0074 NEW)
|
|
||||||
find_package(AOCL QUIET)
|
find_package(AOCL QUIET)
|
||||||
set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO "")
|
set(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO "")
|
||||||
if(AOCL_FOUND)
|
if(AOCL_FOUND)
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
# AOCL_INCLUDE_DIRS - Include directories for AOCL headers
|
# AOCL_INCLUDE_DIRS - Include directories for AOCL headers
|
||||||
# AOCL_BLAS_TYPE - Type of BLIS library found ("multithreaded" or "single-threaded")
|
# AOCL_BLAS_TYPE - Type of BLIS library found ("multithreaded" or "single-threaded")
|
||||||
# AOCL_CORE_LIB - Path to core AOCL math library
|
# AOCL_CORE_LIB - Path to core AOCL math library
|
||||||
# AOCL_BLAS_LIB - Path to AOCL BLAS library
|
# AOCL_BLAS_LIB - Path to AOCL BLAS library
|
||||||
# AOCL_LAPACK_LIB - Path to AOCL LAPACK library
|
# AOCL_LAPACK_LIB - Path to AOCL LAPACK library
|
||||||
#
|
#
|
||||||
# Configuration Options:
|
# Configuration Options:
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
#
|
#
|
||||||
# # For multithreaded BLIS:
|
# # For multithreaded BLIS:
|
||||||
# cmake .. -DEIGEN_AOCL_BENCH_USE_MT=ON
|
# cmake .. -DEIGEN_AOCL_BENCH_USE_MT=ON
|
||||||
#
|
#
|
||||||
# # For single-threaded BLIS:
|
# # For single-threaded BLIS:
|
||||||
# cmake .. -DEIGEN_AOCL_BENCH_USE_MT=OFF
|
# cmake .. -DEIGEN_AOCL_BENCH_USE_MT=OFF
|
||||||
#
|
#
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
# ---------------------
|
# ---------------------
|
||||||
# The module searches for AOCL libraries in the following order:
|
# The module searches for AOCL libraries in the following order:
|
||||||
# 1. ${AOCL_ROOT}/lib (or ${AOCL_ROOT}/lib32 for 32-bit)
|
# 1. ${AOCL_ROOT}/lib (or ${AOCL_ROOT}/lib32 for 32-bit)
|
||||||
# 2. /opt/amd/aocl/lib64 (or /opt/amd/aocl/lib32 for 32-bit)
|
# 2. /opt/amd/aocl/lib64 (or /opt/amd/aocl/lib32 for 32-bit)
|
||||||
# 3. ${LIB_INSTALL_DIR}
|
# 3. ${LIB_INSTALL_DIR}
|
||||||
#
|
#
|
||||||
# Expected Library Names:
|
# Expected Library Names:
|
||||||
@@ -86,9 +86,13 @@
|
|||||||
if(NOT DEFINED AOCL_ROOT)
|
if(NOT DEFINED AOCL_ROOT)
|
||||||
if(DEFINED ENV{AOCL_ROOT})
|
if(DEFINED ENV{AOCL_ROOT})
|
||||||
set(AOCL_ROOT $ENV{AOCL_ROOT})
|
set(AOCL_ROOT $ENV{AOCL_ROOT})
|
||||||
message(STATUS "AOCL_ROOT set from environment: ${AOCL_ROOT}")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(STATUS "AOCL_ROOT set from environment: ${AOCL_ROOT}")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
message(WARNING "AOCL_ROOT is not set. AOCL support will be disabled.")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(WARNING "AOCL_ROOT is not set. AOCL support will be disabled.")
|
||||||
|
endif()
|
||||||
set(AOCL_LIBRARIES "")
|
set(AOCL_LIBRARIES "")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@@ -115,27 +119,33 @@ endif()
|
|||||||
/opt/amd/aocl/lib64
|
/opt/amd/aocl/lib64
|
||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_CORE_LIB)
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
message(STATUS "Found AOCL core library: ${AOCL_CORE_LIB}")
|
if(AOCL_CORE_LIB)
|
||||||
else()
|
message(STATUS "Found AOCL core library: ${AOCL_CORE_LIB}")
|
||||||
message(WARNING "AOCL core library not found in ${AOCL_ROOT}/lib or default locations.")
|
else()
|
||||||
|
message(WARNING "AOCL core library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Conditional BLIS library search based on MT requirement
|
# Conditional BLIS library search based on MT requirement
|
||||||
if(EIGEN_AOCL_BENCH_USE_MT)
|
if(EIGEN_AOCL_BENCH_USE_MT)
|
||||||
# Search for multithreaded BLIS first
|
# Search for multithreaded BLIS first
|
||||||
find_library(AOCL_BLAS_LIB
|
find_library(AOCL_BLAS_LIB
|
||||||
NAMES blis-mt
|
NAMES blis-mt
|
||||||
PATHS
|
PATHS
|
||||||
${AOCL_ROOT}/lib
|
${AOCL_ROOT}/lib
|
||||||
/opt/amd/aocl/lib64
|
/opt/amd/aocl/lib64
|
||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_BLAS_LIB)
|
if(AOCL_BLAS_LIB)
|
||||||
message(STATUS "Found AOCL BLAS (MT) library: ${AOCL_BLAS_LIB}")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found AOCL BLAS (MT) library: ${AOCL_BLAS_LIB}")
|
||||||
|
endif()
|
||||||
set(AOCL_BLAS_TYPE "multithreaded")
|
set(AOCL_BLAS_TYPE "multithreaded")
|
||||||
else()
|
else()
|
||||||
message(WARNING "AOCL multithreaded BLAS library not found, falling back to single-threaded.")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(WARNING "AOCL multithreaded BLAS library not found, falling back to single-threaded.")
|
||||||
|
endif()
|
||||||
find_library(AOCL_BLAS_LIB
|
find_library(AOCL_BLAS_LIB
|
||||||
NAMES blis
|
NAMES blis
|
||||||
PATHS
|
PATHS
|
||||||
@@ -155,10 +165,14 @@ endif()
|
|||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_BLAS_LIB)
|
if(AOCL_BLAS_LIB)
|
||||||
message(STATUS "Found AOCL BLAS (ST) library: ${AOCL_BLAS_LIB}")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found AOCL BLAS (ST) library: ${AOCL_BLAS_LIB}")
|
||||||
|
endif()
|
||||||
set(AOCL_BLAS_TYPE "single-threaded")
|
set(AOCL_BLAS_TYPE "single-threaded")
|
||||||
else()
|
else()
|
||||||
message(WARNING "AOCL single-threaded BLAS library not found.")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(WARNING "AOCL single-threaded BLAS library not found.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -170,10 +184,12 @@ endif()
|
|||||||
/opt/amd/aocl/lib64
|
/opt/amd/aocl/lib64
|
||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_LAPACK_LIB)
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
message(STATUS "Found AOCL LAPACK library: ${AOCL_LAPACK_LIB}")
|
if(AOCL_LAPACK_LIB)
|
||||||
else()
|
message(STATUS "Found AOCL LAPACK library: ${AOCL_LAPACK_LIB}")
|
||||||
message(WARNING "AOCL LAPACK library not found in ${AOCL_ROOT}/lib or default locations.")
|
else()
|
||||||
|
message(WARNING "AOCL LAPACK library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
@@ -185,26 +201,32 @@ endif()
|
|||||||
/opt/amd/aocl/lib32
|
/opt/amd/aocl/lib32
|
||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_CORE_LIB)
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
message(STATUS "Found AOCL core library: ${AOCL_CORE_LIB}")
|
if(AOCL_CORE_LIB)
|
||||||
else()
|
message(STATUS "Found AOCL core library: ${AOCL_CORE_LIB}")
|
||||||
message(WARNING "AOCL core library not found in ${AOCL_ROOT}/lib or default locations.")
|
else()
|
||||||
|
message(WARNING "AOCL core library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Conditional BLIS library search for 32-bit
|
# Conditional BLIS library search for 32-bit
|
||||||
if(EIGEN_AOCL_BENCH_USE_MT)
|
if(EIGEN_AOCL_BENCH_USE_MT)
|
||||||
find_library(AOCL_BLAS_LIB
|
find_library(AOCL_BLAS_LIB
|
||||||
NAMES blis-mt
|
NAMES blis-mt
|
||||||
PATHS
|
PATHS
|
||||||
${AOCL_ROOT}/lib
|
${AOCL_ROOT}/lib
|
||||||
/opt/amd/aocl/lib32
|
/opt/amd/aocl/lib32
|
||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_BLAS_LIB)
|
if(AOCL_BLAS_LIB)
|
||||||
message(STATUS "Found AOCL BLAS (MT) library: ${AOCL_BLAS_LIB}")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found AOCL BLAS (MT) library: ${AOCL_BLAS_LIB}")
|
||||||
|
endif()
|
||||||
set(AOCL_BLAS_TYPE "multithreaded")
|
set(AOCL_BLAS_TYPE "multithreaded")
|
||||||
else()
|
else()
|
||||||
message(WARNING "AOCL multithreaded BLAS library not found, falling back to single-threaded.")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(WARNING "AOCL multithreaded BLAS library not found, falling back to single-threaded.")
|
||||||
|
endif()
|
||||||
find_library(AOCL_BLAS_LIB
|
find_library(AOCL_BLAS_LIB
|
||||||
NAMES blis
|
NAMES blis
|
||||||
PATHS
|
PATHS
|
||||||
@@ -223,10 +245,14 @@ endif()
|
|||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_BLAS_LIB)
|
if(AOCL_BLAS_LIB)
|
||||||
message(STATUS "Found AOCL BLAS (ST) library: ${AOCL_BLAS_LIB}")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found AOCL BLAS (ST) library: ${AOCL_BLAS_LIB}")
|
||||||
|
endif()
|
||||||
set(AOCL_BLAS_TYPE "single-threaded")
|
set(AOCL_BLAS_TYPE "single-threaded")
|
||||||
else()
|
else()
|
||||||
message(WARNING "AOCL single-threaded BLAS library not found.")
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
|
message(WARNING "AOCL single-threaded BLAS library not found.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -237,10 +263,12 @@ endif()
|
|||||||
/opt/amd/aocl/lib32
|
/opt/amd/aocl/lib32
|
||||||
${LIB_INSTALL_DIR}
|
${LIB_INSTALL_DIR}
|
||||||
)
|
)
|
||||||
if(AOCL_LAPACK_LIB)
|
if (NOT AOCL_FIND_QUIETLY)
|
||||||
message(STATUS "Found AOCL LAPACK library: ${AOCL_LAPACK_LIB}")
|
if(AOCL_LAPACK_LIB)
|
||||||
else()
|
message(STATUS "Found AOCL LAPACK library: ${AOCL_LAPACK_LIB}")
|
||||||
message(WARNING "AOCL LAPACK library not found in ${AOCL_ROOT}/lib or default locations.")
|
else()
|
||||||
|
message(WARNING "AOCL LAPACK library not found in ${AOCL_ROOT}/lib or default locations.")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user