-
Notifications
You must be signed in to change notification settings - Fork 6.8k
replacing windows setup with newer instructions #12504
Conversation
@samskalicky @ankkhedia - please provide any feedback you can from your experiments with the guide. Thanks! |
docs/install/windows_setup.md
Outdated
3. Download and install [OpenCV](https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.4.1/opencv-3.4.1-vc14_vc15.exe/download). | ||
4. Unzip the OpenCV package. | ||
5. Set the environment variable ```OpenCV_DIR``` to point to the ```OpenCV build directory``` (e.g., ```OpenCV_DIR = C:\utils\opencv\build```). | ||
6. If you don’t have the Intel Math Kernel Library (MKL) installed, download and install [OpenBlas](https://sourceforge.net/projects/openblas/files/v0.2.20/OpenBLAS%200.2.20%20version.zip/download). |
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 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 contains the dll which can be directly used else you will need to build openblas from source on Windows as no latest pre-built binaries are available after that version-not that I know of!
docs/install/windows_setup.md
Outdated
6. If you don’t have the Intel Math Kernel Library (MKL) installed, download and install [OpenBlas](https://sourceforge.net/projects/openblas/files/v0.2.20/OpenBLAS%200.2.20%20version.zip/download). | ||
7. Set the environment variable ```OpenBLAS_HOME``` to point to the ```OpenBLAS``` directory that contains the ```include``` and ```lib``` directories (e.g., ```OpenBLAS_HOME = C:\utils\OpenBLAS```). | ||
8. Download and install CUDA: Install [CUDA](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal), and Download the base installer (e.g., ```cuda_9.1.85_win10.exe```). | ||
9. Download and install cuDNN. To get access to the download link, register as an NVIDIA community user. Then Follow the [link](http://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#install-windows) to install the cuDNN. |
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.
Even if you have already installed CUDA, you should reinstall to get VS toolkit support if it isn't also already installed.
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 required since CUDA require VS integration support when it is being installed so that VS can be used to build binaries with CUDA support
docs/install/windows_setup.md
Outdated
|
||
After you have installed all of the required dependencies, build the MXNet source code: | ||
3. Follow [this link](https://docs.microsoft.com/en-us/visualstudio/install/modify-visual-studio) to modify ```Individual components```, and check ```VC++ 2017 version 15.4 v14.11 toolset```, and click ```Modify```. |
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.
Move this step to just after VS install.
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 before CUDA toolkit install
docs/install/windows_setup.md
Outdated
|
||
After you have installed all of the required dependencies, build the MXNet source code: | ||
3. Follow [this link](https://docs.microsoft.com/en-us/visualstudio/install/modify-visual-studio) to modify ```Individual components```, and check ```VC++ 2017 version 15.4 v14.11 toolset```, and click ```Modify```. | ||
4. Change the version of the Visual studio 2017 to v14.11 using the following command (by default the VS2017 is installed in the following 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.
This should be changed to setting on the command prompt after vs install.
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.
Specifically this is needed for 1. 'cmake...' instruction and 2. 'msbuild..' instruction mentioned below.
docs/install/windows_setup.md
Outdated
6. CMake the MXNet source code by using following command: | ||
|
||
``` | ||
cmake -G "Visual Studio 15 2017 Win64" -T cuda=9.1,host=x64 -DUSE_CUDA=1 -DUSE_CUDNN=1 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DCUDA_ARCH_LIST=Common -DCUDA_TOOLSET=9.1 -DCUDNN_INCLUDE=C:\cuda\include -DCUDNN_LIBRARY=C:\cuda\lib\x64\cudnn.lib "C:\incubator-mxnet" |
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.
alternative commands for MKL MKLDNN...
https://github.com/apache/incubator-mxnet/blob/547c9bad7915620f785375ca4921c377c0dc07b6/docs/install/ubuntu_setup.md
docs/install/windows_setup.md
Outdated
6. CMake the MXNet source code by using following command: | ||
|
||
``` | ||
cmake -G "Visual Studio 15 2017 Win64" -T cuda=9.1,host=x64 -DUSE_CUDA=1 -DUSE_CUDNN=1 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DCUDA_ARCH_LIST=Common -DCUDA_TOOLSET=9.1 -DCUDNN_INCLUDE=C:\cuda\include -DCUDNN_LIBRARY=C:\cuda\lib\x64\cudnn.lib "C:\incubator-mxnet" |
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.
also show cuda=9.2
and 9.0
and -DCUDA_TOOLSET=9.2
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.
Need to add a list of flag options available
docs/install/windows_setup.md
Outdated
|
||
NOTE: make sure the DCUDNN_INCLUDE and DCUDNN_LIBRARY pointing to the “include” and “cudnn.lib” of your CUDA installed location, and the ```C:\incubator-mxnet``` is the location of the source code you just git in the previous step |
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.
update grammar
docs/install/windows_setup.md
Outdated
| ||
This produces a library called ```libmxnet.dll```. | ||
1. If [Microsoft Visual Studio 2017](https://www.visualstudio.com/downloads/) is not already installed, download and install it. You can download and install the free community edition. | ||
2. Download and install [CMake](https://cmake.org/files/v3.11/cmake-3.11.0-rc4-win64-x64.msi) if it is not already installed. |
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 a later version that isn't tested.
docs/install/windows_setup.md
Outdated
This produces a library called ```libmxnet.dll```. | ||
1. If [Microsoft Visual Studio 2017](https://www.visualstudio.com/downloads/) is not already installed, download and install it. You can download and install the free community edition. | ||
2. Download and install [CMake](https://cmake.org/files/v3.11/cmake-3.11.0-rc4-win64-x64.msi) if it is not already installed. | ||
3. Download and install [OpenCV](https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.4.1/opencv-3.4.1-vc14_vc15.exe/download). |
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 a later version that isn't tested.
docs/install/windows_setup.md
Outdated
3. Download and install [OpenCV](https://sourceforge.net/projects/opencvlibrary/files/opencv-win/3.4.1/opencv-3.4.1-vc14_vc15.exe/download). | ||
4. Unzip the OpenCV package. | ||
5. Set the environment variable ```OpenCV_DIR``` to point to the ```OpenCV build directory``` (e.g., ```OpenCV_DIR = C:\utils\opencv\build```). | ||
6. If you don’t have the Intel Math Kernel Library (MKL) installed, download and install [OpenBlas](https://sourceforge.net/projects/openblas/files/v0.2.20/OpenBLAS%200.2.20%20version.zip/download). |
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 are later versions but no binaries available.
docs/install/windows_setup.md
Outdated
4. Unzip the OpenCV package. | ||
5. Set the environment variable ```OpenCV_DIR``` to point to the ```OpenCV build directory``` (e.g., ```OpenCV_DIR = C:\utils\opencv\build```). | ||
6. If you don’t have the Intel Math Kernel Library (MKL) installed, download and install [OpenBlas](https://sourceforge.net/projects/openblas/files/v0.2.20/OpenBLAS%200.2.20%20version.zip/download). | ||
7. Set the environment variable ```OpenBLAS_HOME``` to point to the ```OpenBLAS``` directory that contains the ```include``` and ```lib``` directories (e.g., ```OpenBLAS_HOME = C:\utils\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.
Point to MKL setup instructions.
Codecov Report
@@ Coverage Diff @@
## master #12504 +/- ##
==========================================
- Coverage 72.48% 72.4% -0.08%
==========================================
Files 163 161 -2
Lines 19165 19131 -34
Branches 3136 3134 -2
==========================================
- Hits 13891 13852 -39
- Misses 4403 4409 +6
+ Partials 871 870 -1
Continue to review full report at Codecov.
|
@ankkhedia WDYT about the current changes? Should we go ahead and push these so better info is out there? We can make another pass on it later... or if possible, I'd like to update the VS2015 today and then push. |
@aaronmarkham The changes for vs2017 looks good to me and worked for me. However, it would make sense to ask someone to try it out in case there is some system info which might be missing. For VS2015, could you please add CI owners to the review as they build Windows for CI and they can validate it. Anyways I am fine with pushing these changes as as this is better info from current |
Thanks for your contributions @aaronmarkham |
@vrakesh - Please let me know your feedback/improvements! Thanks! |
We should mention, the requirement of Visual Studio (needed by CUDA) and also link to the detailed CUDA installation instructions on NVIDIA website. |
docs/install/windows_setup.md
Outdated
cmake -G "Visual Studio 15 2017 Win64" -T cuda=9.2,host=x64 -DUSE_CUDA=1 -DUSE_CUDNN=1 -DUSE_NVRTC=1 -DUSE_OPENCV=1 -DUSE_OPENMP=1 -DUSE_BLAS=open -DUSE_LAPACK=1 -DUSE_DIST_KVSTORE=0 -DCUDA_ARCH_LIST=Common -DCUDA_TOOLSET=9.2 -DCUDNN_INCLUDE=C:\cuda\include -DCUDNN_LIBRARY=C:\cuda\lib\x64\cudnn.lib "C:\incubator-mxnet" | ||
``` | ||
6. After the CMake successfully completed, compile the the MXNet source code by using following command: | ||
``` |
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.
It is recommended to add a section.the cmake 3.12.2 can use -T version=14.11 to choice vs14.11.
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.
@yajiedesign -
I'm updating the CMake dependency to be 3.12.2.
For the cmake command, that would choose Visual Studio 2015's compiler? If we're trying to use 2017's compiler wouldn't this command need to be different? I don't understand this mix if I use -T version=14.11
in that cmake command:
cmake -G "Visual Studio 15 2017 Win64" -T version=14.11,cuda=9.2,host=x64
Can you be very specific about the command to use for each environment?
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 you use -T version=14.11,you no need for pre execution "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat" -vcvars_ver=14.11
…a, windows pip note
Updated from feedback... this should be merged once it passes CI. |
* replacing windows setup with newer instructions * add pip instructions; clarify 2017 build * refinements * bump cmake version & note compiler option; add vs requirement for cuda, windows pip note
Description
When merging the different Windows guides I discarded some newer instructions. I'm bringing them back with this PR.
I also added a ToC and clarified some headings.
I'm leaving this as a WIP PR since I hope to get some feedback from people trying out the instructions and validating the steps.