Hi! I’m on Windows 10, and I’m trying to use Pytorch to do the inference of an object detection model from a ZED2 camera live feed.
Since my dedicated GPU is an Nvidia GTX 960M, to use the ZED sdk I must have CUDA 10.2 (from their documentation)
Then I looked into the Pytorch documentation and pip installed the 1.12.1 version, since it appears to be the one compatible with CUDA 10.2 .
The problem is that when I run the following python code I get these outputs:
>>>print(torch.rand(3, 5))
tensor([[0.4762, 0.6145, 0.5041, 0.3896, 0.4517],
[0.5318, 0.8051, 0.6773, 0.7620, 0.4723],
[0.7000, 0.3737, 0.6725, 0.4347, 0.7750]])
>>>print(torch.cuda.is_available())
False
>>>print(torch.version.cuda)
None
>>>print(torch.cuda.device_count())
0
>>>print(torch.backends.cudnn.enabled )
True
So, to my understading, Pytorch is correctly instaled but it can’t detect CUDA, and i can’t find how to slve this. Any help? I attach below some outputs from cmd that could help, thanks to anyone who will take a look
>>>pip show torch
Name: torch
Version: 1.12.1
Summary: Tensors and Dynamic neural networks in Python with strong GPU acceleration
Home-page: https://pytorch.org/
Author: PyTorch Team
Author-email: packages@pytorch.org
License: BSD-3
Location: c:\users\gemel\appdata\local\programs\python\python38\lib\site-packages
Requires: typing-extensions
Required-by: torchvision, torchaudio, thop
>>>nvidia-smi
Fri Mar 10 18:54:04 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 528.33 Driver Version: 528.33 CUDA Version: 12.0 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... WDDM | 00000000:01:00.0 On | N/A |
| N/A 0C P5 N/A / N/A | 123MiB / 4096MiB | 32% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 11004 C+G C:\Windows\System32\dwm.exe N/A |
| 0 N/A N/A 17984 C+G ...are Update\DellUpTray.exe N/A |
+-----------------------------------------------------------------------------+
>>>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:32:27_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.2, V10.2.89