You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/11/07 16:10:51 UTC
[GitHub] mseeger commented on a change in pull request #8577: support for lapack functions with mkl
mseeger commented on a change in pull request #8577: support for lapack functions with mkl
URL: https://github.com/apache/incubator-mxnet/pull/8577#discussion_r149419608
##########
File path: src/operator/c_lapack_api.h
##########
@@ -160,7 +162,73 @@ inline void flip<cpu, double>(int m, int n,
}
-#if MXNET_USE_LAPACK
+#if (MSHADOW_USE_MKL && MXNET_USE_LAPACK)
+
+ // We interface with the C-interface of MKL
+ // as this is the preferred way.
+ #include <mkl_lapacke.h>
+
+ #define MXNET_LAPACK_ROW_MAJOR LAPACK_ROW_MAJOR
+ #define MXNET_LAPACK_COL_MAJOR LAPACK_COL_MAJOR
+ #define MXNET_LAPACK_spotrf LAPACKE_spotrf
+ #define MXNET_LAPACK_dpotrf LAPACKE_dpotrf
+ #define MXNET_LAPACK_spotri LAPACKE_spotri
+ #define MXNET_LAPACK_dpotri LAPACKE_dpotri
+ #define mxnet_lapack_sposv LAPACKE_sposv
+ #define mxnet_lapack_dposv LAPACKE_dposv
+
+ // The following functions differ in signature from the
+ // MXNET_LAPACK-signature and have to be wrapped.
+ #define MXNET_LAPACK_CWRAP_GELQF(prefix, dtype) \
+ inline int MXNET_LAPACK_##prefix##gelqf(int matrix_layout, int m, int n, \
Review comment:
Do you really not just want to fix the matrix_layout to column major?
I think it is a bit dangerous to leave this choice open.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services