Win10 + Python + GPU version mxnet + VS2015 + rtools + R configuration

Source: Internet
Author: User
Tags mxnet

Recently started a GTX 1070 notebook, preface want to Win10 on the GPU run model, so there is the next installation GPU version of the bumpy course of mxnet, after multiple experiments finally fixed python and R installation Mxnet, the main points are recorded as follows:

I mainly refer to these 2 blog posts:

https://my.oschina.net/qinhui99/blog/845249

http://blog.csdn.net/u010414386/article/details/53304177

1. Install vs2013 or vs2015

If you are installing vs2013, you need to enhance vs to c++11 support:

    • Download Visual C + + Compiler Nov CTP
    • Uninstall Microsoft Visual C + + redistributable (x64) or 0x80070666 error when installing CTP
    • Install CTP
    • Copy C:\Program files (x86) \microsoft Visual C + + Compiler in the document from the CTP to C:\Program file (x86) \microsoft Visual Studio 12. 0\VC (Note: If the installation directory of VS is not the default directory, the above directory still exists, but should be copied to the corresponding installation directory!) )
2. Installing Cuda, CuDNN

Cuda:https://developer.nvidia.com/cuda-toolkit
All the way to the next, WIN10 system is best to use 8.0
Cudnn:https://developer.nvidia.com/cudnn
Download the latest v5.1 version and add the bin directory under the CUDNN directory to the PATH environment variable after decompression

3. Installing opencv3.2

: http://opencv.org/
Download and unzip, then create the environment variable Opencv_dir, add the Opencv/build directory
Add the \opencv\build\x64\vc14\bin= to the path path

4. Installing Openblas

Openblas (unzip on line): https://sourceforge.net/projects/openblas/files/v0.2.14/
Note: You need to download Mingw64_dll.zip and openblas-v0.2.14-win64-int32.zip two files!
Create the environment variable openblas_home, add the Openblas root directory
The directory where the DLL is located needs to be added to the environment variable path

5. Installing Anaconda

Next FIX: Https://www.continuum.io/downloads
Add the installation path to the path.

6. Installing Mxnet

: https://github.com/dmlc/mxnet
The project contains reference information, remember to download the referenced files
Unzip and create a new build directory in the root directory
Download cmake:https://cmake.org/
Open CMake, specify a good directory and press configure, select the corresponding version of the VS Win64 project

If CUDNN is not found, manually set the CUDNN position in the click Configure until the warning disappears

Finally click Generate to generate the Visual Studio project.

7. Compiling mxnet

Open Mxnet.sln, note that the compilation option is changed to release,x64 mode, compile all build, and finally generate Libmxnet.lib and Libmxnet.dll under Build/release folder, add this directory to path

8. Configure Python

Run cmd
CD into the Mxnet/python directory, enter the python setup.py install
Re-open cmd after installation
Run the python command, enter import mxnet as MX
A = Mx.nd.ones (1)
b = Mx.nd.ones (1,mx.gpu ())
A.asnumpy ()
B.asnumpy ()

If the result slice shows, the configuration is successful.

9. Configure R

1) First you need to install Rtools, download https://cran.r-project.org/bin/windows/Rtools/here

2) Download the latest prebuildbase_win10_x64_vc14.7z and 20170524_mxnet_x64_vc14_ to Https://github.com/yajiedesign/mxnet/releases gpu.7z

3) Create the following 2 folders in D:\MXNet\R-package

D:\MXNet\R-package\inst\include

D:\MXNet\R-package\inst\libs\x64

4) Copy these 4 folders DMLC, Mshadow, Mxnet, NNVM to D:\MXNet\R-package\inst\include

5) Copy all associated DLL files to D:\MXNet\R-package\inst\libs\x64, such as:

6) Enter D:\MXNet through the command line tool, you must ensure that your R.exe in the environment variable path

7) then run the following 2 commands to generate the namespace

Rscript-e "require (devtools); Install_version (\ "Roxygen2\", Version = \ "5.0.1\", repos = \ "Https://cloud.r-project.org/\", quiet = TRUE) "
Rscript-e "require (ROXYGEN2); Roxygen2::roxygenise (\ "r-package\") "

8) Last input

R CMD INSTALL--build--no-multiarch r-package

Test a piece in R.

great!

Win10 + Python + GPU version mxnet + VS2015 + rtools + R configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.