Windows10, configure Matconvnet+cuda8.0+cudnn5.1 under 64-bit

Windows10, configure Matconvnet+cuda8.0+cudnn5.1 under 64-bit

1. First install windows10, 64 bit;

2. Install matlab2015b first,

3. Install SDK, TDM64-gcc-4.8.1-3

4. After installing visual studio 2015, install visual studio 2015 at the same time, create a new file, and then click to download and install windows supportc++. After installation, test "mex-setup" in the command line in matlab. If the following command appears, it means matlab and visualstudio Installation was successful.


5. Install cuda 9.0

http://blog.csdn.net/qq_31932151/article/details/76430184

First of all, download the installation package from the official website. I will not go into details about this . I downloaded the local version in this version of cuda_9.0. Note that the win7 and win10 versions should correspond. Don't make a mistake , double-click and the following screenshot will appear.

After unzipping, keep clicking next as shown below

Just wait about half an hour for this to appear.

After the installation is complete, start to configure the system environment variables

Win10 can operate the win+s search environment like this, and automatically match the system environment variables

After opening the environment variable as shown below:

Click on the environment variable as shown in the figure to open it, and set it as shown below:

Click New and it will appear:

 

CUDA_PATH = C:\Program Files\NVIDIA GPU ComputingToolkit\CUDA\v9.0
CUDA_PATH_V9_0 = C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v90
CUDA_SDK_PATH = C:\ProgramData\NVIDIA Corporation\CUDA Samples\v90
CUDA_LIB_PATH = %CUDA_PATH%\lib\x64
CUDA_BIN_PATH = %CUDA_PATH%\bin
CUDA_SDK_BIN_PATH = %CUDA_SDK_PATH%\bin\win64
CUDA_SDK_LIB_PATH = %CUDA_SDK_PATH%\common\lib\x64

Fill in the above variable name and variable value in turn :

for example:

After filling in in turn, find the path as shown in the figure:

Click New in turn , and fill in %CUDA_LIB_PATH%  ; % CUDA_BIN_PATH% ; %CUDA_SDK_BIN_PATH% ; Be sure to reboot after everything is installed! , here is how to configure cuda in win10

 

6. Install matconvnet;

7. Install cudnn5.1, create a local folder under matconvnet, you need to copy the cudnn5.1 folder to local, and copy the contents of cudnn5.1, bin, include, lib respectively to the root directory corresponding to cuda bin, include, lib;

The first step: enter in the matlab terminal: mex -setup

Step 2: After compiling vl_compilenn.m successfully, you need to copy the contents of bin in cudnn5.1 to cudnn64_5.dll under matconvnet/matlab/mex

 

编译vl_compilenn('enableGpu',true,'cudaRoot','C:/ProgramFiles/NVIDIA GPU Computing Toolkit/CUDA/v9.0','cudaMethod','nvcc','enableCudnn','true','cudnnRoot','local/cudnn5.1')

The following error solution occurs:

Run VS as an administrator , open the file where the warning appears, Ctrl+A to select all, and then in the file menu: file->Advancedsave options , select the new encoding method in the pop-up options: UNICODE-codepage 1200 , click OK compile.

2 When NW_NVCC_PATH does not appear, "Undefined function or variable 'MW_NVCC_PATH'."

The following information needs to be added to the environment variables:


When the following problems occur: (this problem is suspended first)


(4) When the if strcmp(arch, 'win64' ) &&opts.enableCudnn prompt appears in vl_compilenn.m, and the "&&" prompt has a problem, please change %% to &

(5) When there is a problem with copyfile(fullfile(opts.cudnnRoot,'bin', '*.dll'), flags.mex_dir);, please comment this out in the original copyfile with

(6) The setting of GPU in matconvnet, when set to use GPU,

When if ~isfield(opts.train,'gpus'),opts.train.gpus = []; end; is not applicable to GPU.

(7) To check the usage rate of GPU under Windows 10, the software used is: GPU-Z 2.4.0

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324932640&siteId=291194637