Help with Jupyter+GPU (noob)

Dear community,

I am really sorry for coming here with common problem. I spend monthes to find correct configuration to connect my notebuuk to laptop NVIDIA. I tried to use suggestion that worked for other people, but it is still not working for me (I am really bad in python configurations). Please, help me =)

Following reccomendations and notebook requirenments I manage to recognize my GPU in notebook, but when I start model training using GPU in Jupyter notebook, kernel duy emidiatly. I belive I have poor compatability between CUDU, CuDNN and TF.

Here is what I am have installed:
cudatoolkit : 11.8.0

tensorflow==2.4.0 and tensorflow-gpu==2.4.0

NVIDIA-SMI 535.98 Driver Version: 535.98 CUDA Version: 12.2

(base) C:>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
Cuda compilation tools, release 10.1, V10.1.243

I will be thankfull for any help

@O_C,

Welcome to the Tensorflow Forum,

As per tested build configurations, you can try with CUDA 11.0 and cuDNN 8.0.

Thank you!

I also am currently having difficulty with Jupyter+GPU.

tf.config.list_physical_devices(‘GPU’) will list the GPU if it is running in a simple python terminal session or in a PyCharm IDE, but produces [ ] (i.e. empty list) when run inside a Jupyter notebook. Note, tf.test.is_built_with_cuda() produces “True” in all 3 scenarios.

I have a conda environment under Windows and I am using versions exactly as per (pip로 TensorFlow 설치) for Windows, i.e. cudatoolkit=11.2 and cudnn=8.1.0 installed using conda, and tensorflow=2.10.1 installed using pip.

Does Jupyter need special configuration to enable use of GPU?
Thanks

@Peter_Kuskopf,

Welcome to the Tensorflow Forum,

Could you please let us know the steps that you have followed to install Tensorflow on Windows?

Thank you!

Thanks @chunduriv,

I believe I have located my error. I had not setup the ipykernel correctly in the conda environment. I could not figure out how to setup the kernel spec manually, so I have used Option 3. of https://stackoverflow.com/questions/58068818/how-to-use-jupyter-notebooks-in-a-conda-environment which suggests adding nb_conda_kernels to the base environment and ipykernel to each conda environment. This automatically create the correct jupyter kernelspec for each conda environment.

Having done this, my installation of cudatoolkit=11.2 cudnn=8.1.0 and tensorflow=2.10.1, as per the tensorflow installation page, works perfectly in my jupyter notebook and uses the GPU as expected.

Thanks for your offer of help,
Peter

Hi,

I just managed to connect notebook to GPU. Following suggestion found on forum I created in my working directory new folder and subfolder .\nvvm\libdevice and copied inside files (libdevice.10.bc and nvvm64_40_0.dll) that I found in C:\Users\username\AppData\Local\anaconda3\pkgs\cudatoolkit-11.8.0-hd77b12b_0\DLLs

this instruction was found here Can't find libdevice directory ${CUDA_DIR}/nvvm/libdevice · Issue #56927 · tensorflow/tensorflow · GitHub