Having problem In MatConvNet to Compiling the cuDNN support.

6 views (last 30 days)
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!!!

Accepted Answer

Joss Knight
Joss Knight on 3 Feb 2016
Edited: Joss Knight on 3 Feb 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 Comments
Joss Knight
Joss Knight on 4 Feb 2016
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.
Joss Knight
Joss Knight on 4 Feb 2016
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.

Sign in to comment.

More Answers (1)

Walter Roberson
Walter Roberson on 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 Comments
Walter Roberson
Walter Roberson on 24 Jan 2016
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

Sign in to comment.

Categories

Find more on Downloads in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!