Tensorflow-gpu 2.5.0 from conda doesn't recognise GPU


I made a new conda environment and installed tensorflow-gpu from conda (the latest version is 2.5.0). Then, I tested to see if the environment recognizes my GPU, and it does not. It returns

[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
incarnation: 1364016363571256103

when running the list locality function on tensorflow. What am I missing?

I installed cuDNN and cudatoolkit as dependencies from the conda installation when installing tensorflow-gpu.


The list of commands I ran were:

conda create --name ML4
conda activate ML4
conda install tensorflow-gpu=2.5

and then in python

from tensorflow.python.client import device_lib

which yielded the above statement which only recognizes my CPU and not my GPU.


TF 2.5 pre built binaries are compatible with CUDA 11.2 and cuDNN 8.1
See tested build configuration chart https://www.tensorflow.org/install/source#gpu.
Therefore you have to roll back to cuda 11.2

Answered By – mlneural03

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published