Page 1 of 1

MAGMA fallback on LAPACK implementation

Posted: Mon Dec 07, 2015 1:00 pm
by paoloviviani
Hello,
I'm looking to make a code that relies to MAGMA portable to platforms without a GPU, is it possible to make MAGMA use the standard LAPACK implementation on which is built upon (e.g. OpenBLAS) if it does not find a GPU at runtime? I would like to underline that I'm forced to do that at runtime.
Thanks!
paolo

Re: MAGMA fallback on LAPACK implementation

Posted: Tue Dec 08, 2015 4:42 pm
by mgates3
This is not currently supported by MAGMA. It may be possible for some CPU-interface routines (where the input/output data is on the CPU, and the computation is hybrid CPU/GPU). For GPU-interface routines, this is obviously not possible, since the input/output data is on the GPU.

We will have to do some investigation. I'm not sure of the behavior of MAGMA when no GPU is installed.

-mark

Re: MAGMA fallback on LAPACK implementation

Posted: Tue Dec 08, 2015 5:11 pm
by mgates3
Attached is a demonstration of wrapping a MAGMA call. It's not very clean, as magma_init and magma_finalize don't currently work without a CUDA GPU, but it does work.
-mark

Re: MAGMA fallback on LAPACK implementation

Posted: Wed Dec 09, 2015 10:48 am
by paoloviviani
Thanks a lot!
I'm trying to use Armadillo library to wrap Magma. I'll modify it following your example.
Thanks again,

Paolo