PyTorch for Cuda 12

PyTorch for Cuda 12 – PyTorch Forums

Your locally installed CUDA toolkit won’t be used as the PyTorch binaries ship with their own CUDA dependencies unless you build PyTorch from source or a custom extension.
Check the output of python -m torch.utils.collect_env and make sure a PyTorch version with a CUDA runtime is installed
https://hud.pytorch.org/hud/pytorch/pytorch/nightly/1?per_page=50