Windows build number: Version 2004 (Build 20150.1000)
Distribution version: Ubuntu 20.04
With WSL2
Linux Kernel: 4.19.121-microsoft-standard
Python: 3.5.4
PyTorch: 1.2
Geforce Driver: 455.41
From your DxDiag nothing looks wrong on the host OS.
Could you verify a couple of things:
No Native Linux driver got accidentally installed on your distro (this could happen if you installed the CUDA Toolkit via the wrong deb file or if it was pulled as a dependency somehow)
You can run some basic CUDA samples (if you do install a toolkit for the samples make sure to install it via the runfile and not the deb file and remove the Native Display Driver from the list of installable components)
If you do have a display driver that got accidentally installed you can purge the packages and it should work again.
When I update my torch and pytorch version with pip3.5 install torch==1.5.1+cu101 torchvision==0.6.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
the code runs without an error but doesn’t work either.