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

CPU usage reaches 100%, while the GPU (NVIDIA GeForce RTX 3060) only uses 1.2GB of memory. #24

Open
YANGTUOMAO opened this issue Oct 10, 2024 · 2 comments

Comments

@YANGTUOMAO
Copy link

image
image

Issue Description
I have noticed that when running the program, the CPU usage reaches 100%, while the GPU (NVIDIA GeForce RTX 3060) only uses 1.2GB of memory. Despite specifying the device as cuda:0 in the command, it seems that the program is still utilizing the CPU for computation.

Environment Information
Operating System: Windows 11
Python Version: 3.x (please replace with the actual version)
Running Environment: Using a virtual environment (e.g., Anaconda)
Solutions Attempted
Ensured that the device is correctly specified as cuda:0.
Verified that CUDA and PyTorch are properly installed.
I am a beginner in federated learning and would appreciate any further suggestions or possible solutions. Thank you!

@QinbinLi
Copy link
Owner

Hi @YANGTUOMAO ,

I haven't tested the code in Windows, and I'm not familiar with running pytorch on Windows. I'm not sure whether cuda:0 is your 3060 GPU. Maybe you can try cuda:1. Also, you may check whether there is a clear difference on the GPU memory usage before and after running the program. Our code still performs some computations on CPUs and high CPU utilization may be normal.

@YANGTUOMAO
Copy link
Author

I have test this project on the A100 server of my #lab, with some changes in conf. It works fine, thx

你好@YANGTUOMAO

我还没有在Windows上测试过代码,而且我不熟悉Windows上运行pytorch。我不确定cuda:0是否是你的3060 GPU。也许你可以尝试cuda:1。另外,你可以检查运行程序的GPU内存使用情况情况是否有明显差异。我们的代码仍然在CPU上执行一些计算,高CPU利用率可能是正常的。

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