git clone --recursive https://github.com/dmlc/mxnet
The --recursive
is to clone all the submodules used by MXNet.
Please download mxnet_x64_vc14_gpu.7z
and prebuildbase_win10_x64_vc14.7z
from https://github.com/yajiedesign/mxnet/releases
Please download cuDNN from https://developer.nvidia.com/cudnn
-
Please mkdir the folder structure:
./R-package/inst/libs/x64
; -
Copy the following dlls into
./R-package/inst/libs/x64
:
cublas64_80.dll
cudart64_80.dll
cudnn64_5.dll
curand64_80.dll
libgcc_s_seh-1.dll
libgfortran-3.dll
libmxnet.dll
libmxnet.lib
libopenblas.dll
libquadmath-0.dll
nvrtc64_80.dll
These dlls can be found in prebuildbase_win10_x64_vc14/3rdparty/cudart
, prebuildbase_win10_x64_vc14/3rdparty/openblas/bin
, mxnet_x64_vc14_gpu/build
, mxnet_x64_vc14_gpu/lib
and the cuDNN
downloaded from NVIDIA.
-
Please mkdir the folder structure:
./R-package/inst/include
; -
Copy the header files from
dmlc
,mxnet
andnnvm
into./R-package/inst/include
. It should look like:
./R-package/inst
└── include
├── dmlc
├── mxnet
└── nnvm
Now please open the Windows CMD and change the directory to the mxnet
folder. Then use the following commands
to build R package:
echo import(Rcpp) > R-package\NAMESPACE
echo import(methods) >> R-package\NAMESPACE
Rscript -e "install.packages('devtools', repos = 'https://cloud.r-project.org')"
cd R-package
Rscript -e "library(devtools); library(methods); options(repos=c(CRAN='https://cran.rstudio.com')); install_deps(dependencies = TRUE)"
cd ..
R CMD INSTALL --no-multiarch R-package
Rscript -e "require(mxnet); mxnet:::mxnet.export('R-package')"
rm R-package/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')"
R CMD INSTALL --build --no-multiarch R-package
EDIT: Solved. managed to install it with the prebuilt GPU package, problem was CUDA version was not up to date.
Hello, thank you for the instructions, unfortunately not working for me on Windows 10, R 3.4.1, Rtools 3.4 (tried also Rtools 3.3 and 3.2).
As soon as it begins, compilation fails with this message:
In file included from executor.cc:9:0: ./base.h:12:23: fatal error: dmlc/base.h: No such file or directory
#include <dmlc/base.h> ^
compilation terminated.
I would be be grateful to get any hint on what the problem can be.