Issue
I have tensorflow-gpu version 2.2.0 installed with Anaconda in python 3.7.4, but my code always runs on CPU and It's not able to detect my GPU.
physical_devices= tf.config.experimental.list_physical_devices('GPU')
print(len(physical_devices))
>>> 0
When I run this:
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
I get:
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 6159543114609950707
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 4043157374881641271
physical_device_desc: "device: XLA_CPU device"
, name: "/device:XLA_GPU:0"
device_type: "XLA_GPU"
memory_limit: 17179869184
locality {
}
incarnation: 1519736160969870434
physical_device_desc: "device: XLA_GPU device"
]
The XLA_GPU:0 corresponds to the integrated graphics that runs on CPU, because I have tested running my code under with tf.device('/GPU:0'): and Task Manager shows only CPU usage.
I checked in my NVIDIA Control Panel -> System Information -> Components and under 3D Settings I have NVCUDA64.dll described as NVIDIA CUDA 11.0.208 Driver.
Up to this moment I haven't tried reinstalled tensorflow-gpu, expecting there could be something else that has to be done before.
Solution
I do not believe 11.0 will work with tensorflow. You need 10.1. I have an RTX2070 and the driver version that work for that is 432.00. Go to the NVIDIA site and try to find a 10.1 compatible driver and install it. IF you used CONDA to install tensorflow then it should have installed the 10.1 CUDA toolkit and the compatible version of Cudnn.
Answered By - Gerry P
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.