OpenGVLab / InternImage

[CVPR 2023 Highlight] InternImage: Exploring Large-Scale Vision Foundation Models with Deformable Convolutions
https://arxiv.org/abs/2211.05778
MIT License
2.47k stars 231 forks source link

error in dcnv3_im2col_cuda: no kernel image is available for execution on the device #257

Closed duoxiangqinzuo closed 9 months ago

duoxiangqinzuo commented 9 months ago

我的torch版本为1.12.0,cuda版本为11.4,GPU为Nvidia 2080Ti,python版本为3.8.18,安装的whl文件为DCNv3-1.0+cu113torch1.12.0-cp38-cp38-linux_x86_64.whl,运行时报错 error in dcnv3_im2col_cuda: no kernel image is available for execution on the device error in dcnv3_im2col_cuda: no kernel image is available for execution on the device error in dcnv3_im2col_cuda: no kernel image is available for execution on the device error in dcnv3_im2col_cuda: no kernel image is available for execution on the device 不过,这个信息并没有使训练中断,但是它仍然影响了我的使用,希望能够帮我解决。

duoxiangqinzuo commented 9 months ago

当我查看INSTALL.md后,发现以下指导方法: 当从源代码构建detectron2/torchvision时,它们检测GPU设备并仅为该设备构建。这意味着编译后的代码可能无法在不同的GPU设备上工作。要重新编译它们以获得正确的体系结构,请删除所有已安装/已编译的文件,并使用正确设置的TORCH_CUDA_ARCH_LIST环境变量重新生成它们。例如,导出TORCH_CUDA_ARCH_LIST=“6.0;7.0”可使其同时编译P100s和V100s。 我也是从源代码构建的,但是我该如何正确设置TORCH_CUDA_ARCH_LIST环境变量?

duoxiangqinzuo commented 9 months ago

我通过不使用whl文件、直接编译解决了这个问题