From 1e5df933dfa60903d5c59e399f64b8b9001e0ad2 Mon Sep 17 00:00:00 2001 From: Pedro Larroy Date: Fri, 7 Dec 2018 19:06:25 +0100 Subject: [PATCH] Address CR comment --- src/operator/c_lapack_api.cc | 12 ++++++++---- src/operator/c_lapack_api.h | 7 +------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/operator/c_lapack_api.cc b/src/operator/c_lapack_api.cc index 8becba0075fa..ca579f0d95ca 100644 --- a/src/operator/c_lapack_api.cc +++ b/src/operator/c_lapack_api.cc @@ -19,9 +19,13 @@ #include "c_lapack_api.h" -#if (MSHADOW_USE_MKL && MXNET_USE_LAPACK) -#elif MXNET_USE_LAPACK -#else +// Avoids a Compiler bug due to excessive inlining +#if ! MXNET_USE_LAPACK + // use pragma message instead of warning + #pragma message("Warning: lapack usage not enabled, linalg-operators will not be available." \ + " Ensure that lapack library is installed and build with USE_LAPACK=1 to get lapack" \ + " functionalities.") + // Define compilable stubs. #define MXNET_LAPACK_CWRAPPER1(func, dtype) \ int MXNET_LAPACK_##func(int matrix_layout, char uplo, int n, dtype* a, int lda) { \ @@ -64,4 +68,4 @@ MXNET_LAPACK_CWRAPPER3(ssyevd, float) MXNET_LAPACK_CWRAPPER3(dsyevd, double) -#endif // MSHADOW_USE_MKL == 0 +#endif // MXNET_USE_LAPACK diff --git a/src/operator/c_lapack_api.h b/src/operator/c_lapack_api.h index c66e7ce399f6..cd69775547b4 100644 --- a/src/operator/c_lapack_api.h +++ b/src/operator/c_lapack_api.h @@ -324,12 +324,7 @@ inline void flip(int m, int n, DType *b, int ldb, DType *a, int lda) { #else - // use pragma message instead of warning - /* - #pragma message("Warning: lapack usage not enabled, linalg-operators will not be available." \ - " Ensure that lapack library is installed and build with USE_LAPACK=1 to get lapack" \ - " functionalities.") - */ + #define MXNET_LAPACK_ROW_MAJOR 101 #define MXNET_LAPACK_COL_MAJOR 102