UPDATE: After more googling and research I have discovered that Tensor flow doesn't support CUDA 10.1 and only support VUDA 10.0 as of Feb 2019. So I will have to downgrade to CUDA 10.0 to work with the current TF version
TLDR: CUDA is installed and CUDNN is working but I can't get Tensorflow to recognize my NVIDIA GEFORCE RTX 2070, it only shows my CPU as avaiable devices. By Running this.
from tensorflow.python.client import device_lib
device_lib.list_local_devices()
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 14262450855498090337, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 1345793131978591054
physical_device_desc: "device: XLA_CPU device"]
Long Version I am trying to use Cuda on Ubnutu to decrease the training time for my machine learning algos. Keras == 1.0.7 TensorFlow = 1.13.1
This question is similar but does not help. My results are fine as well.
How to check if cuda is installed correctly on Anaconda
Nvidia Drivers (10.1) as required by my graphics card (NVIDIA RTX 2070):
nvidia-smi
Mon Apr 15 18:39:13 2019
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.56 Driver Version: 418.56 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 RTX 2070 Off | 00000000:01:00.0 Off | N/A |
| N/A 42C P8 7W / N/A | 0MiB / 7952MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+
Then checking my CUDA installation: (10.1 as required by my graphics card)
nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105
Everything seems to look good so far. But when I try to Test my Cuda and Cudnn installation There is lots of text that runs through here but I did the following commands.
cd cudnn_samples_v7/mnistCUDNN/
make clean && make
result is successful
./mnistCUDNN
lots of text followed by:
Result of classification: 1 3 5
Test passed!
So with all of these verification it seems that CUDA and CUDNN is up and running on my system. However when I try to check in TensorFlow or in Keras it doesn't show my GPU as available.
from tensorflow.python.client import device_lib
device_lib.list_local_devices()
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 14262450855498090337, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 1345793131978591054
physical_device_desc: "device: XLA_CPU device"]
I followed this guide for a GPU enabled Tensorflow version.
His showed the NVIDIA GEFORCE RTX 2070 as available
经过更多的谷歌搜索和研究后,我发现 Tensor flow 不支持 CUDA 10.1,截至 2019 年 2 月仅支持 CUDA 10.0。所以我必须降级到 CUDA 10.0 才能使用当前的 TF 版本
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.