vlfeat / matconvnet

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

Error in vl_compilenn : nvcc fatal : Unsupported gpu architecture 'compute_21' #338

Closed MammadTavakoli closed 8 years ago

MammadTavakoli commented 8 years ago

I run this code in my laptop with GeForce GT 720M: vl_compilenn('enableGpu', true, 'cudaRoot', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5','cudaMethod', 'nvcc')

but it get this error:

nvcc fatal : Unsupported gpu architecture 'compute_21' Error using vl_compilenn>nvcc_compile (line 449) Command "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\bin\nvcc" -c "E:\Deep\MatConvNet\matlab\src\bits\data.cu" -DNDEBUG -DENABLE_GPU -DSSSE3 -I"C:\Program Files\MATLAB\R2015b\extern\include" -I"C:\Program Files\MATLAB\R2015b\toolbox\distcomp\gpu\extern\include" -Xcompiler /MD -gencode=arch=compute_21,code=\"sm_21,compute_21\" -o "E:\Deep\MatConvNet\matlab\mex.build\bits\data.obj" failed.

Error in vl_compilenn (line 395) nvcc_compile(opts, srcs{i}, toobj(bld_dir,srcs{i}), flags.nvcc) ;

How can solve it?

MammadTavakoli commented 8 years ago

it solved with installing "CUDA 7.0.28" and change the code as this: vl_compilenn('enableGpu', true, 'cudaRoot', 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.0','cudaMethod', 'nvcc')

lenck commented 8 years ago

Hmm, it seems that the new CUDA 7.5 does not list this compute capability. Maybe, what might have helped is to compile it with compute_20 instead... However, the current release does not compile the kernels with this flag, so I hope it is OK that I will close this issue...

safecoin-project commented 6 years ago

Both are correct. compute_21 fails in cuda 8 as well as 9 compute_20 works in cuda 8, but not 9.
Luckily, compute_20 can usually be used instead of compute_21. worked for me.