PyTorch and Cuda strange behaviour

Hi. I’m using Cuda 11.1 installed from here

Then installed PyTorch from here

PyTorch Build: Stable (1.9.0)
Your OS: Linux
Language: Python
Compute Platform: CUDA 11.1

Then I ran generated command

My Python version is 3.9
My gpu is NVIDIA GeForce RTX 3070 Ti

So on running the python script (ipynb) I’m getting error

RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call,so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.

Can someone help me please?

Did you reboot after installing CUDA?

Besides @gphilip’s advice, did you verify that the PyTorch pip wheel or conda binary with CUDA11.1 was installed? Your 3070 has a compute capability of 8.6 and thus needs CUDA>=11 and will fail with the posted error message in CUDA<=10.