BEVFusion-复现问题:CUDA error: no kernel image is available for execution on the device

问题:
在这里插入图片描述
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

解决思路,
本以为是显存问题,debug后发现似乎不是
按照提示设置

os.environ['CUDA_LAUNCH_BLOCKING'] = '1'

也不对,后来在网上查询感觉应该是CUDA算力在编译的时候没有匹配.

最终解决方案:
由于本人使用1080Ti,对应算力61
在setup25行加入

"-gencode=arch=compute_61,code=sm_61",

重新编译,就没有问题了.

你可能感兴趣的:(三维识别,自动驾驶,pytorch,python,ubuntu)