Is cuda 12.1 compatible for my geforce gtx 1050 Ti , which cudnn to use and nvidia driver. what to do please

NVIDIA-SMI 531.29 Driver Version: 531.29 CUDA Version: 12.1
pytorch 2.0

how do i use my Nvidia Geforce GTX 1050 Ti , what are the things and steps needed to install and executed

Yes, the driver is compatible with your Pascal GPU and you can just install the pip wheel or conda binary as described here.
Note that the binaries ship with their own CUDA libs and dependencies. Your locally installed CUDA toolkit will be used if you build PyTorch from source or a custom CUDA extension.

CAN anyone guide me to exact steps of installation from scratch as i have removed/uninstalled cuda12.1.
so i have only nvidia driver {Driver Version: 531.29} installed in my laptop, also i have python3.9.13 installed. Also i am using pytorch2.0(cpu).
what i have to install for my Nvidia Geforce GTX 1050 Ti , which version cuda, cudnn etc

Just visit the link from my previous post, select the desired PyTorch version, OS, Package manager, CUDA, copy/paste the command, and execute it in your terminal.

E.g. to install PyTorch 2.0.0 with CUDA 11.7 as a pip wheel on Linux, run pip install torch.