vlfeat / matconvnet

MatConvNet: CNNs for MATLAB
Other
1.4k stars 753 forks source link

failed to compile the GPU support on win10 OS #901

Open yuigahamayuki opened 7 years ago

yuigahamayuki commented 7 years ago

I'm using Matconvnet for training CNN, and it's slow to train on CPU. I want to use the GPU version to accelerate computing, but failed to compile the GPU support. Here is the error message:

run matlab/vl_setupnn vl_compilenn('enableGpu', true) 警告: Setting the 'MW_NVCC_PATH' environment variable to 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc' In vl_compilenn>activate_nvcc (line 695) In vl_compilenn (line 288) vl_compilenn: CUDA: MEX config file: 'D:\matlab\R2016b\toolbox\distcomp\gpu\extern\src\mex\win64\mex_CUDA_win64.xml' c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(859) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(1807) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(2657) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(3541) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(4492) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(5412) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(6320) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(7195) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\math_functions.h(8066) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\device_functions.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\device_functions.h(775) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\device_functions.h(1621) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\device_double_functions.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\sm_20_intrinsics.h : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss c:\program files\nvidia gpu computing toolkit\cuda\v7.5\include\sm_20_intrinsics.h(943) : warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss C:\Program Files (x86)\Microsoft Visual Studio\VC98\include\winnt.h(630) : fatal error C1189: #error : Must define a target architecture. data.cu 错误使用 vl_compilenn>nvcc_compile (line 540) Command "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc" -c "C:\Users\knk\Documents\毕 设\project\matlab\src\bits\data.cu" -DNDEBUG -DENABLE_GPU -DENABLE_DOUBLE -DSSSE3 -gencode=arch=compute_30,code=\"sm_30,compute_30\" -I"D:\matlab\R2016b\extern\include" -I"D:\matlab\R2016b\toolbox\distcomp\gpu\extern\include" -gencode=arch=compute_30,code=\"sm_30,compute_30\" -O3 -Xcompiler /MD --compiler-bindir "D:\Microsoft Visual Studio 12.0\VC..\VC\bin" -o "C:\Users\knk\Documents\毕设\project\matlab\mex.build\bits\data.obj" failed. 出错 vl_compilenn (line 485) nvcc_compile(opts, srcs{i}, objfile, flags.nvcc) ;

I guess it's due to the last fatal error C1189, but I don't know how to fix it.

Here is my configuration: Windows 10 x64, MATLAB R2016b, Visual C++ 2013, CUDA 7.5, GeForce GT 650m with ComputeCapability: '3.0', matconvnet-beta23.

I tried the older version of matconvnet 20, 21, and 22, but all failed.

Does it matter the directory I put VS in is not the default path?

muthiyanbhushan commented 7 years ago

Hello @yuigahamayuki,

I am facing similar issue. Did you resolve it?

Please, guide me if you were able to resolve the issue.

Thank you.

-- Bhushan

yuigahamayuki commented 7 years ago

Hello @muthiyanbhushan

Now I solved the problem, but still do not know why the error happened.

I replaced my hard disk with the old one because of bad sectors, and after reinstalling all the necessary components, the compilation of GPU support succeeded.

This time I installed VC++ 2015 and CUDA 8.0 instead.


Yuki