[SOLVED] Cuda is not available in pip installed pytorch while tensorflow works fine with installed cuda

I installed cuda on ubuntu, tensorflow works fine with installed cuda, but pytorch installation with pip doesn’t use cuda and torch.cuda.is_available() return False.
I installed cuda8.0 on ubuntu 16.04. Would you please help to solve this problem?

Issue resolved after system reboot.

Periodically I have same issue, reboot also helps to me, but I do not understand why. I just work (and watch video on youtube) somthing switched off and cuda disabled very strange issue

I guess it happens because whenever we try to stop the kernel execution to make changes to the program. The process doesn’t stop. It happened with me too. Killing the process did help though.