Zero GPU utitlisation in Windows 7

I have NVIDIA Quadro P5000 with Windows 7, installed pytorch 0.4 with cuda 9.1.

I am using jupyter notebook to run pytorch codes.


is True

But when I run the code

while True:
    torch.randn(2, 2).cuda() + torch.randn(2, 2).cuda()

There is no GPU utilisation. My nvidia-smi indicates

GPU PID TYPE Process name GPU Memory Usage
0 3019 C /home/anaconda3/bin/python N/A

Would appreciate if you can provide help, thanks!

Your workload is really small, so that you won’t notice any GPU utilization.
Try it again with a bigger size, e.g. torch.randn(2000, 2000).

I have an Ubuntu with GTX1050 and I tried the same code, and the Memory usage is not N/A. Is it possible that I have installed the wrong cuda version on the Windows environment?

Maybe I misunderstood the term utilization. Are you referring to the allocated GPU memory or the utilization of the GPU, i.e. in terms of computation?

After the first CUDA call, your GPU should have some used memory. Could you check it on your Windows machine with print(torch.cuda.memory_allocated())?

Sorry, I mean both GPU memory allocation and GPU utilization are N/A. Is it due to wrong driver installed?
Previously I installed pytorch 0.4.1 with cuda 9.2, and cuda.is_available() is False.
Should I try pytorch 0.4.0 with cuda 9.0?

Did PyTorch work with the GPU on Windows before?
It looks like a wrong driver might be the issue, but I’m really not familiar with Windows.
Which driver version are you currently using?

This is my first time installing PyTorch on Windows.
I tried PyTorch 0.4.0 with cuda 8.0, this time there is GPU utilisation but still N/A for memory allocation. At dataloader has issues.

PyTorch 0.4.1 with cuda 9.2 has N/A for both GPU utilisation and memory allocation, but seems to work ok for CPU.

PyTorch 0.4.1 with cuda 9.0 does not detect GPU.

I will try Pytorch 0.4.1 with cuda 9.2

I tried PyTorch 0.4.1, Nvidia Quadro P5000 Driver R396 U2 (397.93), with cuda 9.2.
is True

But I still face the problem of N/A for both GPU utilisation and memory allocation. Does this mean PyTorch cuda is not supported in Windows?

PyTorch supports CUDA on Windows.
Since I’m not really familiar with Windows, maybe @peterjc123 could help out, who developed some PyTorch version for Windows.

Sorry, I don’t know what you mean utilization. Do you mean that the python process doesn’t appear in the processes section of the nvidia-smi output? What error did you meet at the Python side?

I don’t know exactly what you mean. But this post may helps.

Sorry for the confusion, what I mean is the GPU is not used at all when I train a neural network model using PyTorch.

From the post that you provided, my understanding is Tensorflow still uses GPU although nvidia-smi states otherwise.

For PyTorch, when I set device to “cpu”, a batch run of 10k data samples took 2 mins, but when I set device to “gpu”, the same batch run took 17 mins, although torch.cuda.is_available() is True

When I run nvidia-smi while training the neural network, it shows the GPU-Util is ~0% and GPU Memory is N/A.

I think that there may be some problem with your CUDA installation. I’d suggest you remove all the related things like CUDA, Nvidia GPU drivers and also the PyTorch libraries first and then install them back.