DeepLearningExamples icon indicating copy to clipboard operation
DeepLearningExamples copied to clipboard

cannot use cuda in pytorch

Open huyuaaaray opened this issue 2 years ago • 0 comments

Hi, I am using the CUDA to accelerate the YOLO prediction, but somehow it cannot using the cuda as the model device. Examples:

  • GNMT/PyTorch
  • YOLO
  • VS CODE

Basically, my GPU is: +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 535.98 Driver Version: 535.98 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | 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 RTX A1000 Laptop GPU WDDM | 00000000:01:00.0 Off | N/A | | N/A 38C P0 8W / 38W | 0MiB / 4096MiB | 0% Default | | | | N/A | +-----------------------------------------+----------------------+----------------------+

+---------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=======================================================================================| | No running processes found | +---------------------------------------------------------------------------------------+

Does this gpu support the cuda? And when i using the script: if torch.cuda.is_available(): device = torch.device("cuda")
else: device = torch.device("cpu")
it always shows i am using cpu.

Sincerely, Yu Hu

huyuaaaray avatar Jun 03 '23 01:06 huyuaaaray