Increasing effective GPU memory through parallel GPUs?
10 views (last 30 days)
I'm having a for-loop where a certain GPUArray increases at each iteration by ~ 1GB and at the end of the all iterations the GPU array would be ~50GB big.
As hardware I have 4 x 32GB GPU available. However, when the GPUarray size exceeds 32GB in the for-loop, I run out of memory. Hence I can conclude that Matlab does not automatically use the additional hardware available.
How can I utilize the extra GPUs in order to increase the "effective available memory" up to 64GB? Somehow I should tell the Matlab to use the second GPU in order to make Matlab see 64GB available GPU memory "in total".
I'm using Matlab 2018b and I have a parallel computing toolbox available.
Joss Knight on 7 Feb 2022
The only way to do this is to divide your computation up manually and spread the work across your GPUs by using a parallel pool and spmd. There is no way to have MATLAB just automatically share work and memory across GPUs. If you post some of your code, perhaps we can help you work out how to do this.