There is not currently an out-of-GPU-memory triangular solve. If A is in CPU memory, and you have a single right-hand side b, then solving it on the CPU with LAPACK is likely faster than copying the matrix to the GPU and solving it there.
You can use magma_dposv, which will try to factor & solve on the GPU if it fits (magma_dpotrf_gpu & magma_dpotrs_gpu), otherwise it will use the out-of-GPU-memory factorization and solve on the CPU (magma_dpotrf & lapack_dpotrs).
-mark
Wrapping magma_dpotrf for python
Re: Wrapping magma_dpotrf for python
Hello Peter,
I am trying to wrap magma_dsyevd function. I tried to replicate your results. Somehow, I couldn't manage that with exactly the same problem of "ctypes.c_char(uplo)". I was wondering if it is possible to upload your working code snippet.
-Mustafa
I am trying to wrap magma_dsyevd function. I tried to replicate your results. Somehow, I couldn't manage that with exactly the same problem of "ctypes.c_char(uplo)". I was wondering if it is possible to upload your working code snippet.
-Mustafa
Re: Wrapping magma_dpotrf for python
Hello Peter,
I am trying to replicate your results so that I can build magma_dsyev upon it. I encountered exactly the same problem at libmagma.magma_uplo_const(ctypes.c_char(uplo)). Somehow, I couldn't manage to correct it. I was wondering if you can post your working version as a template?
Best,
Mustafa
I am trying to replicate your results so that I can build magma_dsyev upon it. I encountered exactly the same problem at libmagma.magma_uplo_const(ctypes.c_char(uplo)). Somehow, I couldn't manage to correct it. I was wondering if you can post your working version as a template?
Best,
Mustafa
Re: Wrapping magma_dpotrf for python
Hi Mustafa,
As Mark mentioned, uplo is not actually a char it's an int. You can use libmagma.magma_uplo_const(ctypes.c_char(uplo)) to convert 'L' or 'U' to the value required.
Annoyingly I wasn't able to get the call to dpotrf from libmagma to do what I wanted in the end which would have been a neater solution (if you can get it to work after correcting uplo please let me know). Instead I accessed it using c types via its c wrapper (testing_dpotrf).
Peter
As Mark mentioned, uplo is not actually a char it's an int. You can use libmagma.magma_uplo_const(ctypes.c_char(uplo)) to convert 'L' or 'U' to the value required.
Annoyingly I wasn't able to get the call to dpotrf from libmagma to do what I wanted in the end which would have been a neater solution (if you can get it to work after correcting uplo please let me know). Instead I accessed it using c types via its c wrapper (testing_dpotrf).
Peter