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

无法在GPU上运行/Cannot run on GPU #393

Open
FrancisGrace opened this issue Sep 8, 2022 · 2 comments
Open

无法在GPU上运行/Cannot run on GPU #393

FrancisGrace opened this issue Sep 8, 2022 · 2 comments

Comments

@FrancisGrace
Copy link

FrancisGrace commented Sep 8, 2022

❓ Questions & Help

我的电脑有一个GPU,我在experiments()函数中指定了参数devices=[0],但运行后CPU利用率接近100%,GPU利用率几乎为0,显然程序并未在GPU上运行。
My computer has a GPU, and I declared the argument devices=[0] in the function experiments(). However, when I ran it, the utilization of CPU reached almost 100% while that of GPU was still almost 0%. Obviously the program didn't run on the GPU.

@cenyk1230
Copy link
Member

Hi @FrancisGrace,

请问你是否成功安装了gpu版本的pytorch?可以通过输出torch.cuda.is_available()检查一下。

@FrancisGrace
Copy link
Author

Hi @FrancisGrace,

请问你是否成功安装了gpu版本的pytorch?可以通过输出torch.cuda.is_available()检查一下。

@cenyk1230 是的,我的PyTorch版本为1.11,虚拟环境下这个函数返回值为True

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