error `nvcc fatal : Unsupported gpu architecture ‘compute_80‘ ninja: build stopped: subcommand fai

问题:

Error/问题

nvcc fatal   : Unsupported gpu architecture 'compute_80'
ninja: build stopped: subcommand failed.

解决方案

在安装一个代码 setup.py (见下面的代码)里的时,会出现以上报错. 这里 是因为,代码与gpu算力不匹配的原因。 对于本机2080ti, 其最高算力为7.5, 故不支持compute_80(算力8.0), compute_86(算力8.6),解决办法就是把对应两行注释掉就可以了。
关于,gpu算力,可以参考:https://blog.csdn.net/chengxy1998/article/details/121924208?utm_medium=distribute.pc_aggpage_search_result.none-task-blog-2aggregatepagefirst_rank_ecpm_v1~rank_v31_ecpm-2-121924208.pc_agg_new_rank&utm_term=GPU%E7%AE%97%E5%8A%9B%E9%97%AE%E9%A2%98&spm=1000.2123.3001.4430

setup(
    name='droid_backends',
    ext_modules=[
        CUDAExtension('droid_backends',
            include_dirs=[osp.join(ROOT, 'thirdparty/eigen')],
            sources=[
                'src/droid.cpp',
                'src/droid_kernels.cu',
                'src/correlation_kernels.cu',
                'src/altcorr_kernel.cu',
            ],
            extra_compile_args={
                'cxx': ['-O3'],
                'nvcc': ['-O3',
                    '-gencode=arch=compute_60,code=sm_60',
                    '-gencode=arch=compute_61,code=sm_61',
                    '-gencode=arch=compute_70,code=sm_70',
                    '-gencode=arch=compute_75,code=sm_75',
                    #'-gencode=arch=compute_80,code=sm_80',
                    #'-gencode=arch=compute_86,code=sm_86',
                ]
            }),
    ],
    cmdclass={ 'build_ext' : BuildExtension }
)

你可能感兴趣的:(tensorflow,深度学习,caffe)