Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win10环境下,torch1.13.0, install utils.nms_rotated项目由pytorch1.10升级1.11中间要改的东西(THC相关) #512

Open
oolown opened this issue Dec 15, 2022 · 0 comments

Comments

@oolown
Copy link

oolown commented Dec 15, 2022

由于本人学习该项目时候所安装pytorch版本为1.13.0,且为win10系统。进行cd utils/nms_rotated python setup.py develop时 苦不堪言。主要经历三方面bug
①:OSError: CUDA_HOME environment variable is not set. Please set it to your CUDA install root.
原因:由于通过 anaconda 安装的 cuda 不是整个软件包。
解决方案:从 Nvidia 网站手动安装 cuda 驱动程序安装驱动程序后,pytorch 将能够访问 cuda 路径。
②:fatal error: THC/THC.h: No such file or directory
原因:新版pytorch移除了 THC/THC.h 及系列函数,部分函数替换。
解决方案:更改poly_nms_cuda.cu头文件,更改弃用函数为新版函数。
③:出现expected a declaration 错误
原因:编码格式问题
解决方案:将Unix编码改成windows 编码。
最终python setup.py develop 成功。
为防止大家和我一样在win10和torch1.10.0+遇到类似问题,下面是我修改好的poly_nms_cuda.cu,大家可以替换,然后直接运行即可。
https://zhuanlan.zhihu.com/p/592049655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant