-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
How to use my GPU GeForce 920M with YoloV5 #13400
Comments
👋 Hello @henriquerubio, thank you for reaching out and your interest in YOLOv5 🚀! It seems you're having some issues using your GPU with YOLOv5. To help us diagnose the problem, please make sure to provide a minimum reproducible example of your setup. You have already included some useful details about your environment and driver versions. This information is very helpful for us to understand what's happening. Additionally, ensure that all requirements are satisfied and compatible with your hardware. For a quick check, ensure your GPU drivers and CUDA installation are correctly set up for your GPU model, and that your installed version of PyTorch supports CUDA 10.1. Remember that compatibility among these components is crucial for proper GPU utilization. Our team is currently looking into this, and an Ultralytics engineer will assist you soon. In the meantime, please double-check the compatibility notes and keep sharing any additional context that might help us pinpoint the issue. Having a few more details or clarifications could expedite the resolution. 😊 Stay tuned! |
GPU drivers and CUDA installation are correctly set up for my GPU model. |
Thank you for confirming your setup. Please ensure you're using the latest YOLOv5 version and verify if the issue persists. If the problem continues, consider testing with a different PyTorch version that supports your CUDA setup. |
Thank you. How can I know wich PyTorch version supports my GPU and CUDA setup? |
To determine the compatible PyTorch version for your GPU and CUDA setup, refer to the official PyTorch installation guide at https://pytorch.org/get-started/previous-versions/. This resource provides detailed compatibility information for various CUDA versions and PyTorch releases. |
Ok, before making this post, I followed this page you mentioned https://pytorch.org/get-started/previous-versions/ CUDA 10.1 But how can I know wich PyTorch version supports my GPU and CUDA setup? |
To determine which PyTorch version supports your GPU and CUDA setup, refer to the compatibility table on the PyTorch website you mentioned. It lists the PyTorch versions compatible with specific CUDA versions. For your GeForce 920M with CUDA 10.1, try using PyTorch 1.7.1 or 1.8.1 as suggested, and ensure your GPU drivers are up to date. |
Ok I found the origin of the problem: Starting from version 1.3 of PyTorch, the pre-compiled binaries are no longer optimized for GPUs with a compute capability lower than 3.7. This includes older models, such as the Tesla K40c, which has a compute capability of 3.5. In practice, this means that when installing PyTorch from the official binaries, the code will not be compatible with older GPUs, resulting in the error:
This error occurs because PyTorch cannot find a compatible "image" (CUDA binary kernel) with the GPU's compute capability, preventing the execution of the code. Solution: Compile PyTorch from Source Code: |
Thank you for identifying the issue. Compiling PyTorch from source with support for your GPU's compute capability is indeed a viable solution. You can follow the PyTorch from source guide to customize the build for your GeForce 920M. |
Search before asking
YOLOv5 Component
No response
Bug
Hi, I have a GPU GeForce 920M, but I can't use it. I can run inference with CPU, but it doesn't woork with my GPU.
python detect.py --weights yolov5s.pt --source 0 --device cpu --> works well (image "cpu")
python detect.py --weights yolov5s.pt --source 0 --> ERROR (described bellow) (image "gpu")
All required packages are up to date, according to the "Requirements.TXT" from Yolov5 ("Requirements" and "Piplist" images)
When I test the cuda and the GPU it seems to me to be right (image "cuda-test")
Do you think the current versions of Pytorch and Torchvision are incorrectly with GeForce 920m? Should I try to reinstall the Pytorch and Cuda?
I think if I try to execute Yolov5 with a version of Pytorch that is best suited for older GPUs, such as Pytorch 1.7 or 1.6 (which may be more compatible with my GPU), I will have to change yolo version to one Lower version than yolov5, right? I say this because in the "Requirements" is said "Torch> = 1.8.0"
IMAGES:
"cpu"
"gpu"
"yolov5requirements"
"pip list"
"NVIDIA-SMI"
"cuda-test"
Environment
Minimal Reproducible Example
No response
Additional
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: