Solved by Red-Eyed in post #21 
              
              
                Hello, I ended up with this solution, no reboot requires: 
sudo rmmod nvidia_uvm
sudo modprobe nvidia_uvm

After executing such commands, I can use PyTorch again.