0
点赞
收藏
分享

微信扫一扫

3090(30系显卡)编译prpooling出错的解决办法

求索大伟 2022-04-27 阅读 68

写在最前面: 等等党继续等,我要看空中飞人。

现在30系显卡可能因为降价已经开始走入炼丹师的炉中,各位tracker也会频繁的使用pytracking框架中的ATOM和DIMP作为baseline,或者跑别人的代码里面用到了PRPooling,亦或者自己的代码里面想使用PRPooling,那可能会遇到编译的问题(PRPooling通常在被使用的时候都是在线编译的),如果没有编译问题的话那就恭喜了,下面就不用看了。
比如下面的博客都有问题:

  1. 编译pytorch版本的PreciseRoIPooling
  2. pytracking框架 服务器端配置采坑(ubuntu18.04+cuda11.3)

比如在我自己的环境上也遇到过里面类似的报错,我的环境是CUDA11.1和RTX3090, PyTorch 1.7:

  • Using /home/ubntun/.cache/torch_extensions as PyTorch extensions root...然后就没有了,这种啥报错都没有的最难debug了
  • cudacontext.h:5:10: fatal error: cuda_runtime_api.h: no such file or directory 明明是有这个文件的
  • nvcc fatal : Unsupported gpu architecture ‘compute_86’ 算力86明明是30系和Ampere卡都支持的,结果也很懵圈

我的解决办法是这样的:
把原本的这几行

PrRoIPoolingForwardGpu(
        stream, features.data<float>(), rois.data<float>(), output.data<float>(),
        nr_channels, height, width, pooled_height, pooled_width, spatial_scale,
        top_count
    );

改成下面的这种, 其实就改了一行:

PrRoIPoolingForwardGpu(
        stream, features.data_ptr<float>(), rois.data_ptr<float>(), output.data_ptr<float>(),
        nr_channels, height, width, pooled_height, pooled_width, spatial_scale,
        top_count
    );

然后就能编译成功了,标志就是:
Loading extension module _prroi_pooling...
或者仍然会有这样的提示信息:
PreciseRoIPooling/pytorch/prroi_pool/src/prroi_pooling_gpu.c: In function ,如果是这样的话就再跑一遍就好了。

如果有同样遭遇并且这样可以解决的,欢迎在下面评论~

举报

相关推荐

0 条评论