- edited description
Possibly incomplete documentation regarding BLAS libraries
Hi,
as I mentioned in another issue I’m working on an alternative CMake script to import blaze. Looking at the existing CMakeLists.txt I saw the following line
set(BLAZE_BLAS_INCLUDE_FILE "<cblas.h>" CACHE STRING "Specify the name of the BLAS header file (e.g. with MKL the file is called mkl_cblas.h)")
As far as I can say the documentation does not mention any setting necessary to use MKL (or any other BLAS library). I think this information should be added somewhere to the documentation.
Best regards
Thorsten
Comments (9)
-
reporter -
reporter - edited description
-
reporter - edited description
-
- changed status to wontfix
Hi Thorsten!
The requirements on BLAS and LAPACK are mentioned in the first and second paragraph of the requirements section on the Configuration and Installation page of the wiki. Additionally, the configuration section explains how to configure BLAS properly. From our point of view this clearly and as early as possible points to the fact that both BLAS and LAPACK are required. The
CMakeLists.txt
should reflect this requirement.Best regards,
Klaus!
-
reporter Since this is your library it is of course your decision. However I disagree. The requirements only mention the need of BLAS/LAPACK. The part about configuration in the installation only refers to the files and the section on configuration files. And this section only mentions
#define BLAZE_BLAS_MODE 1 #define BLAZE_BLAS_IS_PARALLEL 1
as BLAS settings. Nowhere is mentioned that you need to change the required header file (or any of the other BLAS settings). You only see this if you either manually edit the header file or read the CMakeLists.txt, which you don't necessarily do for a find_package call, to see any of this configurations.
In my opinion the codumentation should at least mention the necessary change of the header file and that not all configurations are listed in the documentation, both for the config files and the CMake files.
-
Hi Thorsten!
From your initial post I got the impression that you are missing the general information that the BLAS documentation is missing:
… does not mention any setting necessary to use MKL (or any other BLAS library). …
From your second post I understand that you are merely missing the information about the
BLAZE_BLAS_INCLUDE_FILE
switch. That is of course an information that can be easily added to the the configuration section. Thanks for the clarification,Best regards,
Klaus!
-
-
assigned issue to
-
assigned issue to
-
- changed status to open
-
- changed status to resolved
Summary
The
BLAZE_BLAS_INCLUDE_FILE
switch has been added to the documentation of the available BLAS flags. The updated tutorial is immediately available via cloning the Blaze repository, the updated wiki will be officially released with Blaze 3.6.BLAS Mode
In order to achieve maximum performance for multiplications with dense matrices, Blaze can be configured to use a BLAS library. Via the following compilation switch in the configuration file
./blaze/config/BLAS.h
BLAS can be enabled:#define BLAZE_BLAS_MODE 1
In case the selected BLAS library provides parallel execution, the
BLAZE_BLAS_IS_PARALLEL
switch should be activated to prevent Blaze from parallelizing on its own:#define BLAZE_BLAS_IS_PARALLEL 1
Additionally, it is possible to specify the name of the BLAS include file via the
BLAZE_BLAS_INCLUDE_FILE
switch. The default setting is<cblas.h>
:#define BLAZE_BLAS_INCLUDE_FILE <cblas.h>
Alternatively, all settings can be specified via command line or by defining the symbols manually before including any Blaze header file:
#define BLAZE_BLAS_MODE 1 #define BLAZE_BLAS_IS_PARALLEL 1 #define BLAZE_BLAS_INCLUDE_FILE <cblas.h> #include <blaze/Blaze.h>
In case no BLAS library is available, Blaze will still work and will not be reduced in functionality, but performance may be limited.
- Log in to comment