Having problem In MatConvNet to Compiling the cuDNN support.

I am using MATLAB R2015b in Windows 7 64 bits. My GPU information is -
Name: 'GeForce GTX 650'
Index: 1
ComputeCapability: '3.0'
SupportsDouble: 1
DriverVersion: 7
ToolkitVersion: 7
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 1.0737e+09
AvailableMemory: 723587072
MultiprocessorCount: 2
ClockRateKHz: 1058500
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceSelected: 1
I am using following command -
vl_compilenn('enableGpu', true, ...
'cudaMethod', 'nvcc', ...
'cudaRoot', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0', ...
'enableCudnn', true, ...
'cudnnRoot', 'local/cudnn') ;
Having following error -
Warning: Setting the 'MW_NVCC_PATH' environment variable to 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\bin\nvcc'
> In vl_compilenn>activate_nvcc (line 635)
In vl_compilenn (line 260)
Warning: NVCC not found in the command line path or the one found does not matches 'C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v7.0\bin\nvcc'.
> In vl_compilenn>activate_nvcc (line 644)
In vl_compilenn (line 260)
Location of NVCC (C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\bin) added to your command search PATH.
vl_compilenn: CUDA: MEX config file: 'C:\Program Files\MATLAB\R2015b\toolbox\distcomp\gpu\extern\src\mex\win64\mex_CUDA_win64.xml'
nvcc fatal : A single input file is required for a non-link phase when an outputfile is specified
Error using vl_compilenn>nvcc_compile (line 483)
Command "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0\bin\nvcc" -c "C:\Users\Mannan\Documents\MATLAB\Deep
Learning\MatConvNet\matlab\src\bits\data.cu" -DNDEBUG -DENABLE_GPU -DENABLE_CUDNN -IC:\Users\Mannan\Documents\MATLAB\Deep
Learning\MatConvNet\Cudnn\cuda\include -D__SSSE3__ -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program
Files\MATLAB\R2015b\toolbox\distcomp\gpu\extern\include" -Xcompiler /MD -gencode=arch=compute_30,code=\"sm_30,compute_30\" -o
"C:\Users\Mannan\Documents\MATLAB\Deep Learning\MatConvNet\matlab\mex\.build\bits\data.obj" failed.
I have tried a lot to solve the problem. Please Help me!!!

 Réponse acceptée

Joss Knight
Joss Knight le 3 Fév 2016
Modifié(e) : Joss Knight le 3 Fév 2016
This appears to be a bug in MatConvNet's vl_compilenn function preventing it from working when your cudnn include path contains spaces. In my version lines 298-301 say:
if opts.enableCudnn,
flags.cc{end+1} = '-DENABLE_CUDNN' ;
flags.cc{end+1} = ['-I' opts.cudnnIncludeDir] ;
end
The third line is missing quotes, so change it to:
if opts.enableCudnn,
flags.cc{end+1} = '-DENABLE_CUDNN' ;
flags.cc{end+1} = ['-I"' opts.cudnnIncludeDir '"'] ;
end
The actual lines of code may be slightly different in your version of vl_compilenn.
This is a very bad error and I can see similar mistakes being made through that file, which makes me think that somehow under normal circumstances this is not a problem and it's only cropping up on your system for some reason.
...or you're the first ever Windows user of MatConvNet perhaps? (But the file does claim it's been tested on Windows.)

5 commentaires

I can't understand double quotation inside single quotation- flags.cc{end+1} = ['-I"' opts.cudnnIncludeDir '"'] ; is it alright?
Ok, I am checking.
I have tried according to your instruction. Now I am having another type of problem. The error message is- Error using mex normalize.cpp C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\INCLUDE\ia32intrin.h(57) : error C2144: syntax error : 'unsigned int' should be preceded by ';'
I hope your help regarding this new issue.
This is nothing to do with MATLAB, it is MatConvNet failing to compile - I suggest you post to the MatConvNet discussion forum or to the File Exchange page.
Also, check out this post on the MatConvNet forum which says to compile on Windows you probably need to get the latest MatConvNet from github rather than downloading the tarball.

Connectez-vous pour commenter.

Plus de réponses (1)

Walter Roberson
Walter Roberson le 24 Jan 2016
I do not know what the solution is, but I see from http://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/#supported-phases that the -c compile flag that was used is for C or C++ source, whereas only a .cu source is present. It appears that -cuda would be needed to compile a .cu source into C or C++ that could then be compiled with -c

2 commentaires

Thank Roberson, but I cant understand what to do.
This is not something I can test. The source in the File Exchange is documented as working for OS-X and Linux. Use with MS Windows might require adaptation, but I actively avoid booting MS Windows so I cannot (will not) test that.
The people who seem to be having some success appear to be using MingW; see for example http://uk.mathworks.com/matlabcentral/answers/261684-run-matlab-vl_compilenn-show-error

Connectez-vous pour commenter.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by