How to solve linear equation using GPU?
Mostrar comentarios más antiguos
Assume I need to solve a linear matrix equation Ax=b where A is a 3x3 non-singular matrix and b is a column vector of 3 elements. I know I can use inv(A)*b or A\b to get the solution, but the statement is run in CPU. Now I wanna make sure GPU is employed to run the same statement. Since I'm not familiar with GPU support in Matlab so I ask you for help: how to do it? Ideally I guess there may be a function like enableGPU(true) so that all subsequent statements will be run in GPU automatically. Also, I don't want to limit myself to the above statements. If there is some specific GPU functions like gpuInv(A), that's fine, please tell me that function. Hopefully the GPU version of Matlab code to solve linear equation could be faster than its CPU counterpart. Thanks a lot.
Respuesta aceptada
Más respuestas (1)
John D'Errico
el 25 de En. de 2017
0 votos
Do you have the proper toolbox? I would suggest this:
https://www.mathworks.com/products/parallel-computing.html
If you don't have it, then, no, you cannot simply invoke computations on your GPU.
Categorías
Más información sobre GPU Computing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!