Incubator-mxnet: GPUDeviceStorage is not used? why?

Created on 16 Aug 2017  路  4Comments  路  Source: apache/incubator-mxnet

I found that GPUDeviceStorage is not used, however CPUDeviceStorage is used, why is that?

Most helpful comment

Oh, ok. This is because CUDA allocations and deallocations are much more expensive (since they deal with pinned memory), especially with multiple GPUs per node. They also introduce stalls in the GPU pipeline, which is not something we want for maximum performance. That is why MXNet uses caching allocator (GPUPooledStorageManager) instead of a naive one.

All 4 comments

Are you sure you compiled with CUDA support enabled? What is it that you are trying to do?

I didn't compile with CUDA, I'm reading the code, I see that when CUDA is used, it actually use GPUPooledStorageManager to do the allocation, on the other hand, CPUDeviceStorage is used no where.

I'm just curious why CPUDeviceStorage is there, and not in use.

I'm on the master branch.

Oh, ok. This is because CUDA allocations and deallocations are much more expensive (since they deal with pinned memory), especially with multiple GPUs per node. They also introduce stalls in the GPU pipeline, which is not something we want for maximum performance. That is why MXNet uses caching allocator (GPUPooledStorageManager) instead of a naive one.

@szha please close

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbodenstein picture sbodenstein  路  3Comments

realbns2008 picture realbns2008  路  3Comments

ranti-iitg picture ranti-iitg  路  3Comments

xzqjack picture xzqjack  路  3Comments

Fzz123 picture Fzz123  路  3Comments