How to use the lab from week 4 on a GPU on my laptop?

I downloaded lab Transformer Network Application: Named-Entity Recognition from week 4 of Sequence Models course. I initialized tensorflow and gpu support by this manual pipを使用してTensorFlowをインストールします on my laptop with video card NVIDIA GeForce GTX 1650 Ti

And I see just 1 Epoch and nothing happens after this

I have crises of ideas. Maybe do you have any?

When I run some more times I can got errors like
2023-08-26 20:03:36.587850: I tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:432] Loaded cuDNN version 8904
2023-08-26 20:03:36.711915: I tensorflow/tsl/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory

Also, I have a desktop pc with more big videocard and can’t successfully run this cell too.

Okay, so, after 2 days of suffer I opened logs of Jupyter and found a few interesting strings

2023-08-26 20:06:25.810760: I tensorflow/tsl/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory
2023-08-26 20:06:25.851893: I tensorflow/tsl/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory
2023-08-26 20:06:25.851952: W tensorflow/compiler/xla/stream_executor/gpu/asm_compiler.cc:109] Couldn't get ptxas version : FAILED_PRECONDITION: Couldn't get ptxas/nvlink version string: INTERNAL: Couldn't invoke ptxas --version
2023-08-26 20:06:25.893248: I tensorflow/tsl/platform/default/subprocess.cc:304] Start cannot spawn child process: No such file or directory
2023-08-26 20:06:25.893352: F tensorflow/compiler/xla/service/gpu/nvptx_compiler.cc:492] ptxas returned an error during compilation of ptx to sass: 'INTERNAL: Failed to launch ptxas'  If the error message indicates that a file could not be written, please verify that sufficient filesystem space is provided.
[I 2023-08-26 20:06:28.383 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), keep random ports
[W 2023-08-26 20:06:28.384 ServerApp] kernel 0b30795f-8574-40e6-abdb-1f56b2d2bbc9 restarted

and this is what chatgpt said

Check CUDA Toolkit Installation:
Ensure that the CUDA Toolkit is properly installed on your system and that the necessary executables (such as ptxas and nvlink) are accessible from the system's PATH.

I checked this commands in WSL and found that they are not found

Command 'ptxas' not found, but can be installed with:
sudo apt install nvidia-cuda-toolkit   

so, I installed nvidia-cuda-toolkit and everything works now. :face_with_peeking_eye: Just the one question, why do I not have it in docs? Also, I haven’t seen this solution in any manuals. It really-really strange. I think there are a lot of people who installed tensorflow gpu by official docs it should work :thinking:

by the way, it is really strange but I have output like this now in WSL

>>> nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver                                         
Copyright (c) 2005-2021 NVIDIA Corporation                                    
Built on Thu_Nov_18_09:45:30_PST_2021                                         
Cuda compilation tools, release 11.5, V11.5.119                               
Build cuda_11.5.r11.5/compiler.30672275_0  

Looks like ubuntu version of cuda toolkit even less than required in ternsorflow? :thinking: (last version for windows today 12.2)