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

运行2(3)Compilate the C++Cuda Library时报错 #10

Open
Mei118 opened this issue Sep 29, 2023 · 1 comment
Open

运行2(3)Compilate the C++Cuda Library时报错 #10

Mei118 opened this issue Sep 29, 2023 · 1 comment

Comments

@Mei118
Copy link

Mei118 commented Sep 29, 2023

models/orn/src/cuda/ActiveRotatingFilter_cuda.cu:5:10: fatal error: THC/THC.h: 没有那个文件或目录
5 | #include <THC/THC.h>
| ^~~~~~~~~~~
compilation terminated.
error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1
我的配置是RTX3060,torch1.12.1+cu116

@chongkuiqi
Copy link
Owner

models/orn/src/cuda/ActiveRotatingFilter_cuda.cu:5:10: fatal error: THC/THC.h: 没有那个文件或目录 5 | #include <THC/THC.h> | ^~~~~~~~~~~ compilation terminated. error: command '/usr/local/cuda/bin/nvcc' failed with exit code 1 我的配置是RTX3060,torch1.12.1+cu116

pytorch1.11之后已经去掉了THC/THC.h,因此有以下两种方法:
(1)安装1.10及以前的pytorch版本;
(2)更改主动旋转滤波器的cuda源码,将#include <THC/THC.h>注释掉,把THCudaCheck替换为AT_CUDA_CHECK,并替换THCCeilDiv(x,y)为(x+y-1)/y,更详细的可以参考这三个帖子,https://blog.csdn.net/qq_51346719/article/details/131160650, https://blog.csdn.net/code_zhao/article/details/129172817,https://github.com/CoinCheung/pytorch-loss/pull/37

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

2 participants