-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[MXNET-115] USE_LAPACK is forced on all platforms with OpenBLAS and c… #11094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this change (assuming we want to keep the lapack functionality) you have to remove the hacks for arm cross compilations ie -DUSE_LAPACK=ON
. With the old version is was faulty but forced on all platforms, with this change the option becomes effective.
if(BLAS STREQUAL "Open" OR BLAS STREQUAL "open" OR USE_BLAS STREQUAL "Open" OR USE_BLAS STREQUAL "open") | ||
add_definitions(-DMXNET_USE_LAPACK=1) | ||
if (NOT MSVC) | ||
list(APPEND mxnet_LINKER_LIBS lapack) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no separate liblapack for openblas as far as I understood. Is there for other libraries other than OpenBLAS? As far as I can tell CI checks only for OpenBLAS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't get your comment, I tried to fix the logic as I understood the previous logic was working around adding these flags in the windows case and breaking other platforms. Can you elaborate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
list(APPEND mxnet_LINKER_LIBS lapack)
line adds liblapack to required linker libraries. But there is no such think as liblapack for OpenBLAS, at least not for our builds. The CI passed in this case because with this change -DUSE_LAPACK=OFF
becomes effective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And there is a chance that liblapack exists for other blas libraries (atlas?) but we are not testing them in CI currently
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With your change you need to set -DUSE_LAPACK=ON
in arm builds not to loose lapack functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just create symlinks such as libcblas and liblapack to the compiled libopenblas. There’s no need to hack around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this might be an option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification, I got now what was the concern. We need better ARM / ANDROID architecture detection when cross compiling in CMake. This might be something we can definitely refine later. For the moment I'm fine with either solution proposed by @lebeg or @szha I think we will need to refine and improve this logic on future PRS.
Mkl also has lapack95, but it’s not supported by mxnet. |
ping |
…make
Description
(Brief description on what this PR is about)
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments