Can I run eigs on a GPU?

15 visualizaciones (últimos 30 días)
Lee Hively
Lee Hively el 9 de Ag. de 2020
Editada: Michael Kleder el 12 de Nov. de 2022
I see 'eig' in the list of functions that run on a GPU via the Parallelization toolkit, for which I have a license.
I do not see 'eigs' on this list. Is 'eigs' an omission in the list, or is 'eigs' really not supported for GPU use?
I only need the Fiedler eigenvalue (first non-zero eigenvalue) and the largest eigenvalue of the a large, real, symmetric, 2D matrix.
By large, I mean n=100s-1000s.
This computation takes 90+% of the CPU time for my problem without GPU computation.
Hence, the need for eigs to compute the two eigenvalues that I need.

Respuestas (2)

Walter Roberson
Walter Roberson el 9 de Ag. de 2020
Editada: Walter Roberson el 9 de Ag. de 2020
eigs really is not supported. https://www.mathworks.com/matlabcentral/answers/572377-accelerate-eigs-with-gpu#answer_472900

Michael Kleder
Michael Kleder el 12 de Nov. de 2022
Editada: Michael Kleder el 12 de Nov. de 2022
If it helps, matrix-vector multiplication is supported on a GPU and the first eigenpair can be determined pretty quickly by iteration. (cf https://courses.engr.illinois.edu/bioe298b/sp2018/Course%20Notes%20(Text)/Chapter09.pdf ) For example:
n=7000;C=gpuArray(randn(n));evec=gpuArray(ones(size(C,1),1));
tic;for n=1:1000;evec=C*evec;evec=evec./sqrt(sum(evec.^2));end;evalu=evec\(C*evec);toc

Categorías

Más información sobre Linear Algebra en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by