caffe compilation errors: nvcc fatal: Unsupported gpu architecture 'compute_20'

Nvcc fatal encounter in the process of compiling caffe: Unsupported gpu architecture 'compute_20' this error,

Modification method:

Makefile.config文件中根据自己CUDA的版本注释不同的行。
# CUDA architecture setting: going with all of them.
# For CUDA < 6.0, comment the *_50 through *_61 lines for compatibility.
# For CUDA < 8.0, comment the *_60 and *_61 lines for compatibility.
# For CUDA >= 9.0, comment the *_20 and *_21 lines for compatibility.
CUDA_ARCH := #-gencode arch=compute_20,code=sm_20 \
                #-gencode arch=compute_20,code=sm_21
                -gencode arch=compute_30,code=sm_30 \
                -gencode arch=compute_35,code=sm_35 \
                -gencode arch=compute_50,code=sm_50 \
                -gencode arch=compute_52,code=sm_52 \
                Arch = compute_60 -gencode, code = sm_60 \
                -gencode Arch = compute_61, code = sm_61 \
                -gencode Arch = compute_61, code = compute_61
Because you are using a cuda10.0, it is necessary to comment out the front two rows.

But before the first note modify sudo chmod 777 Makefile.config , this is the beginning of the file read-only , the first time you put in front of two lines commented out, compile or wrong, only to discover later modified file is not in effect, modify the file permissions after the first two lines and then comment out, the problem is solved.

Guess you like

Origin www.cnblogs.com/cumtchw/p/12400999.html