Check failed: error == cudaSuccess (48 vs. 0) no kernel image is available for execution

报错:

CUDA版本为9.0,在Ubuntu 16.04上安装Caffe时报错:

Check failed: error =s (48 vs. 0) no kernel image is available for execution  on device...

原因:

Makefile.config中关于 CUDA_ARCH的配置出现出错,没有根据提示设置(配置时,失误删除了与61相关的项)。

处理:

根据Makefile.config中的提示,根据当前的CUDA版本只删除关于20和21的项,如下修改关于CUDA_ARCH的设置:

CUDA_ARCH: CUDA_ARCH := -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 \
                                      -gencode arch=compute_60,code=sm_60 \
                                      -gencode arch=compute_61,code=sm_61 \
                                      -gencode arch=compute_61,code=compute_61

 

 

你可能感兴趣的:(Check failed: error == cudaSuccess (48 vs. 0) no kernel image is available for execution)