FJ_Abbasi
FJ_Abbasi

Reputation: 443

Tensorflow does not get GPU

Python verion: 3.7.6

Tensorflow version: 2.3.0

CUDA: 10.2.89

CUDNN: 10.2

nvcc --version:

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

nvidia-smi output:

    +-----------------------------------------------------------------------------+
    | NVIDIA-SMI 451.48       Driver Version: 451.48       CUDA Version: 11.0     |
    |-------------------------------+----------------------+----------------------+
    | GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
    | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
    |===============================+======================+======================|
    |   0  GeForce GTX 1080   WDDM  | 00000000:04:00.0  On |                  N/A |
    |  0%   47C    P8     8W / 200W |    463MiB /  8192MiB |      0%      Default |
    +-------------------------------+----------------------+----------------------+

    +-----------------------------------------------------------------------------+
    | Processes:                                                                  |
    |  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
    |        ID   ID                                                   Usage      |
    |=============================================================================|
    |    0   N/A  N/A      1268    C+G   Insufficient Permissions        N/A      |
    |    0   N/A  N/A      1308    C+G   Insufficient Permissions        N/A      |
    |    0   N/A  N/A      4936    C+G   ...\Direct4\jabra-direct.exe    N/A      |
    |    0   N/A  N/A      7500    C+G   Insufficient Permissions        N/A      |
    |    0   N/A  N/A      7516    C+G   ...w5n1h2txyewy\SearchUI.exe    N/A      |
    |    0   N/A  N/A      9668    C+G   Insufficient Permissions        N/A      |
    |    0   N/A  N/A     10676    C+G   C:\Windows\explorer.exe         N/A      |
    |    0   N/A  N/A     10828    C+G   ...st\Desktop\Mattermost.exe    N/A      |
    |    0   N/A  N/A     11536    C+G   ...8bbwe\Microsoft.Notes.exe    N/A      |
    |    0   N/A  N/A     14604    C+G   ...es.TextInput.InputApp.exe    N/A      |
    +-----------------------------------------------------------------------------+

I tried:

print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))

Num GPUs Available: 0

Why tensorflow is not able to detect the GPU?

Upvotes: 2

Views: 1893

Answers (1)

Aniket Bote
Aniket Bote

Reputation: 3564

It seems you are trying to use the TensorFlow-GPU version and you have downloaded unsupported versions.

Note: GPU support is available for Ubuntu and Windows with CUDA enabled cards only.

If you have a Cuda enabled card follow the instructions provided below.

As stated in Tensorflow documentation. The software requirements are as follows.

Nvidia gpu drivers - 418.x or higher
Cuda - 10.1 (TensorFlow >= 2.1.0)
cuDNN - 7.6

Make sure you have these exact versions of the software mentioned above. See this

Also, check the system requirements here.

Make sure you have installed all the c++ redistributables - here

For downloading the software mentioned above see here.

For downloading TensorFlow follow the instructions provided here to correctly install the necessary packages.

Upvotes: 1

Related Questions