Giter VIP home page Giter VIP logo

Comments (3)

chongkuiqi avatar chongkuiqi commented on June 4, 2024

更改主动旋转滤波器的cuda源码,将#include <THC/THC.h>注释掉,把THCudaCheck替换为AT_CUDA_CHECK,并替换THCCeilDiv(x,y)为(x+y-1)/y,完成以上操作之前我试了一下再次运行python setup.py build_ext --inplace观察是否为原本的THC问题,但是报出错误变成了IndexError: list index out of range,完成THC更改的操作后,运行同样出现了这个错误,使用了python setup.py clean命令再运行仍然报错,部分报错代码如下File "/home/mjh/anaconda3/lib/python3.9/site-packages/torch/utils/cpp_extension.py", line 1694, in _get_cuda_arch_flags arch_list[-1] += '+PTX' IndexError: list index out of range 麻烦作者大大了,感谢感谢

这个问题我没有遇到过,可用尝试以下两种方法看看是否能够解决,如果成功了麻烦告诉我一下:
(1)首先确保torch.cuda.is_available()为True,然后进行编译
(2)参考这个帖子https://github.com/pytorch/extension-cpp/issues/71,进行修改

from s2anet.

Mei118 avatar Mei118 commented on June 4, 2024

已经成功解决了,我参考的是下面这个链接内容
https://blog.csdn.net/iLOVEJohnny/article/details/123074279
一开始torch.cuda.is_available()为False,于是我按照步骤检查我的CUDA和cuDNN,因为忘记显卡信息,我在终端输入了nvidia-smi,报错为NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running.
后来才知道是因为重启Ubuntu导致的内核更新使得新版本内核和原来显卡驱动不匹配,后来我根据帖子https://blog.csdn.net/xiaojinger_123/article/details/121161446中内容操作torch.cuda.is_available()为True后再进行编译就没有报错了
但是现在有个新问题,运行
cd S2ANet
python setup.py build_ext --inplace
显示copy的编译文件并没有出现在显示的文件夹中,导致训练模型时出现扩展包无法识别的情况

from s2anet.

chongkuiqi avatar chongkuiqi commented on June 4, 2024

已经成功解决了,我参考的是下面这个链接内容 https://blog.csdn.net/iLOVEJohnny/article/details/123074279 一开始torch.cuda.is_available()为False,于是我按照步骤检查我的CUDA和cuDNN,因为忘记显卡信息,我在终端输入了nvidia-smi,报错为NVIDIA-SMI has failed because it couldn't communicate with the NVIDIA driver. Make sure that the latest NVIDIA driver is installed and running. 后来才知道是因为重启Ubuntu导致的内核更新使得新版本内核和原来显卡驱动不匹配,后来我根据帖子https://blog.csdn.net/xiaojinger_123/article/details/121161446中内容操作torch.cuda.is_available()为True后再进行编译就没有报错了 但是现在有个新问题,运行 cd S2ANet python setup.py build_ext --inplace 显示copy的编译文件并没有出现在显示的文件夹中,导致训练模型时出现扩展包无法识别的情况

把编译过程产生的build文件夹整个删掉,然后重新编译

from s2anet.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.