Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[Discussion] the condition semantics of mxnet_option. #14640

Closed
yajiedesign opened this issue Apr 8, 2019 · 5 comments
Closed

[Discussion] the condition semantics of mxnet_option. #14640

yajiedesign opened this issue Apr 8, 2019 · 5 comments
Labels
CMake CMake related bugs/issues/improvements

Comments

@yajiedesign
Copy link
Contributor

current ,If the mxnet_option condition is not satisfied, this option will be turned off ,not setting the default value off.
But the current conditions in mxnet_option seem to want to set default values. Are we going to modify mxnet_option?

@mxnet-label-bot
Copy link
Contributor

Hey, this is the MXNet Label Bot.
Thank you for submitting the issue! I will try and suggest some labels so that the appropriate MXNet community members can help resolve it.
Here are my recommended labels: Feature

@yajiedesign yajiedesign added the CMake CMake related bugs/issues/improvements label Apr 8, 2019
@yajiedesign yajiedesign assigned szha and unassigned szha Apr 8, 2019
@TaoLv
Copy link
Member

TaoLv commented Apr 8, 2019

+1 for changing mxnet_option. We met issue when build mxnet on Windows and seems -DUSE_MKLDNN=1 in command line will be overwritten by mxnet_option. @yinghu5

@yinghu5
Copy link
Contributor

yinghu5 commented Apr 15, 2019

+1, in details, we are trying use cmake to build mxnet with MKLDNN on windows
Cmake the command line: cmake -G "Visual Studio 14 Win64" .. -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_MKLDNN=1 -DCMAKE_BUILD_TYPE=Release

we expect the -DUSE_MKLDNN=1 can overwrite the USE_MKLDNN
But in Cmakelist.txt file of Mxnet , line 33 .

-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))

It doesn't work under MSVC + windows, because it was limited to "NOT MSVC" and CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") should be AMD64.
As a result, anyone can't build mxnet under windows whatever (even with -DUSE_MKLDNN=1)

We expect the external user define like -DUSE_MKLDNN=1 can overwrite the mxnet_option

currently, as workaround, we change the line as below.

+mxnet_option(USE_MKLDNN "Use MKLDNN variant of MKL (if MKL found)" ON IF USE_MKL_IF_AVAILABLE AND (NOT APPLE) AND (NOT CMAKE_CROSSCOMPILING) AND ((CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64") OR (CMAKE_SYSTEM_PROCESSOR STREQUAL "AMD64")))

thanks

@TaoLv
Copy link
Member

TaoLv commented Apr 17, 2019

Hi @yajiedesign , do you have any plan to improve mxnet_option now? We found that actually MKL-DNN backend is not built and tested in CI for Windows.

@yajiedesign
Copy link
Contributor Author

#14743

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CMake CMake related bugs/issues/improvements
Projects
None yet
Development

No branches or pull requests

5 participants