I would like to propose a new interface for the mixed precision routines (ds/zc)GESV, (ds/zc)POSV and others that MAGMA also contains. Actually is not a proposal of changing the interface of the existing functions, but create newer ones. My suggestion is adding a new input argument in order to control if the double precision computation will be executed if the refinement process fails. Now, this LAPACK functions always switch to the double precision algorithm to solve the problem. I'm thinking, for example, in cases that the GPU is single precision powerful, but has only poor performance in double. In such cases, if the mixed precision fails the operator may want to solve the problem in double using the CPU only, as it is probably faster than a non high-end GPU. So I propose the new input argument can adopt two values: 0 or not 0. When the value is 0 and the mixed algorithm fails, the function runs as the classical one and uses the double precision function to solve the task. But if not 0 is passed and the mixed algorithm fails, the function returns and is the responsibility of the programmer by inspecting the *info and *iter output arguments to call the double precision function for completing the task. The function declaration (for dsgesv_stop, or whatever other name) could be:

- Code: Select all
`magma_dsgesv_stop_gpu(char trans, magma_int_t n, magma_int_t nrhs,`

double *dA, magma_int_t ldda,

magma_int_t *ipiv, magma_int_t *dipiv,

double *dB, magma_int_t lddb,

double *dX, magma_int_t lddx,

double *dworkd, float *dworks,

magma_int_t stop,

magma_int_t *iter, magma_int_t *info)

where 'magma_int_t stop' is the proposed argument

Thanks