1

I've already tried almost all the methods but tensorflow doesnt see gpu.

>>> tf.test.is_gpu_available()
WARNING:tensorflow:From <stdin>:1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.config.list_physical_devices('GPU')` instead.
2020-10-08 16:57:31.356377: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-10-08 16:57:31.408641: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2299965000 Hz
2020-10-08 16:57:31.409379: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5d51170 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-10-08 16:57:31.409459: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-10-08 16:57:31.425795: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1
2020-10-08 16:57:32.550621: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2020-10-08 16:57:32.550734: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (dmitry-pc): /proc/driver/nvidia/version does not exist
False
>>> tf.python.client.device_lib.list_local_devices()
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 15855895153430362166
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 2500413154884527026
physical_device_desc: "device: XLA_CPU device"
]

UBUNTU 20.04

GPU-> geforce 940mx

CUDA-> 10.1

cudnn-> 7.6

tensorflow-gpu-> 2.3.1

I tried reinstall tensorflow, cuda, cudnn. Also the detailed advice didn't help either (https://stackoverflow.com/a/55891075/13669210)

talonmies
  • 70,661
  • 34
  • 192
  • 269
annaFerdsf
  • 329
  • 2
  • 14
  • /proc/driver/nvidia/version missing means you don't have a working GPU driver – talonmies Oct 08 '20 at 07:44
  • And for the skeptics in the room [here](https://stackoverflow.com/q/51035225/681865) is a [SO] question with a 940MX running CUDA code successfully – talonmies Oct 08 '20 at 07:59
  • @talonmies: The official list is for cards that are supported under both Windows and Linux, AFAICT. Other cards may work on some systems, but not all. So you can't deduce from one working 940MX that they'll work with all drivers on all systems. – MSalters Oct 08 '20 at 10:52
  • @MSalters: Yes you can. The list in question is notorious out of date and full of omissions and has been forever, especially for OEM and notebook parts. *Every* GPU NVDIA has released into the PC space since 2008 has been CUDA compatible. There are a tiny handful of cloud virtualization parts that didn't, but that is not at quesiton ehre. Some have fallen out of support, but they all work with CUDA. And any other suggestion is simply wrong, like the answer now deleted – talonmies Oct 08 '20 at 11:49
  • Tried to install cuda and etc on Windows and all is well, tensorflow sees the GPU. Probably as not so install cuda or cudnn :( – annaFerdsf Oct 08 '20 at 12:43

0 Answers0