Answer the question
In order to leave comments, you need to log in
How to run a python application with CUDA on Windows 10 when it says device: 0?
Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)] on win32
import torch
torch.cuda.is_available()
C:\Users\max\PycharmProjects\pythonProject\venv\lib\site-packages\torch\cuda\__init__.py:52: UserWarning: CUDA initialization: CUDA driver initialization failed, you might not have a CUDA gpu. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
False
C:\Users\max>nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2021 NVIDIA Corporation
Built on Mon_May__3_19:41:42_Pacific_Daylight_Time_2021
Cuda compilation tools, release 11.3, V11.3.109
Build cuda_11.3.r11.3/compiler.29920130_0
Answer the question
In order to leave comments, you need to log in
But after all, nvidia-smi found some kind of gpu, it still won't work with cuda?
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 456.71 Driver Version: 456.71 CUDA Version: 11.1 |
|-------------------------------+----------------------+----------------------+
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question