Can I solve Ax=b1,b2,b3 repeatedly on GPU?

Skip to first unread message

Technical Forex

May 16, 2022, 9:46:10 AMMay 16
to MAGMA User
I need to solve a series of Ax=bi,i=1.....N with the matrix A unchanged.
while(time<FianalTime) { solve Ax=bi; set bi; if(time=SaveTime) copy x to cpu for further treating }
I want to know can i set the bi directly on the GPU without copying data between cpu and gpu.

Stanimire Tomov

May 16, 2022, 10:32:00 PMMay 16
to Technical Forex, MAGMA User

Ideally, you should be able to set it up directly on the GPU without copy from the CPU.
What is the formula for setting b_{i+1}, and in particular does it depend on x from solving A x = b_i?
You received this message because you are subscribed to the Google Groups "MAGMA User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Mark Gates

May 18, 2022, 2:08:42 PMMay 18
to Stanimire Tomov, Technical Forex, MAGMA User
It depends on which solver is used. Are you using Cholesky, LU, or QR? What size matrices? It sounds like 1 at a time, not batched.
The LU back solve, dgetrs_gpu, always calls lapackf77_dlaswp on the CPU, with some CPU <=> GPU data transfers. Whereas Cholesky dpotrs_gpu executes entirely on the GPU.


Reply all
Reply to author
0 new messages