Solved - Does windows create a CPU bottleneck?

Hi everybody,

I’m trying to run an efficientnet on my local rtx 2060 gpu. But a single epoch takes several hours. I suspect the multiprocessing might fail, because I think I remember reading something about this happening on Windows.

Also, here are some infos:

As you can see, the CPU (‘processeur’ in french) is used more than 50% (and that can go up to 100% if I put my laptop in ‘sport’ mode, and then the epoch time decreases) but the GPU is used 0%…

Several questions:

Can I trust these stats ?
If yes, apparently the CPU is the bottleneck. What can I do ? Would install Ubunto solve this ? I’ve had no error telling me multiprocessing wasn’t working, but the hints are strong. What do you think ?

Note: my data is very large, but I’m using 112px images
I’ve only recently bought that stuff and I’m trying to get everything running here, so sorry if the question is noobish or something.

Thanks for your time !

Edit:

I’ve also got this from nvidia-smi:
Fri Oct 25 14:41:55 2019
±----------------------------------------------------------------------------+
| NVIDIA-SMI 430.91 Driver Version: 430.91 CUDA Version: 10.2 |
|-------------------------------±---------------------±---------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 2060 WDDM | 00000000:01:00.0 Off | N/A |
| N/A 62C P5 30W / N/A | 2771MiB / 6144MiB | 86% Default |
±------------------------------±---------------------±---------------------+

PyTorch multiprocessing doesn’t really work on Windows. This is an issue that has been reported multiple times, not sure if/how they fixed it. It definitely works on Ubuntu.

1 Like

That’s what I thought. So you think, despite the code showing no error, that the CPU is just passing the GPU one image at a time or something and that creates a bottleneck ?

Thank you for taking the time to answer despite the business (as in busy-ness) around the v2 !

It’s passing them as batches, as the code intends to, but the multiprocessing used to create those batches in parallel isn’t really working.

1 Like

Ok that makes sense. Thank you so much for your time !