-
Notifications
You must be signed in to change notification settings - Fork 6.7k
change mxnet_option behavior #14743
change mxnet_option behavior #14743
Conversation
|
Thank you for the fix @yajiedesign .The OMP issue is also fixed in #14740 @ciyongch @yinghu5 |
|
@TaoLv ok. |
|
#14740 is merged now. Can you rebase? @yajiedesign |
fix omp with msvc with mkldnn
| mxnet_option(USE_LAPACK "Build with lapack support" ON) | ||
| mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON) | ||
| mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE)) | ||
| mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) ) |
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.
MKLML only rely on MKLDNN rather than MKL so we need to switch USE_MKL_IF_AVAILABLE to USE_MKLDNN. @TaoLv
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.
Not sure what's the USE_MKLML_MKL used for. But I think it's out of the scope of this PR. I hope this PR can be merged soon then we can have @yinghu5's changes for cmake including adjustments for these redundant options. @yajiedesign @szha
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.
Agree :)
| mxnet_option(USE_MKL_IF_AVAILABLE "Use MKL if found" ON) | ||
| mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE)) | ||
| mxnet_option(USE_MKLML_MKL "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) ) | ||
| mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT MSVC) AND (CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") AND (NOT CMAKE_CROSSCOMPILING)) |
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.
MKLDNN doesn't rely on USE_MKL_IF_AVAILABLE
pengzhao-intel
left a comment
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.
LGTM
Please rebase the code, one of Julia issue is fixed now.
larroy
left a comment
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.
LGTM
|
@yajiedesign, @TaoLv @pengzhao-intel @larroy thank you for the fix . It also fixes the issue #14729 Build with CMake under windows can't trigger USE_MKLDNN in CI . |
|
Thanks all of your effort and Intel TCE team (@yinghu5 @NeoZhangJianyu) will continuously work on CMake improvement :) Merging now. |
fix omp with msvc with mkldnn
fix omp with msvc with mkldnn
Description
change mxnet_option behavior
In the past, when the condition in mxnet_option was false, the option would be deleted completely instead of set to
OFF. This is not the expected behavior. Now, change it to set toOFFwhen the condition is false.Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments