What algorithm does matlab use when solving linear system A\b on GPU?

4 vues (au cours des 30 derniers jours)
jinghao yang
jinghao yang le 13 Août 2021
Commenté : jinghao yang le 16 Août 2021
According to the document, on CPU a non-special linear system is solved by LU decomposition. I wonder what algorithm does matlab use when solve it on GPU? How about the performance on GPU? I have done some test using random matrix, and the time difference on these hardwares is not obvious.

Réponse acceptée

Joss Knight
Joss Knight le 14 Août 2021
The same as for the CPU, MATLAB uses LU with pivoting for general square matrices and QR for general rectangular matrices. Performance depends considerably on the type of device. Most people have GPUs that are only optimized for single precision computation, so you should create single precision inputs to test performance.
  1 commentaire
jinghao yang
jinghao yang le 16 Août 2021
Thanks! The performance improved a lot using single precision.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Linear Algebra dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by