Window11 安装detectron2记录贴

python setup.py build --force develop

出现报错:

ir.h(1347): error: member "torch::jit::ProfileOptionalOp::Kind" may not be initialized

查阅了许多博客的解决办法就是定位到指定位置,注释掉这一句话

 但是,接下来编译又出现了好多问题:

nms_rotated_cuda.cu
D:/ProgramData/Anaconda3/envs/det/lib/site-packages/torch/include\c10/util/ThreadLocalDebugInfo.h(12): warning: modifier is ignored on an enum specifier

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(14): error: name must be a namespace name

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: identifier "single_box_iou_rotated" is undefined
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: type name is not allowed
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): warning: expression has no effect
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(58): warning: variable "cur_box" was set but never used
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=double]"
(105): here

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: identifier "single_box_iou_rotated" is undefined
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): error: type name is not allowed
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(68): warning: expression has no effect
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here

E:/Code/open-world-ob-gym/OWOD/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu(58): warning: variable "cur_box" was set but never used
          detected during instantiation of "void nms_rotated_cuda_kernel(int, float, const T *, unsigned long long *) [with T=float]"
(105): here

5 errors detected in the compilation of "C:/Users/miclo/AppData/Local/Temp/tmpxft_00000c50_00000000-7_nms_rotated_cuda.cpp1.ii".
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin\\nvcc.exe' failed with exit status 1

关键词是:nms_rotated_cuda.cu(68),所以问题出在这里,需要如下操作:

 之后,问题完美解决。

PS:这里我之前做过一件事情是将vs2019的cl.exe添加到了环境变量中。如果上边有问题可以参考这一条。

  • 7
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值