2
$\begingroup$

I'm getting the error in the title. This has some of the same problems from here. Apparently this is an issue with an earlier version of the CUDA 6.5 toolkit, as discussed here.

However, even after installing the CUDA 7.0 toolkit, I'm still getting the following error:

"/usr/local/cuda-6.0/bin/nvcc" -arch=sm_52 -m64 --cubin "/usr/share/blender/2.74/scripts/addons/cycles/kernel/kernel.cu" -o "/home/jozxyqk/.config/blender/2.74/cache/cycles_kernel_sm52_680206C327F9D352594B0E249634D211.cubin" --ptxas-options="-v" --use_fast_math -I"/usr/share/blender/2.74/scripts/addons/cycles/kernel" -DNVCC -D__KERNEL_CUDA_VERSION__=60
nvcc fatal   : Value 'sm_52' is not defined for option 'gpu-architecture'
CUDA kernel compilation failed, see console for details.

Why is this happening?

$\endgroup$
  • $\begingroup$ I have the exact same problem. Can you give some more information about the problem and your situation? $\endgroup$ – user35878 Jun 9 '17 at 11:26
  • $\begingroup$ @GilElbaz not really sure what you're after. Is was a Linux permissions issue for me (after installing the cuda toolkit). Did the answer not work? If your issue is a bit different maybe start a new question. $\endgroup$ – jozxyqk Jun 9 '17 at 16:18
2
$\begingroup$

Two reasons:

  1. The cuda-7.0 toolkit installer failed to properly set permissions, so blender can't see the nvcc from the proper location.
  2. When blender can't read using the symlink cuda in /usr/local/cuda/bin/nvcc it seems to search for nvcc using cuda-<version>/ instead. But it does it in the wrong order, also without reporting the permission issue.

Without others-readable permissions on /usr/local/cuda-7.0/, the symlink /usr/local/cuda fails and blender tries /usr/local/cuda-6.0/bin/nvcc even though a newer /usr/local/cuda-6.5/bin/nvcc exists.

The solution:

sudo chmod -R o+rX /usr/local/cuda-7.0/

Had no other toolkits been installed the error would have been:

which: no nvcc in ($PATH)
CUDA nvcc compiler not found. Install CUDA toolkit in default location.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.