Getting error "nvcc fatal : '-DNDEBUG': expected a number" while trying to compile matconvnet

490 views
Skip to first unread message

Umair Mukati

unread,
May 15, 2019, 11:30:09 AM5/15/19
to MatConvNet: CNNs for MATLAB
Hi all,

I am trying to compile matconvnet with GPU support. I have "GTX 960M" graphics processor.

I am using the following command to compile Matconvnet:
vl_compilenn('enableGpu',true)

Kindly, help me in overcoming this issue.

P.S.: I have tried all the solution mentioned on the internet but the problem is not resolved.

Best regards,
Umair Mukati

Nicola Franzoso

unread,
Jun 5, 2020, 11:33:40 AM6/5/20
to MatConvNet: CNNs for MATLAB
The problem probably because you have to use -o0  on nvcc_compile function inside vl_compilenn.m:

function nvcc_compile(opts, src, tgt, flags)
% --------------------------------------------------------------------
if check_deps(opts, tgt, src), return ; end

flags.base{3} = '-O0';
nvcc_path = fullfile(opts.cudaRoot, 'bin', 'nvcc');
nvcc_cmd = sprintf('"%s" -c -o "%s" "%s" %s ', ...
                   nvcc_path, tgt, src, ...
                   strjoin(horzcat(flags.base,flags.nvcc)));
opts.verbose && fprintf('%s: NVCC CC: %s\n', mfilename, nvcc_cmd) ;
status = system(nvcc_cmd);
if status, error('Command %s failed.', nvcc_cmd); end

try it, i hope is good for you
Reply all
Reply to author
Forward
0 new messages