Add EIGEN_MKL_NO_DIRECT_CALL option

This commit is contained in:
Gael Guennebaud 2017-11-09 11:07:45 +01:00
parent 5fa79f96b8
commit f86bb89d39
2 changed files with 6 additions and 2 deletions

View File

@ -55,7 +55,7 @@
#if defined EIGEN_USE_MKL #if defined EIGEN_USE_MKL
# ifndef MKL_DIRECT_CALL # if (!defined MKL_DIRECT_CALL) && (!defined EIGEN_MKL_NO_DIRECT_CALL)
# define MKL_DIRECT_CALL # define MKL_DIRECT_CALL
# define MKL_DIRECT_CALL_JUST_SET # define MKL_DIRECT_CALL_JUST_SET
# endif # endif

View File

@ -63,7 +63,11 @@ In addition you can choose which parts will be substituted by defining one or mu
<tr><td>\c EIGEN_USE_MKL_ALL </td><td>Defines \c EIGEN_USE_BLAS, \c EIGEN_USE_LAPACKE, and \c EIGEN_USE_MKL_VML </td></tr> <tr><td>\c EIGEN_USE_MKL_ALL </td><td>Defines \c EIGEN_USE_BLAS, \c EIGEN_USE_LAPACKE, and \c EIGEN_USE_MKL_VML </td></tr>
</table> </table>
The options can be combined with \b MKL_DIRECT_CALL to enable MKL direct call feature. This may help to increase performance of some MKL BLAS (?GEMM, ?GEMV, ?TRSM, ?AXPY and ?DOT) and LAPACK (LU, Cholesky and QR) routines for very small matrices. To make it work properly, the macro \c EIGEN_USE_MKL must also be defined in the case none of the other \c EIGEN_USE_MKL_* macros has been defined. The \c EIGEN_USE_BLAS and \c EIGEN_USE_LAPACKE* macros can be combined with \c EIGEN_USE_MKL to explicitly tell Eigen that the underlying BLAS/Lapack implementation is Intel MKL.
The main effect is to enable MKL direct call feature (\c MKL_DIRECT_CALL).
This may help to increase performance of some MKL BLAS (?GEMM, ?GEMV, ?TRSM, ?AXPY and ?DOT) and LAPACK (LU, Cholesky and QR) routines for very small matrices.
MKL direct call can be disabled by defining \c EIGEN_MKL_NO_DIRECT_CALL.
Note that the BLAS and LAPACKE backends can be enabled for any F77 compatible BLAS and LAPACK libraries. See this \link TopicUsingBlasLapack page \endlink for the details. Note that the BLAS and LAPACKE backends can be enabled for any F77 compatible BLAS and LAPACK libraries. See this \link TopicUsingBlasLapack page \endlink for the details.