Increasing effective GPU memory through parallel GPUs?

3 visualizaciones (últimos 30 días)
Joonas
Joonas el 1 de Feb. de 2022
Respondida: Joss Knight el 7 de Feb. de 2022
Hi,
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.
Best regards,
Joonas

Respuestas (1)

Joss Knight
Joss Knight el 7 de Feb. de 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.

Categorías

Más información sobre GPU Computing en Help Center y File Exchange.

Productos


Versión

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by