face-alignment icon indicating copy to clipboard operation
face-alignment copied to clipboard

CPU Bottleneck caused by python ? 10% cuda usage

Open ExtReMLapin opened this issue 5 years ago • 3 comments

Hello,

I'm using face-alignement in first-order-model repo, especially the crop-video.py script.

While working on a 1080p video with CUDA, i get this performance :

32it [00:08, 4.43it/s]

CPU is used a 54%, CUDA @ 10%

When using CPU mode it's 4 times slower (no surprise here, it seems that CUDA mode is enabled correctly)

48it [00:44, 1.13it/s]

Is it a bug from the task manager that doesn't report the correct GPU usage ? Or is it related to python's terrible performances ?

ExtReMLapin avatar Aug 12 '20 14:08 ExtReMLapin

On another side, CUDA usage goes much higher on other parts of the project code (non related to face-alignement)

ExtReMLapin avatar Aug 12 '20 14:08 ExtReMLapin

Sorry for delay. The network itself it relatively light and thin as such a high end GPU will typically be underutilized with it. To make better use of resources one simple solution may be to increased the batch size.

1adrianb avatar Aug 17 '20 17:08 1adrianb

emmmm...Could you tell me where to increased the batch size?I tried to change batch size but it did not work.

Sorry for delay. The network itself it relatively light and thin as such a high end GPU will typically be underutilized with it. To make better use of resources one simple solution may be to increased the batch size.

aaawrong avatar Apr 20 '22 05:04 aaawrong