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

Error compiling objects for extension #37

Closed
wisest-cui opened this issue May 8, 2022 · 8 comments
Closed

Error compiling objects for extension #37

wisest-cui opened this issue May 8, 2022 · 8 comments

Comments

@wisest-cui
Copy link

Describe the bug
when i run the commend "python setup.py develop",there is a ERROR: Error compiling objects for extension
I have check the environment and the cuda is availiable. my environment is same to what requirement.txt describe.

I ask to Google and find I shoud to replace "AT_CHECK" to "TORCH_CHECK" and I find "AT_CHECK" in some path: mmdet/opt/ /src/ .cpp

Reproduction
python setup.py develop

@zhengye1995
Copy link
Owner

What is your version of PyTorch, I used torch1.1.0 in this repo.

@wisest-cui
Copy link
Author

thank you for your apply!
我的环境是:

  • OS: [e.g., Ubuntu 16.04.6]
  • GCC [e.g., 5.4.0]
  • PyTorch version [e.g., 1.1.0] 1.10.0
  • How you installed PyTorch [e.g. pip, conda, source]
  • GPU model [e.g.,4 个 3090]
  • CUDA and CUDNN version:10.0.

并且我在https://download.pytorch.org/whl/torch/ 下载pytorch轮子的地方没有找到torch1.1.0 对应有cuda的版本。不知作者您的pytorch=1.1.0 torchvision=0.3.0 cudatoolkit=10.0是如何匹配的 (按照我的理解cuda10.0的版本和pytorch1.1.0不匹配,所以我就以为这里pytorch1.1.0是您写错了 所以就下载了 1.10.0)

@zhengye1995
Copy link
Owner

I install torch through: conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch

By the way, cuda10 may not be compatible with 3090.

@wisest-cui
Copy link
Author

我执行 nvidia-sim 命令查看显卡最高支持到11.2,应该是向下兼容的吧(自带翻译)
然后我有另外一个问题 我的cuda是通过cuda官网 下载runfile 到 usr/local/cuda 但是只通过 conda install cudatoolkit=10.0的话 通过nvcc -V是无法显示cuda下载成功的。我的理解是 conda install 主要包含应用程序在使用CUDA相关的功能时所依赖的动态链接库。conda安装只会安装一些计算库,但不会安装编译工具。
所以步骤是不是应该是先从cuda官网下载cuda10.0到usr/local/cuda然后修改环境变量,然后执行conda install pytorch==1.1.0 torchvision==0.3.0 cudatoolkit=10.0 -c pytorch 才可以

I run the “nvidia-sim” command to check the nvidia support up to cuda 11.2, which should be backward compatible?
Then I have another problem with my cuda. Runfile is downloaded to usr/local/cuda through conda install cudatoolkit=10.0 .and the the commend "nvcc -V" show there is no CUDA. Conda Install mainly contains the dynamically linked libraries that applications rely on to use CUDA-related functionality. The Conda installation only installs some computing libraries, but does not install compilation tools.
so,first, I should Download cuda10.0 to usr/local/cuda and modify the environment variables. the run the commend "conda install PyTorch ==1.1.0 TorchVision ==0.3.0 CUDatoolKit =10.0 -c PyTorch"

@zhengye1995
Copy link
Owner

Yes, you should install cuda in your system frist and use ncvv -V to check it.

As for as I know, 3090 requires at least cuda11, won't work properly on cuda10.

@wisest-cui
Copy link
Author

thanks you for your reply!
and you are right, 3090 requires at least cuda11,I googled it。

@wisest-cui
Copy link
Author

I have run the program successfully! thank you for your answer!

@JKZhan
Copy link

JKZhan commented May 11, 2022

I have run the program successfully! thank you for your answer!

which version of mmdetection did you install ?

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

3 participants