win10环境下配置detectron2报错:\nvcc.exe‘ failed with exit code 1解决办法

我在Windows10+Pytorch1.10.0+CUDA11.1环境下配置detectron2遇到如下问题:

E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(15): error: name must be a namespace name

E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(69): error: identifier "single_box_iou_rotated" is undefined
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=double]"
(105): here

E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(69): error: type name is not allowed
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=double]"
(105): here

E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(69): warning: expression has no effect
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=double]"
(105): here

E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(59): warning: variable "cur_box" was set but never used
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=double]"
(105): here

E:/python/PycharmProject/detectron2-blendmask/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(69): error: identifier "single_box_iou_rotated" is undefined
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=float]"
(105): here

E:/python/PycharmProject/detectron2-blendmask/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(69): error: type name is not allowed
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=float]"
(105): here

E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(69): warning: expression has no effect
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=float]"
(105): here

E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(59): warning: variable "cur_box" was set but never used
          detected during instantiation of "void nms_rotated_cuda_kernel(int, double, const T *, unsigned long long *) [with T=float]"
(105): here

5 errors detected in the compilation of "E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu".
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1\\bin\\nvcc.exe' failed with exit code 1


解决办法:

打开E:/python/PycharmProject/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu文件,修改下列内容:
win10环境下配置detectron2报错:\nvcc.exe‘ failed with exit code 1解决办法_第1张图片
修改成:
win10环境下配置detectron2报错:\nvcc.exe‘ failed with exit code 1解决办法_第2张图片
重新运行即可。

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