0

I installed tensorflow-gpuinto my new computer, and the system, and everything is recognizing perfectly my GPU, for that I tried on my terminal:

Nvidia test:

nvcc  --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243

However, trying to know if tensorflow recognizes the GPU I tried:

Tensorflow test:

import tensorflow as tf
tf.test.is_gpu_available()

Result:

2020-05-04 22:51:25.687188: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-04 22:51:25.687914: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: 
pciBusID: 0000:06:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.65GHz coreCount: 34 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2020-05-04 22:51:25.687956: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-05-04 22:51:25.687972: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2020-05-04 22:51:25.687986: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2020-05-04 22:51:25.688002: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2020-05-04 22:51:25.688015: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2020-05-04 22:51:25.688029: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2020-05-04 22:51:25.688112: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory
2020-05-04 22:51:25.688124: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2020-05-04 22:51:25.688160: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-05-04 22:51:25.688170: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0 
2020-05-04 22:51:25.688178: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N 
False

On the other hand, following the suggestion given here. I tried the following commands:

Other Tensorflow test:

from tensorflow.python.client import device_lib
device_lib.list_local_devices() 

And I get the following logs.

My logs:

2020-05-04 22:53:35.486634: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2020-05-04 22:53:35.487357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties: 
pciBusID: 0000:06:00.0 name: GeForce RTX 2060 SUPER computeCapability: 7.5
coreClock: 1.65GHz coreCount: 34 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2020-05-04 22:53:35.487403: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2020-05-04 22:53:35.487421: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2020-05-04 22:53:35.487436: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2020-05-04 22:53:35.487451: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2020-05-04 22:53:35.487464: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2020-05-04 22:53:35.487477: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2020-05-04 22:53:35.487564: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'libcudnn.so.7'; dlerror: libcudnn.so.7: cannot open shared object file: No such file or directory
2020-05-04 22:53:35.487574: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1598] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2020-05-04 22:53:35.487591: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-05-04 22:53:35.487598: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0 
2020-05-04 22:53:35.487604: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N 
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 12034437465466050746
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 16469163198093824972
physical_device_desc: "device: XLA_CPU device"
, name: "/device:XLA_GPU:0"
device_type: "XLA_GPU"
memory_limit: 17179869184
locality {
}
incarnation: 5712734079173508475
physical_device_desc: "device: XLA_GPU device"
]

is tensorflow recognizing my GPU? Some results tell me True and other False. Please help.

Edit

Other test I have done:

import tensorflow as tf
tf.test.is_built_with_cuda()
True

What is wrong here?

Henry Navarro
  • 943
  • 8
  • 34

2 Answers2

1

Your GPU is being detected, you just didn't install everything correctly. You need this post: Which TensorFlow and CUDA version combinations are compatible?. I think your cuda is OK, but cudnn isn't installed correctly, as from the logs.

Frederik Bode
  • 2,632
  • 1
  • 10
  • 17
0

Tensorflow is detecting your GPU but it does not means that it is fully functional.

As you can see in te logs, the libcuddn lib. does not appears to be installed on the system.

You can find the installation instructions of this library in the official documentation : https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html

Make sure that you also have all the dependancies listed there installed : https://www.tensorflow.org/install/gpu

Avditvs
  • 34
  • 5