-
Notifications
You must be signed in to change notification settings - Fork 107
How to use GPU correctly #133
Comments
Hi @tjb-tech! First of all, is your GPU readily set up with CUDA? You can verify that by running If you enable the |
First of all, thank you very much for your timely reply to us. Through your method, we have checked that nvidia-smi does have a new line of Python process. However, I found that the CPU utilization rate was close to 100%, while the GPU utilization rate was close to 1%. Could you tell me why? I hope to get your professional reply. Thank you very much |
The problem with video datasets is that loading and decoding of the videos can get expensive. So it can happen that the update step of the model on the GPU is done faster than the preparation of the next batch, which leads to the CPU being utilized more than the GPU. watch -n 1 nvidia-smi And could you send over your CPU and GPU specs? |
Thanks for the info! It looks like the Python process is allocating some memory on the GPU, which is a good sign. Do you see any other output on the console of the epochs being finished? And do you get a resulting checkpoint? Generally, does training in PyTorch work for you in other projects? import torch
torch.cuda.is_available() I must admit that we haven't tested our code on Windows in a while, so there might also be a platform-related issue. |
Hey @tjb-tech, have you been able to resolve your issue? |
Thank you very much for your concern and I'm sorry for not replying to you in time. We tried using torch.cuda.is_available(), and the return value is true, but the GPU and CPU usage are still the same as before, so I think it may be a system compatibility issue, which you can do some further research on. By the way, my system is Windows 10. |
Thanks for the update. Do you still get a checkpoint after training and how long does it take? Because if that generally works, I would go ahead and close this issue for now. |
This is a regular output and not relevant when running this application locally. You don't need to worry about setting up a WSGI server. If the second error persists, I will have to take a look at that though 😕 Can you already send me the contents of your |
|
Very interesting. This is either a very outdated format or an error occurred. Anyway, I would recommend deleting this file and trying again. Also you might want to pull our latest |
Yes, the training module has only been added a few days ago, so after pulling our latest updates this feature should be enabled for you. |
Hey @tjb-tech, thank you for the kind words! That specific demo which you found on our website is kind of old and wasn't obtained using |
It looks like the original issue has been solved, so I'm going to close this thread now. |
Hello, could you please tell me how to start the GPU of this project? I tried '--use_gpu' in the command line, but did not open the GPU. I hope you can answer my question as soon as possible after you see it. Thank you very much
The text was updated successfully, but these errors were encountered: