- changed status to wontfix
BLAS functions used in Blaze
Hi,
I'm trying to find out which BLAS functions are being utilized for what operations in blaze.
Could you please help me with that? And also, how does building blaze with BLAZE_BLAS_MODE=On affect those?
I've seen this page: https://bitbucket.org/blaze-lib/blaze/wiki/BLAS%20Functions, does this mean that when I'm multiplying two large matrices in blaze these BLAS functions are called?
Thanks.
Comments (5)
-
-
reporter Thank you so much for your answer.
-
reporter May I ask the same the question about lapack functions? based on the wiki page for lapack functions the blaze operations which use lapack functions are only decomposition, inversion and determinant of dense matrices, right?
-
Hi Shahrzad!
Blaze uses LAPACK functions for matrix decomposition, matrix inversion, computing the determinants and eigenvalues, and the SVD. In contrast to the BLAS functionality, you cannot disable LAPACK or switch to custom kernels. In case you try to use one of these functionalities, but do not provide (i.e. link) a LAPACK library you will get link time errors.
Best regards,
Klaus!
-
reporter Thank you!
- Log in to comment
Hi Shahrzad!
The only BLAS functions that are utilized by Blaze are the
gemm()
functions for the dense matrix multiplication (i.e.sgemm()
,dgemm()
,cgemm()
, andzgemm()
).The
BLAZE_BLAS_MODE
config switch determines whether Blaze is allowed to use BLAS kernels. IfBLAZE_BLAS_MODE
is set to1
then depending on the size of the dense matrix, Blaze either uses BLAS kernels (for large matrices) or its own custom kernels (for small matrices). The threshold for this decision can be configured via theBLAZE_DMATDMATMULT_THRESHOLD
,BLAZE_DMATTDMATMULT_THRESHOLD
,BLAZE_TDMATDMATMULT_THRESHOLD
andBLAZE_TDMATTDMATMULT_THRESHOLD
config switches (see<blaze/config/Thresholds.h>
). IfBLAZE_BLAS_MODE
is set to0
then Blaze does not utilize the BLAS kernels and unconditionally uses its own custom kernels.The wiki lists all BLAS functions that Blaze provides a wrapper for. These functions mainly exist for benchmarking purposes.
I hope this answers your question.
Best regards,
Klaus!