-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
detect cblas.h during cmake for openblas #4013
Conversation
cmake/ShogunFindLAPACK.cmake
Outdated
@@ -91,6 +91,22 @@ IF (LAPACK_FOUND) | |||
ENDIF() | |||
ENDIF() | |||
|
|||
IF(FOUND_CBLAS_DGEMV AND NOT HAVE_ATLAS ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the whitespace after HAVE_ATLAS
cmake/ShogunFindLAPACK.cmake
Outdated
@@ -91,6 +91,22 @@ IF (LAPACK_FOUND) | |||
ENDIF() | |||
ENDIF() | |||
|
|||
IF(FOUND_CBLAS_DGEMV AND NOT HAVE_ATLAS ) | |||
#check is detected BLAS/LAPACK is OpenBLAS by looking for an OpenBLAS specific function | |||
check_library_exists("${LAPACK_LIBRARIES}" openblas_set_num_threads "" FOUND_OPENBLAS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to follow the logic _FOUND please change this to OpenBLAS_FOUND
cmake/ShogunFindLAPACK.cmake
Outdated
#check if cblas.h exists | ||
FIND_PATH(CBLAS_INCLUDE_DIR cblas.h) | ||
IF(NOT CBLAS_INCLUDE_DIR) | ||
MESSAGE(STATUS "Found OPENBLAS, but not cblas.h. Make sure that cblas headers are available in order to use OPENBLAS as BLAS/Lapack backend") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure that cblas.h header is available within the header search path in order to use OpenBLAS as BLAS/Lapack backend
detect cblas.h during cmake for openblas
resolves #3996
When Atlas is not detected, a further check is implemented to see if detected LAPACK API is OpenBLAS using search for an openBLAS specific function. If it is then cblas.h is checked otherwise all LAPACK flags are unset and error is shown.