From f41be8567dda1434b8a51b7855465d202ce55d68 Mon Sep 17 00:00:00 2001
From: Mathieu Faverge <mathieu.faverge@inria.fr>
Date: Thu, 6 Apr 2017 19:36:41 +0200
Subject: [PATCH] Setting the kernel is done in the codelet

---
 cudablas/compute/cuda_zgemm.c  | 5 -----
 cudablas/compute/cuda_zhemm.c  | 5 -----
 cudablas/compute/cuda_zher2k.c | 4 ----
 cudablas/compute/cuda_zherk.c  | 4 ----
 cudablas/compute/cuda_zlarfb.c | 4 ----
 cudablas/compute/cuda_zsymm.c  | 4 ----
 cudablas/compute/cuda_zsyr2k.c | 4 ----
 cudablas/compute/cuda_zsyrk.c  | 4 ----
 cudablas/compute/cuda_ztrmm.c  | 4 ----
 cudablas/compute/cuda_ztrsm.c  | 4 ----
 10 files changed, 42 deletions(-)

diff --git a/cudablas/compute/cuda_zgemm.c b/cudablas/compute/cuda_zgemm.c
index 0c6a61b4f..abc0a24f9 100644
--- a/cudablas/compute/cuda_zgemm.c
+++ b/cudablas/compute/cuda_zgemm.c
@@ -34,10 +34,6 @@ int CUDA_zgemm(MORSE_enum transa, MORSE_enum transb,
                cuDoubleComplex *C, int ldc,
                CUBLAS_STREAM_PARAM)
 {
-
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
     cublasZgemm(CUBLAS_HANDLE
                 morse_lapack_const(transa), morse_lapack_const(transb),
                 m, n, k,
@@ -46,6 +42,5 @@ int CUDA_zgemm(MORSE_enum transa, MORSE_enum transb,
                 CUBLAS_VALUE(beta),  C, ldc);
 
     assert( CUBLAS_STATUS_SUCCESS == cublasGetError() );
-
     return MORSE_SUCCESS;
 }
diff --git a/cudablas/compute/cuda_zhemm.c b/cudablas/compute/cuda_zhemm.c
index 8ed742362..272722379 100644
--- a/cudablas/compute/cuda_zhemm.c
+++ b/cudablas/compute/cuda_zhemm.c
@@ -34,10 +34,6 @@ int CUDA_zhemm(MORSE_enum side, MORSE_enum uplo,
                cuDoubleComplex *C, int ldc,
                CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZhemm(CUBLAS_HANDLE
                 morse_lapack_const(side), morse_lapack_const(uplo),
                 m, n,
@@ -46,6 +42,5 @@ int CUDA_zhemm(MORSE_enum side, MORSE_enum uplo,
                 CUBLAS_VALUE(beta),  C, ldc);
 
     assert( CUBLAS_STATUS_SUCCESS == cublasGetError() );
-
     return MORSE_SUCCESS;
 }
diff --git a/cudablas/compute/cuda_zher2k.c b/cudablas/compute/cuda_zher2k.c
index 5b340abd5..204a41e64 100644
--- a/cudablas/compute/cuda_zher2k.c
+++ b/cudablas/compute/cuda_zher2k.c
@@ -34,10 +34,6 @@ int CUDA_zher2k(MORSE_enum uplo, MORSE_enum trans,
                 cuDoubleComplex *C, int ldc,
                 CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZher2k(CUBLAS_HANDLE
                  morse_lapack_const(uplo), morse_lapack_const(trans),
                  n, k,
diff --git a/cudablas/compute/cuda_zherk.c b/cudablas/compute/cuda_zherk.c
index 397174087..1d36498a6 100644
--- a/cudablas/compute/cuda_zherk.c
+++ b/cudablas/compute/cuda_zherk.c
@@ -33,10 +33,6 @@ int CUDA_zherk( MORSE_enum uplo, MORSE_enum trans,
                 cuDoubleComplex *B, int ldb,
                 CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZherk(
         morse_lapack_const(uplo), morse_lapack_const(trans),
         n, k,
diff --git a/cudablas/compute/cuda_zlarfb.c b/cudablas/compute/cuda_zlarfb.c
index c35b55586..dac017439 100644
--- a/cudablas/compute/cuda_zlarfb.c
+++ b/cudablas/compute/cuda_zlarfb.c
@@ -49,10 +49,6 @@ CUDA_zlarfb(MORSE_enum side, MORSE_enum trans,
 
     MORSE_enum transT, uplo, notransV, transV;
 
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     /* Check input arguments */
     if ((side != MorseLeft) && (side != MorseRight)) {
         return -1;
diff --git a/cudablas/compute/cuda_zsymm.c b/cudablas/compute/cuda_zsymm.c
index 93ec3f386..4b448dd03 100644
--- a/cudablas/compute/cuda_zsymm.c
+++ b/cudablas/compute/cuda_zsymm.c
@@ -34,10 +34,6 @@ int CUDA_zsymm(MORSE_enum side, MORSE_enum uplo,
                cuDoubleComplex *C, int ldc,
                CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZsymm(CUBLAS_HANDLE
                 morse_lapack_const(side), morse_lapack_const(uplo),
                 m, n,
diff --git a/cudablas/compute/cuda_zsyr2k.c b/cudablas/compute/cuda_zsyr2k.c
index 839ea2d68..64e4f4be1 100644
--- a/cudablas/compute/cuda_zsyr2k.c
+++ b/cudablas/compute/cuda_zsyr2k.c
@@ -35,10 +35,6 @@ int CUDA_zsyr2k(
         cuDoubleComplex *C, int ldc,
         CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZsyr2k(CUBLAS_HANDLE
                  morse_lapack_const(uplo), morse_lapack_const(trans),
                  n, k,
diff --git a/cudablas/compute/cuda_zsyrk.c b/cudablas/compute/cuda_zsyrk.c
index e988fbc41..b7e10c547 100644
--- a/cudablas/compute/cuda_zsyrk.c
+++ b/cudablas/compute/cuda_zsyrk.c
@@ -33,10 +33,6 @@ int CUDA_zsyrk(MORSE_enum uplo, MORSE_enum trans,
                cuDoubleComplex *C, int ldc,
                CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZsyrk(CUBLAS_HANDLE
                 morse_lapack_const(uplo), morse_lapack_const(trans),
                 n, k,
diff --git a/cudablas/compute/cuda_ztrmm.c b/cudablas/compute/cuda_ztrmm.c
index d86fa5267..7d87dfb39 100644
--- a/cudablas/compute/cuda_ztrmm.c
+++ b/cudablas/compute/cuda_ztrmm.c
@@ -34,10 +34,6 @@ int CUDA_ztrmm(
         cuDoubleComplex *B, int ldb,
         CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZtrmm(CUBLAS_HANDLE
         morse_lapack_const(side), morse_lapack_const(uplo),
         morse_lapack_const(transa), morse_lapack_const(diag),
diff --git a/cudablas/compute/cuda_ztrsm.c b/cudablas/compute/cuda_ztrsm.c
index d82766bc8..6953ccc70 100644
--- a/cudablas/compute/cuda_ztrsm.c
+++ b/cudablas/compute/cuda_ztrsm.c
@@ -33,10 +33,6 @@ int CUDA_ztrsm(MORSE_enum side, MORSE_enum uplo,
                cuDoubleComplex *B, int ldb,
                CUBLAS_STREAM_PARAM)
 {
-#if !defined(CHAMELEON_USE_CUBLAS_V2)
-    cublasSetKernelStream( stream );
-#endif
-
     cublasZtrsm(CUBLAS_HANDLE
         morse_lapack_const(side), morse_lapack_const(uplo),
         morse_lapack_const(transa), morse_lapack_const(diag),
-- 
GitLab