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

8 ビュー (過去 30 日間)
jinghao yang
jinghao yang 2021 年 8 月 13 日
コメント済み: jinghao yang 2021 年 8 月 16 日
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.

採用された回答

Joss Knight
Joss Knight 2021 年 8 月 14 日
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 件のコメント
jinghao yang
jinghao yang 2021 年 8 月 16 日
Thanks! The performance improved a lot using single precision.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by