title: Tensorflow can't use GPU. tf.test.is_gpu_available() show GPU but cannot use
body: <p>I have Ubuntu 18.04. Python 3.7.3, Tensorflow 2.0.0</p>
  
  <p>here's my cuda version:</p>
  
  <pre><code>nvcc: NVIDIA (R) Cuda compiler driver
  Copyright (c) 2005-2017 NVIDIA Corporation
  Built on Fri_Nov__3_21:07:56_CDT_2017
  Cuda compilation tools, release 9.1, V9.1.85
  </code></pre>
  
  <p>My computer is UX430UQ, graphic card is GeForce 940MX</p>
  
  <p>Here's the output from nvidia-smi:</p>
  
  <pre><code>+-----------------------------------------------------------------------------+
  | NVIDIA-SMI 418.87.01    Driver Version: 418.87.01    CUDA Version: 10.1     |
  |-------------------------------+----------------------+----------------------+
  | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
  | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
  |===============================+======================+======================|
  |   0  GeForce 940MX       On   | 00000000:01:00.0 Off |                  N/A |
  | N/A   45C    P0    N/A /  N/A |    283MiB /  2004MiB |      9%      Default |
  +-------------------------------+----------------------+----------------------+
  
  +-----------------------------------------------------------------------------+
  | Processes:                                                       GPU Memory |
  |  GPU       PID   Type   Process name                             Usage      |
  |=============================================================================|
  |    0      1014      G   /usr/lib/xorg/Xorg                            24MiB |
  |    0      1164      G   /usr/bin/gnome-shell                          47MiB |
  |    0      1440      G   /usr/lib/xorg/Xorg                           123MiB |
  |    0      1615      G   /usr/bin/gnome-shell                          84MiB |
  +-----------------------------------------------------------------------------+
  </code></pre>
  
  <p>Here's the output when I <code>run sudo apt-get install cuda</code>:</p>
  
  <pre><code>Reading package lists...
  Building dependency tree...
  Reading state information...
  cuda is already the newest version (10.1.243-1).
  0 upgraded, 0 newly installed, 0 to remove and 138 not upgraded.
  </code></pre>
  
  <p>Here's the output when I run <code>tf.test.is_gpu_available()</code></p>
  
  <blockquote>
    <p>2019-10-08 21:04:37.186069: I
    tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:1006] successful
    NUMA node read from SysFS had negative value (-1), but there must be
    at least one NUMA node, so returning NUMA node zero</p>
    
    <p>2019-10-08 21:04:37.188434: I
    tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0
    with properties: </p>
    
    <p>name: GeForce 940MX major: 5 minor: 0 memoryClockRate(GHz): 1.2415</p>
    
    <p>pciBusID: 0000:01:00.0</p>
    
    <p>2019-10-08 21:04:37.188863: W
    tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could
    not load dynamic library 'libcudart.so.10.0'; dlerror:
    libcudart.so.10.0: cannot open shared object file: No such file or
    directory; LD_LIBRARY_PATH: /usr/local/cuda-8.0/lib64</p>
    
    <p>2019-10-08 21:04:37.189156: W
    tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could
    not load dynamic library 'libcublas.so.10.0'; dlerror:
    libcublas.so.10.0: cannot open shared object file: No such file or
    directory; LD_LIBRARY_PATH: /usr/local/cuda-8.0/lib64</p>
    
    <p>2019-10-08 21:04:37.189426: W
    tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could
    not load dynamic library 'libcufft.so.10.0'; dlerror:
    libcufft.so.10.0: cannot open shared object file: No such file or
    directory; LD_LIBRARY_PATH: /usr/local/cuda-8.0/lib64</p>
    
    <p>2019-10-08 21:04:37.189687: W
    tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could
    not load dynamic library 'libcurand.so.10.0'; dlerror:
    libcurand.so.10.0: cannot open shared object file: No such file or
    directory; LD_LIBRARY_PATH: /usr/local/cuda-8.0/lib64</p>
    
    <p>2019-10-08 21:04:37.189946: W
    tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could
    not load dynamic library 'libcusolver.so.10.0'; dlerror:
    libcusolver.so.10.0: cannot open shared object file: No such file or
    directory; LD_LIBRARY_PATH: /usr/local/cuda-8.0/lib64</p>
    
    <p>2019-10-08 21:04:37.190202: W
    tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could
    not load dynamic library 'libcusparse.so.10.0'; dlerror:
    libcusparse.so.10.0: cannot open shared object file: No such file or
    directory; LD_LIBRARY_PATH: /usr/local/cuda-8.0/lib64</p>
    
    <p>2019-10-08 21:04:37.190236: I
    tensorflow/stream_executor/platform/default/dso_loader.cc:44]
    Successfully opened dynamic library libcudnn.so.7</p>
    
    <p>2019-10-08 21:04:37.190244: W
    tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] 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 <a href="https://www.tensorflow.org/install/gpu" rel="noreferrer">https://www.tensorflow.org/install/gpu</a> for how to download
    and setup the required libraries for your platform.</p>
    
    <p>Skipping registering GPU devices...</p>
    
    <p>2019-10-08 21:04:37.190261: I
    tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device
    interconnect StreamExecutor with strength 1 edge matrix:</p>
    
    <p>2019-10-08 21:04:37.190268: I
    tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0   </p>
    
    <p>2019-10-08 21:04:37.190276: I
    tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N</p>
  </blockquote>