CUDA Error: no kernel image is available for execution on device解决方法

今天编译darknet后,运行程序出现了CUDA Error: no kernel image is available for execution on device这个错误
CUDA Error: no kernel image is available for execution on device解决方法
在网上查找了很长时间解决办法,还是花了很长时间
方法1:cuda版本和显卡计算能力不匹配,cuda9.0不支持3以下算力的显卡
解决方法------->降低cuda版本,改成cuda8.0

由于我的显卡型号是 Tesla K80,算力3.7,应该不是上面的原因

方法2:修改Makefile文件,使arch和code与显卡型号匹配
CUDA Error: no kernel image is available for execution on device解决方法
把其他的注释掉,留下一行就够啦!