Computer shuts down during inference time

My computer shuts down when running PyTorch. I have the following specs:

Ubuntu 20.04
GPU: GTX1080
CUDA 10.2
Python 3.7
PyTorch 1.6.0

I’m running some model using the image from the webcam or video, but the CPU heats up and then shuts down. First I thought it might be the model/code that causing this, but I’ve run several different models, but the issue persists.

Are you pushing your model, inputs etc. to cuda?

Yes, I’m. it’s using ‘cuda:0’ as a device.

This sounds like a root cause and I’m not sure if this is still a PyTorch question.
Could you make sure your CPU is properly cooled?

It only happens with PyTorch (I’ve tried several pytorch implementation of human pose estimation techniques). I’ve been running other ml stuff (TF, scikit-learn); they run just fine.

Currently, I’m trying to run AlphaPose. Same issue.

If you cannot provide proper cooling, you could try to artificially slow down the code e.g. by adding sleeps to the code or reducing the number of used threads (via torch.set_num_threads and torch.set_num_interop_threads).