Torch-Pruning icon indicating copy to clipboard operation
Torch-Pruning copied to clipboard

The parameters and computation decreased, but FPS was worse than the baseline model

Open TTFF322 opened this issue 1 year ago • 3 comments

Hello, recently I have been applying your code to yolov8. Based on previous problems encountered, and the help of the files in the examples/yolov8 folder. I managed to reduce both the number of parameters and the amount of computation. However, I had a problem. When testing the FPS of the pruned model, I found that although the number of parameters and so on were reduced, the FPS results measured after pruning were much lower than the baseline model.

TTFF322 avatar May 28 '24 12:05 TTFF322

Is this the case for cpu and cuda? If it is only on cuda you may want to check out NVIDIAs optimization guide:

https://docs.nvidia.com/deeplearning/performance/index.html#optimizing-performance

Maybe some performance issues regarding tensor shapes.

janthmueller avatar May 28 '24 12:05 janthmueller

I had only tested it on Nvidia GPUs before. After seeing your reply, I tested it on CPU, and the FPS was increased on CPU. Maybe some performance issues regarding tensor shapes. Thank you.

TTFF322 avatar May 31 '24 01:05 TTFF322

I had only tested it on Nvidia GPUs before. After seeing your reply, I tested it on CPU, and the FPS was increased on CPU. Maybe some performance issues regarding tensor shapes. Thank you.

Hi, I meet the same problem. So, do you know how to increase the FPS on GPU?

Goddaman avatar May 24 '25 11:05 Goddaman