Commit 6b5343f8 authored by Mathieu Faverge's avatar Mathieu Faverge

Fix workspaces sizes

parent 4ebd6019
......@@ -77,16 +77,22 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
* ztsmqr = 2 * A->nb * ib
*/
ws_worker = max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgelqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* zunmlq = A->nb * ib
* ztslqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsmlq = 2 * A->nb * ib
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = max( ws_worker, ib * (ib + A->nb) );
ws_worker = max( ws_worker, ib * A->nb * 2 );
/* Host space
*
......@@ -124,7 +130,7 @@ void morse_pzgelqf(MORSE_desc_t *A, MORSE_desc_t *T,
MorseUpper, A->mb, A->nb, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, A->mb, A->nb,
......
......@@ -79,16 +79,22 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
* ztsmqr = 2 * A->nb * ib
*/
ws_worker = max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgelqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* zunmlq = A->nb * ib
* ztslqt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsmlq = 2 * A->nb * ib
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
*/
ws_worker = max( ws_worker, ib * (ib + A->nb) );
ws_worker = max( ws_worker, ib * A->nb * 2 );
/* Host space
*
......@@ -129,7 +135,7 @@ void morse_pzgelqfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
MorseUpper, tempkm, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkm, tempNn,
......
......@@ -72,16 +72,22 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
* ztsmqr = 2 * A->nb * ib
*/
ws_worker = max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* zunmqr = A->nb * ib
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsmqr = 2 * A->nb * ib
*/
ws_worker = max( ws_worker, ib * (ib + A->nb) );
ws_worker = max( ws_worker, ib * A->nb * 2 );
/* Host space
*
......@@ -119,7 +125,7 @@ void morse_pzgeqrf(MORSE_desc_t *A, MORSE_desc_t *T,
MorseLower, A->mb, A->nb, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, A->mb, A->nb,
......
......@@ -77,16 +77,22 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
ws_worker = A->nb * (ib+1);
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
* ztsmqr = 2 * A->nb * ib
*/
ws_worker = max( ws_worker, ib * A->nb * 2 );
#endif
#if defined(CHAMELEON_USE_MAGMA)
/* Worker space
*
* zgeqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* zunmqr = A->nb * ib
* ztsqrt = max( A->nb * (ib+1), ib * (ib + A->nb) )
* ztsmqr = 2 * A->nb * ib
*/
ws_worker = max( ws_worker, ib * (ib + A->nb) );
ws_worker = max( ws_worker, ib * A->nb * 2 );
/* Host space
*
......@@ -128,7 +134,7 @@ void morse_pzgeqrfrh(MORSE_desc_t *A, MORSE_desc_t *T, int BS,
MorseLower, tempMm, A->nb, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, A->nb,
......
......@@ -77,7 +77,7 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
ws_worker = A->nb * ib;
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmlq = A->nb * ib
......@@ -124,7 +124,7 @@ void morse_pzunglq(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......
......@@ -75,7 +75,7 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -147,7 +147,7 @@ void morse_pzunglqrh(MORSE_desc_t *A, MORSE_desc_t *Q,
MorseUpper, tempkmin, tempNn, A->nb,
A(k, N), ldak,
DIAG(k, N), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempNn,
......
......@@ -77,7 +77,7 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
ws_worker = A->nb * ib;
/* Allocation of temporary (scratch) working space */
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -126,7 +126,7 @@ void morse_pzungqr(MORSE_desc_t *A, MORSE_desc_t *Q, MORSE_desc_t *T,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......
......@@ -77,7 +77,7 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -153,7 +153,7 @@ void morse_pzungqrrh(MORSE_desc_t *A, MORSE_desc_t *Q,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......
......@@ -79,7 +79,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->mb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmlq = A->mb * ib
......@@ -115,7 +115,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkm, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkm,
......@@ -180,7 +180,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkm, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkm,
......@@ -231,7 +231,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......@@ -266,7 +266,7 @@ void morse_pzunmlq(MORSE_enum side, MORSE_enum trans,
MorseUpper, tempkmin, tempkn, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseLower, tempkmin, tempkn,
......
......@@ -79,7 +79,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -115,7 +115,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......@@ -182,7 +182,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkm, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkm, tempkmin,
......@@ -235,7 +235,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkn, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkn, tempkmin,
......@@ -270,7 +270,7 @@ void morse_pzunmqr(MORSE_enum side, MORSE_enum trans,
MorseLower, tempkn, tempkmin, A->nb,
A(k, k), ldak,
DIAG(k), ldak );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempkn, tempkmin,
......
......@@ -77,7 +77,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
*/
ws_worker = A->nb * ib;
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
/* Worker space
*
* zunmqr = A->nb * ib
......@@ -117,7 +117,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -232,7 +232,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -311,7 +311,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......@@ -349,7 +349,7 @@ void morse_pzunmqrrh(MORSE_enum side, MORSE_enum trans,
MorseLower, tempMm, tempkmin, A->nb,
A(M, k), ldaM,
DIAG(M, k), ldaM );
#if defined(CHAMELEON_USE_MAGMA)
#if defined(CHAMELEON_USE_CUDA)
MORSE_TASK_zlaset(
&options,
MorseUpper, tempMm, tempkmin,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment