Installing MxNet on Windows

To build and install MXNet yourself, you need the following dependencies. Install the required dependencies:

  1. If Microsoft Visual Studio 2017 is not already installed, download and install it. You can download and install the free community edition. (https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15)

  2. Download and Install CMake GUI version if it is not already installed.

  3. Download and install OpenCV.

  4. Unzip the OpenCV package.

  5. Set the environment variable “OpenCV_DIR” to the value “OpenCV build directory”.

  6. If you don’t have the Intel Math Kernel Library (MKL) installed, download and install OpenBlas.

  7. Set the environment variable “OpenBLAS_HOME” to point to the “OpenBLAS” directory that contains the “include” and “lib” directories. Typically, you can find the directory in “C:\Program files (x86)\OpenBLAS”.

  8. Download and install CuDNN. To get access to the download link, register as an NVIDIA community user.

After you have installed all of the required dependencies, build the MXNet source code:

  1. Download the MXNet source code from GitHub.
  2. Open native tools command prompt for Visual Studio 2017( choose x64 or x86 native as required)
  3. Start CMake GUI tool installed previously, from within this command prompt
  4. In the CMake tool UI, “Browse Source” button and navigate to folder where MXNet source is downloaded. For example -"/GitHub/incubator-mxnet"
  5. Create a folder under “/GitHub/incubator-mxnet”, say releasex64
  6. Click “Browse Build…” and choose folder created above
  7. Click “Configure” button, a dialog prompt appears for choosing generator
  8. Choose appropriate generator, for example Visual Studio 2017 Win64, if building for x64
  9. Retain “use default native compilers” option
  10. Click Finish
  11. Click “Open Project” to open the generated project in Visual Studio IDE
  12. Choose “ALL_BUILD” and build the configuration that you want to build
  13. Find libmxnet.dll under the folder created in step 5 above for example “\GitHub\incubator-mxnet\releasex64\Debug\libmxnet.dll”
1 Like