Windows - tensorflow - Fail to find the dnn implementation and GPU not detected on older tensorflow version

I’m running with the following versions:

windows 10
cuda 11.6
cudnn 8.4
python 3.8.10

Those versions works when I’m running torch models (I can run torch models on GPU !).

I’m trying to install and run tensorflow models.

When I installed tensorflow 2.4.0 or 2.4.1 the GPU is not detected via:

import tensorflow
physical_devices = tensorflow.config.list_physical_devices('GPU')

No GPU is detected (physical_devices is empty)

When I upgraded the tensorflow version to 2.8, the GPU is detected (physical_devices is not empty)

I’m run the following command before building and fitting my tensorflow (tensorflow.keras) model:

import tensorflow
physical_devices = tensorflow.config.list_physical_devices('GPU')
tensorflow.config.experimental.set_memoty_growth(physical-devices[0], enable=True)

But I’m getting error:

Failed to find the dnn implementation
  • I can’t change the CUDA & CUDNN versions because they works for my torch models (which used GPU and it works fine there).

What do I need to do in order to work with tensorflow with GPU in my machine ?

Can you try as per tested build configurations and let us know if the issue continues? Thank you!

As I wrote, I use:
cuda 11.6 & cudnn 8.4
And in the link you send me, they use:
cuDNN: 8.1
CUDA: 11.2

I can’'t use those old versions, because they work for me with my torch models.

Could you please share the GPU card details?