1
votes

OS: Windows 10

Python 3.7.4 (Conda)

GPU: GTX 980

So I installed CUDA toolkit v.10.1, got the matching cuDNN files, installed the cuda 10.1 enabled pytorch version and in addition to that i updated my gpu drivers. but if i now try to check wether my gpu is available with torch.cuda.is_available() it still get a False. Any Ideas??

1
Are you passing any environmental variable that force not use the GPU?Tommaso Bendinelli
@TommasoBendinelli I don't think so. This is the whole code import torch print(torch.cuda.is_available()) But I'm not sure wether i understood your question right.Levin
Is python (before actually running the code) invoked with other additional global environmental variables? I hope it is more clear nowTommaso Bendinelli
@TommasoBendinelli well I am using Anaconda if that counts as global environment, but i don't recall doing any extra settings in there.Levin

1 Answers

0
votes

You need to make sure that your python is running on GPU instead of CPU.

You can do this by starting your IDE on GPU by selecting from right-click options. Just right click on your IDE and select Run with graphics processer. Like Shown in picture below.

Starting program with graphics processor

Alternatively, you can go to Nvidia Control Panel > Manage 3D Settings > Program Settings and customize the default Graphics Processor of Python and your IDE to NVIDIA GPU. The control panel can be seen below.

Nvidia Control Panel