-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Refine mxnet python installation #12696
Changes from 4 commits
a9d40c4
429684a
602b7d0
85f9408
5a01234
bfd9012
a758d61
69d5358
daec3f2
2bb79b0
f8ce81c
5692c4f
bcc2ead
c7d1895
0e1eb01
bc48137
7a43d0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,10 +141,10 @@ To build and install MXNet yourself using [VS2017](https://www.visualstudio.com/ | |
1. Set the environment variable `OpenCV_DIR` to point to the OpenCV build directory that you just unzipped. Start ```cmd``` and type `set OpenCV_DIR=C:\utils\opencv\build`. | ||
1. If you don’t have the Intel Math Kernel Library (MKL) installed, you can install it and follow the [MKLDNN_README](https://github.com/apache/incubator-mxnet/blob/master/MKLDNN_README.md) from here, or you can use OpenBLAS. These instructions will assume you're using OpenBLAS. | ||
1. Download the [OpenBlas](https://sourceforge.net/projects/openblas/files/v0.2.19/OpenBLAS-v0.2.19-Win64-int32.zip/download) package. Later versions of OpenBLAS are available, but you would need to build from source. v0.2.19 is the most recent version that ships with binaries. Contributions of more recent binaries would be appreciated. | ||
1. Unzip the file. You can place the unzipped files and folders in another directory if you wish. | ||
1. Unzip the file, rename it to ```OpenBLAS``` and put it under `C:\utils`. You can place the unzipped files and folders in another directory if you wish. | ||
1. Set the environment variable `OpenBLAS_HOME` to point to the OpenBLAS directory that contains the `include` and `lib` directories and type `set OpenBLAS_HOME=C:\utils\OpenBLAS` on the command prompt(```cmd```). | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the file can be unzipped and placed anywhere, what is significance of C:\utils There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it could be anywhere but original tutorial use C"\utils so I follow it. It makes users less confused? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Usually environment variables are all caps. why is it OpenBLAS_HOME? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure why OpenBLAS_HOME and OpenCV_DIR environment variables are not all cps |
||
1. Download and install [CUDA](https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal). If you already had CUDA, then installed VS2017, you should reinstall CUDA now so that you get the CUDA toolkit components for VS2017 integration. Note that the lastest CUDA version supported by MXNet is 9.2. You can find it on the `Legacy Releases`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lastest -> latest ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is Legacy Releases? |
||
1. 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 and put those libraries into ```C:\cuda```. | ||
1. 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 and put those libraries into ```C:\cuda```. | ||
1. Download and install [git](https://git-for-windows.github.io/) if you haven't already. | ||
|
||
After you have installed all of the required dependencies, build the MXNet source code: | ||
|
@@ -165,6 +165,7 @@ cd C:\incubator-mxnet\build | |
``` | ||
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 -DUSE_MKL_IF_AVAILABLE=OFF -DCUDA_ARCH_LIST=Common -DCUDA_TOOLSET=9.2 -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 commentThe reason will be displayed to describe this comment to others. Learn more. What's going on here? What does turning off There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I will remove -DUSE_MKL_IF_AVAILABLE=OFF. The user should be allowed to use OpenBLAS, MKL, or MKL-DNN |
||
``` | ||
* Make sure you set the environment variables correctly (OpenBLAS_HOME, OpenCV_DIR) and change the version of the Visual studio 2017 to v14.11 before enter above command. | ||
6. After the CMake successfully completed, compile the the MXNet source code by using following command: | ||
``` | ||
msbuild mxnet.sln /p:Configuration=Release;Platform=x64 /maxcpucount | ||
|
@@ -221,9 +222,6 @@ libgfortran-3.dll (in mingw64_dll) | |
libquadmath-0.dll (in mingw64_dll) | ||
libopenblas.dll (in OpenBlas folder you download) | ||
opencv_world341.dll (in OpenCV folder you download) | ||
kernel32.dll | ||
vcomp140.dll | ||
nvcuda.dll (only if you use CUDA) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we remove these dlls? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. They are under C:Windows\System32 where python would check during loading libmxnet.dll |
||
``` | ||
6. Add ```C:\common``` to Environment Variables. | ||
* Type ```control sysdm.cpl``` on ```cmp``` | ||
|
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.
Did we provide command before to create C:\utils?
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.
Add this on line 140