How to perform Eigenvalue Decomposition e.g, eig() on multiple GPUs?

25 Ansichten (letzte 30 Tage)
matlabnsd sun
matlabnsd sun am 2 Mai 2023
Beantwortet: Joss Knight am 7 Mai 2023
Since the matrix is very large,about 60kx60k herimitian matrix.
If do eig(), it needs about 140G memory and exceeds a single GPU's memory, normally is 24G or 40G.

Antworten (3)

Walter Roberson
Walter Roberson am 2 Mai 2023
That is not possible.
The current status of support for splitting work across GPUs is described at https://www.mathworks.com/help/parallel-computing/run-matlab-functions-on-multiple-gpus.html#MultiGPUExample-4
The last time I saw staff mentioning this possibility, it was really only for some aspects of Deep Learning. The current documentation hints it might be a bit more flexible now.
I doubt that it will work for your purpose, but I do not know enough about it to be sure of that.

Steven Lord
Steven Lord am 2 Mai 2023
Do you need all the eigenvalues and eigenvectors or do you just need a few of them? If the latter, consider using the eigs function instead of eig, perhaps (if your matrix has some structure that you can exploit) using the Afun syntax to avoid explicitly creating that huge matrix.

Joss Knight
Joss Knight am 7 Mai 2023
eigendecomposition is a highly serial algorithm so that's why simple multi-process solutions aren't easy to find and why the GPU's performance against the CPU does not compare particularly well to other LAPACK algorithms.
However, MATLAB is a programming language with a rich parallel language, so anything that is possible is possible in MATLAB.
It's plausible that using a distributed array and forgetting about GPUs will be your best best for now.

Kategorien

Mehr zu Linear Algebra finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by