ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

memory usage diffrent in CPU and in GPU mode

Open shenghuiran opened this issue 1 year ago • 1 comments

detail | 详细描述 | 詳細な説明

We attempted to use ncnn and Vulkan to accelerate a certain algorithm of CLIP on Ubuntu. We noticed that when using the CPU mode, the algorithm's memory consumption is around 105M, with a frame rate of 5 fps. However, when switching to the GPU mode with ncnn, the memory consumption soars to 350M, while the frame rate increases to 80 fps. Why does this happen? How can we reduce the memory usage in GPU mode?

shenghuiran avatar Jul 08 '24 07:07 shenghuiran

Try to update the ncnn version. The new version reduces the memory usage during gpu inference.

nihui avatar Apr 27 '25 04:04 nihui