Use Pytorch for RTX 4070 cuda 12.2

I purchased an RTX4070 for model training. According to nvidia-smi and nvcc -V, its CUDA version should be 12.2, so I tried to install the latest cu118 to attempt GPU-based training.
However, after installation torch.cuda.is_available() did not return True or False but instead froze completely. Could this be because the current version of cu118 is not yet compatible with CUDA 12.2?

No, since your locally installed CUDA toolkit won’t be used unless you build PyTorch from source or a custom CUDA extension.
To execute the PyTorch binaries you would need to properly install an NVIDIA driver, which seems to cause the error in your environment.

Thank you for checking. I will reinstall the driver and related environment to troubleshoot the issue.