-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Add Windows MKLDNN Building Instruction #10613
Conversation
MKL_README.md
Outdated
2. Update mkldnn to the newest: | ||
``` | ||
cd 3rdparty/mkldnn/ && git checkout master && git pull | ||
``` |
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.
This is because mxnet doesn't point to the latest commit in mkldnn master branch, right now?
This is indeed awkward. Ideally, we don't want users to do it manually. but on the other hand, it's unclear if we should move to the latest commit in mkldnn repo right now.
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 have to agree with @zheng-da would refrain from adding this instruction. We should only support the versions which are part of our repository. If there's a need to upgrade, we'll have to do it here. Otherwise we're going to run into issues with people who upgrade on their own while we have not validated that version with our CI.
MKL_README.md
Outdated
add_definitions(-DMXNET_USE_MKLDNN=1) | ||
endif() | ||
find_package(MKL) | ||
``` |
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'm not sure why we need to do this? If you want to turn some options off in cmake, you can do it in the command line. we definitely don't want users to modify CMakeLists.txt
MKL_README.md
Outdated
|
||
Extract it to `3rdparty/mkldnn/external` manually. | ||
|
||
4. Copy file `3rdparty/mkldnn/config_template.vcxproj` to incubator-mxnet root. |
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.
is it possible to do everything from step 2 to 4 in a single command line? once we update the mkldnn submodule, we won't need step 2.
MKL_README.md
Outdated
|
||
6. Modify `incubator-mxnet\src\operator\tensor\elemwise_sum.h`: | ||
|
||
Modify `Sum` in `line 40,73,80,88,94,97` to `Sum2` since it has conflicts with `Sum` in MKLDNN. |
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.
is this a bug? if it is, can you submit a PR to fix it?
MKL_README.md
Outdated
mkdir build | ||
cd build | ||
cmake -G "Visual Studio 14 Win64" .. | ||
``` |
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.
what is step 7? can we not do it in a normal command prompt?
MKL_README.md
Outdated
cmake -G "Visual Studio 14 Win64" .. | ||
``` | ||
|
||
Note that you should close the openmp since MSVC doesn't support openMP3.0. Enable MKLDNN with `MKLDNN_VERBOSE=1`. |
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.
do we need to turn off openmp in cmake?
why do we enable MKLDNN_VERBOSE here?
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.
our cmakefile should detect this automatically and disable the features accordingly. We should not expect users to change the configuration just in order to get it compiled locally. In the end, that's the purpose of cmake, right?
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.
.
@zheng-da @marcoabreu yes you are right. I will optimize this instruction and test locally first. Thanks for suggestion:)
|
i am fixed it #10629 |
@yajiedesign Good J:) I think it is very helpful to simplify my workflow! |
@zheng-da @marcoabreu I've modify the install readme according to @yajiedesign 's PR #10629 . |
MKL_README.md
Outdated
3. Download and install [OpenCV](http://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.0.0/opencv-3.0.0.exe/download). | ||
4. Unzip the OpenCV package. | ||
5. Set the environment variable ```OpenCV_DIR``` to point to the ```OpenCV build directory``` (```C:\opencv\build\x64\vc14``` for example). Also, you need to add the OpenCV bin directory (```C:\opencv\build\x64\vc14\bin``` for example) to the ``PATH`` variable. | ||
6. If you have Intel Math Kernel Library (MKL) installed, set ```MKL_ROOT``` to point to ```MKL``` directory that contains the ```include``` and ```lib```. Typically, you can find the directory in |
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.
if set USE_MKLDNN=1 and "MKL" is find,,the blas auto set to "open". if whant use mkl blas, must set BLAS=mkl
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
MKL_README.md
Outdated
|
||
After you have installed all of the required dependencies, build the MXNet source code: | ||
|
||
1. Download the MXNet source code from [GitHub](https://github.com/dmlc/mxnet). Don't forget to pull the submodules: |
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.
apache
MKL_README.md
Outdated
|
||
1. Download the MXNet source code from [GitHub](https://github.com/dmlc/mxnet). Don't forget to pull the submodules: | ||
``` | ||
git clone https://github.com/apache/incubator-mxnet.git ~/mxnet --recursive |
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 a valid path on windows - I'd just omit the path
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.
seems same mistakes in https://github.com/apache/incubator-mxnet/blob/master/docs/install/windows_setup.md I'll fix them together.
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 a lot! :)
@marcoabreu hi, please help review this pr. Thanks! |
@zheng-da @marcoabreu hi, please help review this pr. Thanks! |
It looks good to me. @marcoabreu do you have more comments for this PR? If not, could you please merge it? |
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, sorry for the delay
* add windows mkldnn instruction * update readme * typo full mkl to mkldnn * update blas * update mxnet url * update mkl build * intel mkl liscence * retrigger
* add windows mkldnn instruction * update readme * typo full mkl to mkldnn * update blas * update mxnet url * update mkl build * intel mkl liscence * retrigger
* add windows mkldnn instruction * update readme * typo full mkl to mkldnn * update blas * update mxnet url * update mkl build * intel mkl liscence * retrigger
* add windows mkldnn instruction * update readme * typo full mkl to mkldnn * update blas * update mxnet url * update mkl build * intel mkl liscence * retrigger
* add windows mkldnn instruction * update readme * typo full mkl to mkldnn * update blas * update mxnet url * update mkl build * intel mkl liscence * retrigger
Description
This is a raw instruction for windows users to build mxnet with mkldnn from source. The process is quite tedious and still needs some optimization.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
@pengzhao-intel @zheng-da