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

RuntimeError: Not compiled with GPU support #48

Open
1N2602000 opened this issue Jul 13, 2023 · 7 comments
Open

RuntimeError: Not compiled with GPU support #48

1N2602000 opened this issue Jul 13, 2023 · 7 comments

Comments

@1N2602000
Copy link

1N2602000 commented Jul 13, 2023

Hi~ I have a problem when i trying to run the demo model.Did anyone run into this problem before?
I have no clue how to solve it. QQ
image

I check my pytorch it can use cuda as well
image

@wymanCV
Copy link
Contributor

wymanCV commented Jul 13, 2023

@1N2602000
Hi, thanks for your interest. It seems that your project has not been compiled with CUDA, indicating the failure in this step. It is necessary to make sure the CUDA environment is correct during compiling. You can check with nvcc -v.
Moreover, it seems that you use the Windows system. It may need some other operations, as shown here.

@1N2602000
Copy link
Author

Thanks for your advice! It work just just fine when I check my cuda run properly.

@1N2602000
Copy link
Author

but something wrong with ninja , so I uninstall it and build can run just fine. I'm not sure about what ninja work in this project. Did it is necessary to install ninja? When I use ninja build will fail, but when I uninstall it build run successfully. That confused me.

@wymanCV
Copy link
Contributor

wymanCV commented Jul 20, 2023

but something wrong with ninja , so I uninstall it and build can run just fine. I'm not sure about what ninja work in this project. Did it is necessary to install ninja? When I use ninja build will fail, but when I uninstall it build run successfully. That confused me.

Hi, I think the ninja lib does not matter if you can successfully run the code. Thanks!

@xzb666
Copy link

xzb666 commented Oct 21, 2023

Hi~ I have a problem when i trying to run the demo model.Did anyone run into this problem before? I have no clue how to solve it. QQ image

I check my pytorch it can use cuda as well image

您好,我想咨询一下您使用的是哪个版本的GPU,太高版本的GPU编译环境总是出现很多问题

@xzb666
Copy link

xzb666 commented Sep 24, 2024

在这个地方进行了很多次尝试最后解决的,希望可以给各位同学帮组。首先将setup.py按照大家提供的那个进行更改。但是更多问题存在于30/40显卡它对应的CUDA11.3等对g++ 版本有严格限制。
1.所以我们需要首先切换回 g++-9: 使用以下命令设置 g++ 版本为 9:sudo update-alternatives --config g++
确认当前版本 运行:g++ --version
2.ubuntu20系统他强制为gcc10,所以需要确保使用正确的 g++ 版本: 确认你的环境变量中 CC 和 CXX 是否指向 g++-9。你可以通过以下命令检查:
echo $CC
echo $CXX
如果它们指向 g++-10,请设置它们:
export CC=gcc-9
export CXX=g++-9
重新编译: 尝试再次运行:python setup.py install
3.如果系统没有gcc9使用 wget 下载其他镜像: 找到其他可用的镜像链接,例如:wget http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-10/g++-10_10.2.0-6ubuntu1_amd64.deb
sudo dpkg -i g++-10_10.2.0-6ubuntu1_amd64.deb
sudo apt-get install -f # 修复依赖

@wymanCV
Copy link
Contributor

wymanCV commented Sep 26, 2024

首先将setup.py按照大家提供的那个进行更改。但是更多问题存在于30/40显卡它对应的CUDA11.3等对g++ 版本有严格限制。
1.所以我们需要首先切换回 g++-9: 使用以下命令设置 g++ 版本为 9:sudo update-alternatives --config g++
确认当前版本 运行:g++ --version
2.ubuntu20系统他强制为gcc10,所以需要确保使用正确的 g++ 版本: 确

Hi, @xzb666,

Thank you for your invaluable assistance in resolving the issues. Our repository is quite old and does encounter some compatibility problems, so your help is greatly appreciated!

If you have any questions or need further discussion, feel free to reach out to me via email at wymanbest@outlook.com.

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