Jupyter Notebook won't use Tensorflow-GPU 2.10, is locked in 2.13

I’ve created a conda environment where I’ve installed python 3.8, CUDA Toolkit 11.2 , cuDNN 8.1 and Tensorflow 2.10. Basically I’ve done all the steps in the Install Tensorflow with pip guide Install TensorFlow with pip

Through the code in the anaconda prompt
python -c "import tensorflow as tf; print(tf.config.list_physical_devices('GPU'))"
python returns a list of my GPUs but when I run it in Jupyter Notebooks through the environments kernel the return list is [0]. Moreover tensorflow is locked in version 2.13 and won’t reinstall to version 2.10…
Is there something I haven’t done in order for Jupyter to work with the GPU?

Hi @Erwin_Rogoza

Welcome to the TensorFlow Forum!

Please ensure that you have selected the same virtual environment to open the Jupyter Notebook where you have configured the GPU setup with TensorFlow to detect the gpu.

You can create a new virtual environment to install TensorFlow 2.13 and supported libraries (CUDA 11.8 and cuDNN 8.6) as per this tested build configuration.

Please let us know if the issue still persists. Thank you.

I have the same issues tensorflow not recognize GPU
I used Nivida GeForce RTX 3070 Ti
Python 3.9.17
Tensorflow Version: 2.13.0
Keras 2.13.1
Cuda 11.8
Cudnn 8.6.0

Hi @Atheer_Khalaf

Welcome to the TensorFlow Forum!

Please let us know the system OS you are using and also verify if you have followed all the steps mentioned in this link to install Tensorflow with GPU as per your system OS.

Because if you are using Win OS, GPU support is only available for 2.10 or earlier versions in native-Windows, starting in TF 2.11, CUDA build is not supported for Windows.

Hello, I managed to fix my problem. The order how you do it is very crucial.
I did everything in the anaconda prompt:

  1. created a GPU environment
  2. activated/entered the environment
  3. installed Python 3.8
  4. installed tensorflow 2.13
  5. installed cuda 11.2
  6. installed cudnn
  7. created a GPU kernel in the GPU environment

This seemed to work for me and while in jupyter notebook it managed to find a GPU device and use it

Hello Now I tried to follow tensorflow manual and I created WSL and followed all steps inside the document Tensorflow GPU after that the Jupyter recognized the GPU but when I run the model the kernel died really I’m giving up.

Hello, can you tell me how to create a GPU kernel in the GPU environment?
Now I’m using WSL and making an environment following this link Tensorflow GPU the Jupyter recognized the GPU but when running the model the kernel died immediately.

Hi again @Atheer_Khalaf

Could you please provide us some more details on the model definition code which could be the reason of above issue? Also, there is known issue observed for Jupyter notebbok in WSL if you are using convolutional layers in the model. For which, team is already working on to fix the issue. Ref: #17743