I can not run a simple code as this
import torch
toTest=torch.rand(2,4)
toTest=toTest.to(“cuda”)
print(toTest)
it just stuck and nothing happens.
Note: My real code is something else, but that one is also doing same, runs fine on cpu but not on cuda.
Here are the possibilities I tried so far.
1- all other options go to the same problem, but 10.2 has a different error as this is not compatible with RTX 3090.

but nothing worked. Even I asked my server admin to create a new account for me. he created a new account and I just installed the below packages. These are the total packages installed in my conda env.
(cant upload pictures as I am a new user)
My least requirement is Pytorch 1.9.0 as it is required by PyGCL.
I even asked my admin to create a new user for me and then I installed it there. but no… still the same problem. While my other labmate is using 1.9.0+cu111 or the same server and he has no problem.
Any guess what could be a possible problem?
here is the stackoverflow version of the question as there i can upload pictures.
  

      stackoverflow.com
  

  
      
    
  


  PyTorch with GPU is not working but working fine with CPU 1



  pytorch, anaconda, gpu



  asked by
  
  
    Adnan Ali
  
  on 01:45AM - 15 Dec 21 UTC