Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

Commit 7b385691 authored by PRUVOST Florent's avatar PRUVOST Florent

set a list of compile definitions

parent a16b1fb4
...@@ -60,6 +60,8 @@ include(GenPkgConfig) ...@@ -60,6 +60,8 @@ include(GenPkgConfig)
# Parameters/Options # # Parameters/Options #
###################### ######################
set(CHAMELEON_DEFINITIONS_LIST "")
# Add define for Fortran Mangling (should be defined somewhere else) # Add define for Fortran Mangling (should be defined somewhere else)
# ------------------------------------------------------------------ # ------------------------------------------------------------------
add_definitions(-DADD_) add_definitions(-DADD_)
...@@ -686,6 +688,7 @@ endif() ...@@ -686,6 +688,7 @@ endif()
############################################################################### ###############################################################################
# Print Options # # Print Options #
################# #################
get_directory_property( CHAMELEON_DEFINITIONS_LIST DIRECTORY ${CMAKE_SOURCE_DIR} COMPILE_DEFINITIONS )
include(PrintOpts) include(PrintOpts)
### ###
......
...@@ -121,27 +121,30 @@ static void cl_zgemm_cuda_func(void *descr[], void *cl_arg) ...@@ -121,27 +121,30 @@ static void cl_zgemm_cuda_func(void *descr[], void *cl_arg)
cuDoubleComplex beta; cuDoubleComplex beta;
cuDoubleComplex *C; cuDoubleComplex *C;
int ldc; int ldc;
CUstream stream;
cublasHandle_t handle;
cublasStatus_t stat;
cublasOperation_t cublasTransA;
cublasOperation_t cublasTransB;
A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]); A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]);
B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]); B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]);
C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]); C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]);
starpu_codelet_unpack_args(cl_arg, &transA, &transB, &m, &n, &k, &alpha, &lda, &ldb, &beta, &ldc); starpu_codelet_unpack_args(cl_arg, &transA, &transB, &m, &n, &k, &alpha, &lda, &ldb, &beta, &ldc);
cublasHandle_t handle; stat = cublasCreate(&handle);
cublasStatus_t stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
cublasOperation_t cublasTransA;
if (transA == MorseNoTrans){ if (transA == MorseNoTrans){
cublasTransA = CUBLAS_OP_N; cublasTransA = CUBLAS_OP_N;
}else if(transA == MorseTrans){ }else if(transA == MorseTrans){
...@@ -151,7 +154,6 @@ static void cl_zgemm_cuda_func(void *descr[], void *cl_arg) ...@@ -151,7 +154,6 @@ static void cl_zgemm_cuda_func(void *descr[], void *cl_arg)
}else{ }else{
fprintf(stderr, "Error in cl_zgemm_cuda_func: bad transA parameter %d\n", transA); fprintf(stderr, "Error in cl_zgemm_cuda_func: bad transA parameter %d\n", transA);
} }
cublasOperation_t cublasTransB;
if (transB == MorseNoTrans){ if (transB == MorseNoTrans){
cublasTransB = CUBLAS_OP_N; cublasTransB = CUBLAS_OP_N;
}else if(transB == MorseTrans){ }else if(transB == MorseTrans){
......
...@@ -162,14 +162,17 @@ magma_zgemerge_gpu(magma_side_t side, magma_diag_t diag, ...@@ -162,14 +162,17 @@ magma_zgemerge_gpu(magma_side_t side, magma_diag_t diag,
{ {
int i, j; int i, j;
magmaDoubleComplex *cola, *colb; magmaDoubleComplex *cola, *colb;
CUstream stream;
cublasHandle_t handle; cublasHandle_t handle;
cublasStatus_t stat = cublasCreate(&handle); cublasStatus_t stat;
stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
...@@ -234,13 +237,19 @@ magma_zgemerge_gpu(magma_side_t side, magma_diag_t diag, ...@@ -234,13 +237,19 @@ magma_zgemerge_gpu(magma_side_t side, magma_diag_t diag,
for(i=0; i<N; i++){ for(i=0; i<N; i++){
cola = A + i*LDA; cola = A + i*LDA;
colb = B + i*LDB; colb = B + i*LDB;
cublasZcopy(i+1, cola, 1, colb, 1); //cublasZcopy(i+1, cola, 1, colb, 1);
cudaMemcpy(colb , cola,
(i+1)*sizeof(cuDoubleComplex),
cudaMemcpyDeviceToDevice );
} }
}else{ }else{
for(i=0; i<N; i++){ for(i=0; i<N; i++){
cola = A + i*LDA; cola = A + i*LDA;
colb = B + i*LDB; colb = B + i*LDB;
cublasZcopy(M-i, cola + i, 1, colb + i, 1); //cublasZcopy(M-i, cola + i, 1, colb + i, 1);
cudaMemcpy(colb+i , cola+i,
(M-i)*sizeof(cuDoubleComplex),
cudaMemcpyDeviceToDevice );
} }
} }
...@@ -291,9 +300,13 @@ magma_zgeqrt_gpu( magma_int_t m, magma_int_t n, magma_int_t nb, ...@@ -291,9 +300,13 @@ magma_zgeqrt_gpu( magma_int_t m, magma_int_t n, magma_int_t nb,
cudaMemset(dt_ref(0,0), 0, nb*n*sizeof(magmaDoubleComplex)); cudaMemset(dt_ref(0,0), 0, nb*n*sizeof(magmaDoubleComplex));
/* copy first panel of A on the host */ /* copy first panel of A on the host */
cublasGetMatrix(m, min(nb,n), sizeof(magmaDoubleComplex), // cublasGetMatrix(m, min(nb,n), sizeof(magmaDoubleComplex),
da_ref(0, 0), ldda, // da_ref(0, 0), ldda,
v, ldv); // v, ldv);
/* copy first panel of A on the host */
cudaMemcpy( v, da_ref(0,0),
m*min(nb,n)*sizeof(magmaDoubleComplex),
cudaMemcpyDeviceToHost );
/* Use blocked code initially */ /* Use blocked code initially */
for (i = 0; i < k; i += nb) { for (i = 0; i < k; i += nb) {
...@@ -305,9 +318,13 @@ magma_zgeqrt_gpu( magma_int_t m, magma_int_t n, magma_int_t nb, ...@@ -305,9 +318,13 @@ magma_zgeqrt_gpu( magma_int_t m, magma_int_t n, magma_int_t nb,
if (i>0){ if (i>0){
/* copy panel of A from device to host */ /* copy panel of A from device to host */
cublasGetMatrix(m, ib, sizeof(magmaDoubleComplex), // cublasGetMatrix(m, ib, sizeof(magmaDoubleComplex),
da_ref(0, i), ldda, // da_ref(0, i), ldda,
v, ldv); // v, ldv);
/* copy panel of A from device to host */
cudaMemcpy( v, da_ref(0,i),
m*ib*sizeof(magmaDoubleComplex),
cudaMemcpyDeviceToHost );
/* Apply H' to A(i:m,i+2*ib:n) from the left */ /* Apply H' to A(i:m,i+2*ib:n) from the left */
cols = n-old_i-2*old_ib; cols = n-old_i-2*old_ib;
......
...@@ -117,27 +117,30 @@ static void cl_zhemm_cuda_func(void *descr[], void *cl_arg) ...@@ -117,27 +117,30 @@ static void cl_zhemm_cuda_func(void *descr[], void *cl_arg)
cuDoubleComplex beta; cuDoubleComplex beta;
cuDoubleComplex *C; cuDoubleComplex *C;
int LDC; int LDC;
CUstream stream;
cublasHandle_t handle;
cublasStatus_t stat;
cublasSideMode_t cublasSide;
cublasFillMode_t cublasUplo;
A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]); A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]);
B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]); B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]);
C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]); C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]);
starpu_codelet_unpack_args(cl_arg, &side, &uplo, &M, &N, &alpha, &LDA, &LDB, &beta, &LDC); starpu_codelet_unpack_args(cl_arg, &side, &uplo, &M, &N, &alpha, &LDA, &LDB, &beta, &LDC);
cublasHandle_t handle; stat = cublasCreate(&handle);
cublasStatus_t stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
cublasSideMode_t cublasSide;
if (side == MorseLeft){ if (side == MorseLeft){
cublasSide = CUBLAS_SIDE_LEFT; cublasSide = CUBLAS_SIDE_LEFT;
}else if (side == MorseRight){ }else if (side == MorseRight){
...@@ -145,7 +148,6 @@ static void cl_zhemm_cuda_func(void *descr[], void *cl_arg) ...@@ -145,7 +148,6 @@ static void cl_zhemm_cuda_func(void *descr[], void *cl_arg)
}else{ }else{
fprintf(stderr, "Error in cl_zhemm_cuda_func: bad side parameter %d\n", side); fprintf(stderr, "Error in cl_zhemm_cuda_func: bad side parameter %d\n", side);
} }
cublasFillMode_t cublasUplo;
if (uplo == MorseUpper){ if (uplo == MorseUpper){
cublasUplo = CUBLAS_FILL_MODE_UPPER; cublasUplo = CUBLAS_FILL_MODE_UPPER;
}else if(uplo == MorseLower){ }else if(uplo == MorseLower){
......
...@@ -112,27 +112,30 @@ static void cl_zher2k_cuda_func(void *descr[], void *cl_arg) ...@@ -112,27 +112,30 @@ static void cl_zher2k_cuda_func(void *descr[], void *cl_arg)
double beta; double beta;
cuDoubleComplex *C; cuDoubleComplex *C;
int ldc; int ldc;
CUstream stream;
cublasHandle_t handle;
cublasStatus_t stat;
cublasFillMode_t cublasUplo;
cublasOperation_t cublasTrans;
A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]); A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]);
B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]); B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]);
C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]); C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]);
starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &ldb, &beta, &ldc); starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &ldb, &beta, &ldc);
cublasHandle_t handle; stat = cublasCreate(&handle);
cublasStatus_t stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
cublasFillMode_t cublasUplo;
if (uplo == MorseUpper){ if (uplo == MorseUpper){
cublasUplo = CUBLAS_FILL_MODE_UPPER; cublasUplo = CUBLAS_FILL_MODE_UPPER;
}else if(uplo == MorseLower){ }else if(uplo == MorseLower){
...@@ -142,8 +145,6 @@ static void cl_zher2k_cuda_func(void *descr[], void *cl_arg) ...@@ -142,8 +145,6 @@ static void cl_zher2k_cuda_func(void *descr[], void *cl_arg)
}else{ }else{
fprintf(stderr, "Error in cl_zher2k_cuda_func: bad uplo parameter %d\n", uplo); fprintf(stderr, "Error in cl_zher2k_cuda_func: bad uplo parameter %d\n", uplo);
} }
cublasOperation_t cublasTrans;
if (trans == MorseNoTrans){ if (trans == MorseNoTrans){
cublasTrans = CUBLAS_OP_N; cublasTrans = CUBLAS_OP_N;
}else if(trans == MorseTrans){ }else if(trans == MorseTrans){
......
...@@ -106,26 +106,29 @@ static void cl_zherk_cuda_func(void *descr[], void *cl_arg) ...@@ -106,26 +106,29 @@ static void cl_zherk_cuda_func(void *descr[], void *cl_arg)
double beta; double beta;
cuDoubleComplex *C; cuDoubleComplex *C;
int ldc; int ldc;
CUstream stream;
cublasHandle_t handle;
cublasStatus_t stat;
cublasFillMode_t cublasUplo;
cublasOperation_t cublasTrans;
A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]); A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]);
C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]); C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]);
starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &beta, &ldc); starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &beta, &ldc);
cublasHandle_t handle; stat = cublasCreate(&handle);
cublasStatus_t stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
cublasFillMode_t cublasUplo;
if (uplo == MorseUpper){ if (uplo == MorseUpper){
cublasUplo = CUBLAS_FILL_MODE_UPPER; cublasUplo = CUBLAS_FILL_MODE_UPPER;
}else if(uplo == MorseLower){ }else if(uplo == MorseLower){
...@@ -135,8 +138,6 @@ static void cl_zherk_cuda_func(void *descr[], void *cl_arg) ...@@ -135,8 +138,6 @@ static void cl_zherk_cuda_func(void *descr[], void *cl_arg)
}else{ }else{
fprintf(stderr, "Error in cl_zherk_cuda_func: bad uplo parameter %d\n", uplo); fprintf(stderr, "Error in cl_zherk_cuda_func: bad uplo parameter %d\n", uplo);
} }
cublasOperation_t cublasTrans;
if (trans == MorseNoTrans){ if (trans == MorseNoTrans){
cublasTrans = CUBLAS_OP_N; cublasTrans = CUBLAS_OP_N;
}else if(trans == MorseTrans){ }else if(trans == MorseTrans){
......
...@@ -117,27 +117,30 @@ static void cl_zsymm_cuda_func(void *descr[], void *cl_arg) ...@@ -117,27 +117,30 @@ static void cl_zsymm_cuda_func(void *descr[], void *cl_arg)
cuDoubleComplex beta; cuDoubleComplex beta;
cuDoubleComplex *C; cuDoubleComplex *C;
int LDC; int LDC;
CUstream stream;
cublasHandle_t handle;
cublasStatus_t stat;
cublasSideMode_t cublasSide;
cublasFillMode_t cublasUplo;
A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]); A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]);
B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]); B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]);
C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]); C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]);
starpu_codelet_unpack_args(cl_arg, &side, &uplo, &M, &N, &alpha, &LDA, &LDB, &beta, &LDC); starpu_codelet_unpack_args(cl_arg, &side, &uplo, &M, &N, &alpha, &LDA, &LDB, &beta, &LDC);
cublasHandle_t handle; stat = cublasCreate(&handle);
cublasStatus_t stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
cublasSideMode_t cublasSide;
if (side == MorseLeft){ if (side == MorseLeft){
cublasSide = CUBLAS_SIDE_LEFT; cublasSide = CUBLAS_SIDE_LEFT;
}else if (side == MorseRight){ }else if (side == MorseRight){
...@@ -145,7 +148,6 @@ static void cl_zsymm_cuda_func(void *descr[], void *cl_arg) ...@@ -145,7 +148,6 @@ static void cl_zsymm_cuda_func(void *descr[], void *cl_arg)
}else{ }else{
fprintf(stderr, "Error in cl_zsymm_cuda_func: bad side parameter %d\n", side); fprintf(stderr, "Error in cl_zsymm_cuda_func: bad side parameter %d\n", side);
} }
cublasFillMode_t cublasUplo;
if (uplo == MorseUpper){ if (uplo == MorseUpper){
cublasUplo = CUBLAS_FILL_MODE_UPPER; cublasUplo = CUBLAS_FILL_MODE_UPPER;
}else if(uplo == MorseLower){ }else if(uplo == MorseLower){
......
...@@ -112,27 +112,30 @@ static void cl_zsyr2k_cuda_func(void *descr[], void *cl_arg) ...@@ -112,27 +112,30 @@ static void cl_zsyr2k_cuda_func(void *descr[], void *cl_arg)
cuDoubleComplex beta; cuDoubleComplex beta;
cuDoubleComplex *C; cuDoubleComplex *C;
int ldc; int ldc;
CUstream stream;
cublasHandle_t handle;
cublasStatus_t stat;
cublasFillMode_t cublasUplo;
cublasOperation_t cublasTrans;
A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]); A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]);
B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]); B = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]);
C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]); C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[2]);
starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &ldb, &beta, &ldc); starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &ldb, &beta, &ldc);
cublasHandle_t handle; stat = cublasCreate(&handle);
cublasStatus_t stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
cublasFillMode_t cublasUplo;
if (uplo == MorseUpper){ if (uplo == MorseUpper){
cublasUplo = CUBLAS_FILL_MODE_UPPER; cublasUplo = CUBLAS_FILL_MODE_UPPER;
}else if(uplo == MorseLower){ }else if(uplo == MorseLower){
...@@ -142,8 +145,6 @@ static void cl_zsyr2k_cuda_func(void *descr[], void *cl_arg) ...@@ -142,8 +145,6 @@ static void cl_zsyr2k_cuda_func(void *descr[], void *cl_arg)
}else{ }else{
fprintf(stderr, "Error in cl_zsyr2k_cuda_func: bad uplo parameter %d\n", uplo); fprintf(stderr, "Error in cl_zsyr2k_cuda_func: bad uplo parameter %d\n", uplo);
} }
cublasOperation_t cublasTrans;
if (trans == MorseNoTrans){ if (trans == MorseNoTrans){
cublasTrans = CUBLAS_OP_N; cublasTrans = CUBLAS_OP_N;
}else if(trans == MorseTrans){ }else if(trans == MorseTrans){
......
...@@ -107,26 +107,29 @@ static void cl_zsyrk_cuda_func(void *descr[], void *cl_arg) ...@@ -107,26 +107,29 @@ static void cl_zsyrk_cuda_func(void *descr[], void *cl_arg)
cuDoubleComplex beta; cuDoubleComplex beta;
cuDoubleComplex *C; cuDoubleComplex *C;
int ldc; int ldc;
CUstream stream;
cublasHandle_t handle;
cublasStatus_t stat;
cublasFillMode_t cublasUplo;
cublasOperation_t cublasTrans;
A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]); A = (const cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[0]);
C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]); C = (cuDoubleComplex *)STARPU_MATRIX_GET_PTR(descr[1]);
starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &beta, &ldc); starpu_codelet_unpack_args(cl_arg, &uplo, &trans, &n, &k, &alpha, &lda, &beta, &ldc);
cublasHandle_t handle; stat = cublasCreate(&handle);
cublasStatus_t stat = cublasCreate(&handle);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("CUBLAS initialization failed\n"); printf ("CUBLAS initialization failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
CUstream stream = starpu_cuda_get_local_stream(); stream = starpu_cuda_get_local_stream();
stat = cublasSetStream(handle, stream); stat = cublasSetStream(handle, stream);
if (stat != CUBLAS_STATUS_SUCCESS) { if (stat != CUBLAS_STATUS_SUCCESS) {
printf ("cublasSetStream failed\n"); printf ("cublasSetStream failed\n");
assert( stat == CUBLAS_STATUS_SUCCESS ); assert( stat == CUBLAS_STATUS_SUCCESS );
} }
cublasFillMode_t cublasUplo;
if (uplo == MorseUpper){ if (uplo == MorseUpper){
cublasUplo = CUBLAS_FILL_MODE_UPPER; cublasUplo = CUBLAS_FILL_MODE_UPPER;
}else if(uplo == MorseLower){ }else if(uplo == MorseLower){
...@@ -136,8 +139,6 @@ static void cl_zsyrk_cuda_func(void *descr[], void *cl_arg) ...@@ -136,8 +139,6 @@ static void cl_zsyrk_cuda_func(void *descr[], void *cl_arg)
}else{ }else{
fprintf(stderr, "Error in cl_zsyrk_cuda_func: bad uplo parameter %d\n", uplo); fprintf(stderr, "Error in cl_zsyrk_cuda_func: bad uplo parameter %d\n", uplo);
} }
cublasOperation_t cublasTrans;
if (trans == MorseNoTrans){ if (trans == MorseNoTrans){
cublasTrans = CUBLAS_OP_N; cublasTrans = CUBLAS_OP_N;
}else if(trans == MorseTrans){