Install the GPU version of MXNet under Windows 10

Last time I talked about compiling the CPU version of MXNet: http://cherishlc.iteye.com/blog/2299864
I recently saved a notebook with GPU, and finally I can complete the GPU version~ The

process is similar to compiling the CPU version, but It took 3 days to fill in the pit. The specific process will not be described in detail in this article. Please compile the CPU version first.
The difference from compiling the CPU version is:
  • Cuda8RC must be used under win10 (mine is a 965m GPU), although Cuda7.5 has a win10 version, the actual measurement is not compatible! ! ! As a result, Cuda8 was always unsuccessful, and it took a day
  • CMake needs to be specified to compile code for 64-bit platforms! ! See also: http://cherishlc.iteye.com/blog/2302987
  • The DLL code needs to be added to the environment variable PATH. I said it last time, but this time it has fallen again. . .


The specific process participates in the CPU version. This article only records the pits that the GPU version has stepped on.
1. Installation of Cuda and cuDNN
Cuda: https://developer.nvidia.com/cuda-toolkit
All the way, pay attention to download Cuda8RC version, otherwise there may be compatibility problems

cuDNN: https://developer.nvidia.com/cudnn
to use the v3 version (MXNet official website said so, I don't know whether it supports v4, v5).
Remember to add the directory where the cuDNN DLL is located to your PATH! (Similar to the CPU version of openBLAS)


2.
Since the compilation of OpenCV has changed to a brand-new book, I also recompiled OpenCV, and the result was a downfall!
  • Note that the compilation mode debug in the VS project is changed to release! ! !
  • The path where the DLL is located is added to the PATH. There was no such step last time, and this time it fell into trouble. . . The performance is that the module cannot be found at runtime, and it will not prompt what module cannot be found. . .
  • It takes a long time to compile the GPU version, so there is no need. . .


3. The generation of the MXNet project
Last time, it was mentioned that the CMake-gui tool of CMake was used directly to configure it. This time there was a problem. The x64 platform was not generated, only the win32 platform. . . It was only discovered when a bunch of libs that clearly existed were found when compiling, but they were not found! ! !
Once again Amway CMake compiles the blog post of the x64 platform code: http://cherishlc.iteye.com/blog/2302987

Even if everything is configured correctly, the compilation still fails, and it prompts that opencv_dep_cudart.lib cannot be found . At that time, I really wanted to recompile a CPU version OpenCV! However, when I excluded the lib from the input of the MXNet project, the compilation passed! !

It's just that the library can't be found at runtime (it hasn't told me what library it can't find...), and then I remembered that the DLL path of OpenCV was not added to the PATH

. In this case, you can use the depends tool to view the DLL dependencies: http://www.dependencywalker.com/
Among them, it seems that it does not matter if the windows-related components are not found, because after I add the OpenCV path, it will still say that the windows-related components cannot be found

. 4. Install the python version of MXNet
andCPU version is exactly the same, so I won’t repeat


it. 5. After the running example
is installed, you can refer to PHunter’s blog post to run Neural art : http://phunter.farbox.com/post/mxnet-tutorial2
Just need to pay attention, because windows cannot Run the .sh file, we need to download the model manually

The nvidia-smi program under windows is under : C:\Program Files\NVIDIA Corporation\NVSMI
Official document: https://developer.nvidia.com/nvidia-system-management-interface

Take the left image as input and output of style image at the same time Unlike himself. . .


Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326622823&siteId=291194637