[MXNET-679] Improved CMakeLists.txt#13576
Conversation
| USE_LAPACK: "ON" # Build with lapack support | ||
| USE_MKL_IF_AVAILABLE: "ON" # Use MKL if found | ||
| USE_MKLML_MKL: "ON" # Use MKLDNN variant of MKL (if MKL found) IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) | ||
| USE_MKLML: "ON" # Use MKLDNN variant of MKL (if MKL found) IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) |
There was a problem hiding this comment.
Not sure about that one, especially considering it breaks compatibility and hides the initial intention to only use the mkl version
@TaoLv
There was a problem hiding this comment.
There are no guarantees currently about CMake options compatibility.
hides the initial intention to only use the mkl version
I'm not sure I understand, what intention do you mean?
There was a problem hiding this comment.
The comment states that this option is to specifically use the mkldnn variant of mkl and not the standalone mkldnn.
You are right that we do not guarantee compatibility, but I don't see a good reason here why we should break it intentionally. Could you elaborate?
There was a problem hiding this comment.
Agree that compatibility is more important, although USE_MKLML_MKL is really redundant for me. Is it possible to give a warning message if USE_MKLML_MKL is provided and set its value to USE_MKLML? And remove this warning message and USE_MKLML_MKL totally in a major release?
There was a problem hiding this comment.
You are right that we do not guarantee compatibility, but I don't see a good reason here why we should break it intentionally. Could you elaborate?
Because the name does not make sense and leads to confusion.
The comment states that this option is to specifically use the mkldnn variant of mkl and not the standalone mkldnn.
This is an example of the confusion. There is no such thing as mkldnn variant of mkl. There is MKLDNN - an independent addition to MKL. And there is a packed (and easier to download) version of MKL - MKLML.
What is and was wrong though is the comment about this variable, since the option is not related to MKLDNN.
There was a problem hiding this comment.
Is it possible to give a warning message if USE_MKLML_MKL is provided and set its value to USE_MKLML?
I have added a warning.
bc40150 to
1df10d3
Compare
|
@lebeg Can you check failing builds? |
|
@mxnet-label-bot Update [pr-awaiting-response] |
|
@lebeg any progress in this PR? someone reported the issue of cmake with MKLDNN as below. Thanks in advance. https://discuss.gluon.ai/t/topic/5622/47
|
|
@pengzhao-intel could you post an alternative link? It looks quite suspicious and I have defused it for now. |
|
@marcoabreu Edited. It's Chinese forum and you can try google translation on the web :) I heard it's a known issue for linking MKL BLAS in CMAKE for a while. I think we need to increase the priority to fix it. Any idea? |
Yes, probably. I have tested it with full MKL and MKLML lib. From what I can see in the cmake log above it seems that the downloaded MKLML is used in one case and MKL from |
|
@lebeg Could you rebase and address the conflicts then we can move forward? |
Actually, I was wrong. This PR doesn't touch FindMKL.cmake. That was fixed in #11148 but never went through. |
|
@lebeg - This is super useful PR. Can you please help take this forward? |
| -DUSE_CUDNN=1 \ | ||
| -DUSE_MKLML_MKL=1 \ | ||
| -DUSE_MKLML=1 \ | ||
| -DUSE_MKLDNN=1 \ |
There was a problem hiding this comment.
USE_MKLDNN=1 is default here. No need to turn it explicitly on.
ff5fa60 to
313e6f4
Compare
|
@lebeg could you re-trigger CI? |
a5dc272 to
8acc247
Compare
|
@lebeg please update the PR as per the comments. |
|
@lebeg Could you please re-trigger the CI again since some tests are failing and can you please address the comments? Thank you! |
|
@lebeg Can you rebase with the current master branch ? There seems to be a conflict. |
|
It seems that there are more problems. I'm closing this for now as I don't have time for it right now. It would be really great to see somebody picking it up from here. |
Description
Part of #11148
Checklist
Essentials
Changes
cmake/ChooseBlas.cmaketocmake/ChooseBLAS.cmakeUSE_MKLML_MKLtoUSE_MKLML