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文件,修改下列内容:
在这里插入图片描述
修改成:
在这里插入图片描述
重新运行即可。

报错2

 from adet import _C ImportError: DLL load failed while importing _C: 找不到指定的模块。

前边python setup.py build develop的时候有一个warning,没有安装ninja,装上就可以了

  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 6
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值