I used to multi-gpu system in tensorflow.
however, from someday, the following code used CPU only.
tf.debugging.set_log_device_placement(True)
strategy = tf.distribute.MirroredStrategy()
Moreover, the return of physical device check function is empty
tf.config.list_physical_devices('GPU')
The return of nvidia-smi correctly show as following picture
Environment
NVIDIA_SMI: 418.87.00
Driver ver: 418.87.00
CUDA ver: 10.1
Tensorflow: 2.4.1
How do I handle this issue?
2
Answers
Have you changed anything in eco system.
I would suggest you to install cuda 11 and cudnn 8.0 with tensorflow 2.4.0 and above.
Then give it a try. Hope your problem will be resolved.
Tensorflow 2.4 is compatible with cudnn v8.0 and cuda 11.
So, upgrade cuddn and cuda.
If you are not using Anaconda, update the system paths and ensure they aren’t any previous version.
e.g.,
/usr/local/cuda/bin/nvcc --version
Conda install:
Here is a script for manual install / you’ll probably need even if using conda: